Home › Forums › Mayfly Data Logger › Using Xbee Cellular Modem with ThingSpeak › Reply To: Using Xbee Cellular Modem with ThingSpeak
Hello @rick-vogel – sounds fascinating & fun to use python in the Xbee. Though for ModularSensors there are layers of software that allow the physical modem to be abstracted so it could be possible to use another LTE when it becomes available (0.30.0 seems to have hooks for a new LTE modem SIM7080G) – through TinyGSM. As a Class package that @srgdamiano has put together its quite comprehensive – though as with all abstractions it has upsides and downsides. I think this is working through what it takes to figure out the control flow, which would be needed whatever route is taken. In my fork (with some LTE interface changes) it has worked.
@zeke-holloman, I’d got pulled off onto something else, now I’ve added the STREAMDEBUGGER_DBG to your “Logging_to_Thingskeak5.ino”and removed my extra code that I had and about to test it – but I have to get another dataplan going to test it – I use https://dataplans.digikey.com/ that has a 50Mbytes/month plans,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
/ ========================================================================== // Wifi/Cellular Modem Options // ========================================================================== /** Start [xbee_cell_transparent] */ // For any Digi Cellular XBee's // NOTE: The u-blox based Digi XBee's (3G global and LTE-M global) can be used // in either bypass or transparent mode, each with pros and cons // The Telit based Digi XBees (LTE Cat1) can only use this mode. HardwareSerial& modemSerial = Serial1; // Use hardware serial if possible #if defined STREAMDEBUGGER_DBG #include <StreamDebugger.h> StreamDebugger modemDebugger(modemSerial, STANDARD_SERIAL_OUTPUT); #define modemSerHw modemDebugger #else #define modemSerHw modemSerial #endif // STREAMDEBUGGER_DBG #include <modems/DigiXBeeCellularTransparent.h> const int32_t modemBaud = 9600; // All XBee's use 9600 by default // Modem Pins - Describe the physical pin connection of your modem to your board // NOTE: Use -1 for pins that do not apply // The pin numbers here are for a Digi XBee with a Mayfly and LTE adapter // For options https://github.com/EnviroDIY/LTEbee-Adapter/edit/master/README.md const int8_t modemVccPin = -1; // MCU pin controlling modem power // Option: modemVccPin = A5, if Mayfly SJ7 is // connected to the ASSOC pin const int8_t modemStatusPin = 13; // MCU pin used to read modem status // NOTE: If possible, use the <code>STATUS/SLEEP_not</code> (XBee pin 13) for status, but // the CTS pin can also be used if necessary const bool useCTSforStatus = false; // Flag to use the CTS pin for status const int8_t modemResetPin = 20; // MCU pin connected to modem reset pin const int8_t modemSleepRqPin = 23; // MCU pin for modem sleep/wake request const int8_t modemLEDPin = redLED; // MCU pin connected an LED to show modem // status // Network connection information const char* apn = "hologram"; // APN for GPRS connection // Create the modem object DigiXBeeCellularTransparent modemXBCT(&modemSerHw, modemVccPin, modemStatusPin, useCTSforStatus, modemResetPin, modemSleepRqPin, apn); // Create an extra reference to the modem by a generic name DigiXBeeCellularTransparent modem = modemXBCT; /** End [xbee_cell_transparent] */ |