Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

GPRSBee

Home Forums Mayfly Data Logger GPRSBee

Viewing 37 reply threads
  • Author
    Posts
    • #12349
      Cal
      Participant

      I have very recently purchased a Mayfly, GPRSBee (with SIM800H) and a Hologram sim card. Finding information on how to get the cellular communication working has been a nightmare. I’m sure there is some documentation out there somewhere but I haven’t found what I need: a step-by-step guide for loading/personalizing/testing the configuration. I have gotten some code I found to talk to the GPRSBee but the response to AT+CSQ has only been 0,0. I have been reassured that GSM 2G exists where I live but I don’t really know how to be certain of that. So I’m not sure if my code or personalization or library or antenna or cellular availability is the problem. I think I need a guide that steps me through the process.

    • #12350
      fisherba
      Participant

      Hi Cal,

      I have been working on a tutorial, but it’s unfortunately nowhere near complete, and I will be away for the next week. I suggest using the Modular Sensors library on GitHub, where there’s an example called logging_to_EnviroDIY. This is formatted to log to data.envirodiy.org, where you can set up a hosting site for free.
      https://github.com/EnviroDIY/ModularSensors/blob/master/examples/logging_to_EnviroDIY/logging_to_EnviroDIY.ino

      The catch is that it has a lot of library dependencies, which could be difficult to set up depending on your Arduino background.

      Because you are using Hologram, line 106 will be:

      const char *apn = “apn.konekt.io”; // The APN for the gprs connection, unnecessary for WiFi

      The Modular Sensor sketches have a built-in “sensor testing mode”, and when you are in logging mode, watching the serial monitor, the sketch will give you
      the “response code” for your internet connection, which you can look up to see if you have success (201 is the winning response: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes).

      I’m attaching the tutorial text that I have done so far. It’s really in first draft mode, but I hope it can help you.

      Beth

    • #12352
      Sara Damiano
      Moderator

      The modular sensors library that Beth references depends on TinyGSM for the majority of the cellular connection process. You may want to look at the code and examples in that library for help communicating with the GPRSBee (which is a SIM800 chip).

      Unfortunately, I think if you’re successfully querying for csq and only being a response of 0, that probably means you just don’t have any signal. Having amazing 3G or 4G doesn’t mean there’s any 2G at all. Beth has found some quirks to the sequence of connecting the GPRSBee to that could also cause it to falsely report 0 signal. From the ReadMe for modular sensors:

      Note for GPRSBee modems: To start the modem you will need to power the logger board off, connect the battery to the logger board, and finally attach the modem to the logger board. Then you may power the board and run your sketch. We have found that attaching a GPRSBee modem to power in a different sequence results in the modem reporting zero signal strength. Note, the Mayfly connected to a computer via USB does not supply sufficient power to the GPRSBee. If the community finds this true for other modems, please let us know.

    • #12353
      Cal
      Participant

      Thanks for your posts Beth and Sara. The more I look into this, the more I believe that Sara is right; I just don’t have 2G service where I live. I found an old Raven 2G modem, plugged it in and it couldn’t connect either. Even knowing that, I tried to run the script that Beth suggested but couldn’t get it to compile:
      error: ‘class Adafruit_ADS1115’ has no member named ‘readADC_SingleEnded_V’,
      adcVoltage = ads.readADC_SingleEnded_V(_dataPin);
      I think I need to learn PlatformIO and see if it finds better libraries. In the meantime, I’m going to start looking at 3G boards.

    • #12356
      Jim Moore
      Participant

      I can feel your pain, Cal. I am going to face the problem of data upload to the the cloud or whatever on some projects that I am contemplating. I have a Mayfly water sensor on my property and the 2G is working fine. Shannon has a small box that does a 2G site survey that we used before installation of SL149

      I think the larger concern will be how to upgrade all the existing Mayfly’s using 2G when that service goes the way of the dot-matrix printer!

      I got some input on this question from some colleagues and in summary 3G and 4G will be overkill in terms of data rate so it would be expensive. The other option might be ORBCOMM which is a low data rate store and forward system which might be more affordable.

    • #12362
      Cal
      Participant

      Does anyone know when 3G will be available on the Mayfly?

    • #12363
      Shannon Hicks
      Keymaster

      There are 3G and 4G modules that work just fine with the Mayfly. Are you meaning you want instructions on how to do it, or you’re just looking for the hardware?

    • #12366
      fisherba
      Participant

      Hi @ckillen, The Bee socket on the Mayfly makes it easy for the Mayfly to hook up with any radio with that connection/communication protocol. The socket can be used for several types of radios, including the 2G one that you have, WIFI radios, and the new XBee3 by Digi, that supports LTE-M communication (https://www.digi.com/pdf/ds_xbee3-cellular-lte-m.pdf). @w3asa, have you looked into this LTE-M radio? I think it will work with my existing hologram.io SIM plans and data rates.

      I think the XBee3 is the route to use if you are no longer covered by 2G. My understanding is that T-Mobile is keeping their 2G coverage until ~2020, but if you don’t have their coverage, it’s not going to expand to cover you in the next couple of years. Here’s a 2G coverage map: https://orion.freeus.com/coverage-map.aspx.

      I’ll keep plugging away on the instructional for logging to data.envirodiy, but it will probably be after September 10… because I have two proposal deadlines before then!

      Beth

      P.S. @ckillen Are you using a sensor with the ADS1115 chip? This is an analog to digital converter that shows up in ~3 sensors in the logging to envirodiy sketch. If not, your error message sounds like you need to “turn it off” by commenting those sensors out. I use “Command-/” after text is selected on my Mac. I suspect PC has a similar keyboard shortcut.

    • #12370
      Cal
      Participant

      Thanks Beth and Shannon, I’m finally getting a chance to get back to this.

      I’m NOT using any sensor with the ADS115 chip so I’ll go back to my 2G setup and comment out those lines of code. I’ll get back to you on my success/failure eventually.

      The Digi XBee3™ Cellular Smart Modem, LTE-M seems to be what I want in the long run. I just ordered one today. I’d gladly accept any information anyone has on setup, configuration, example sketches, etc.

      I have to hurry with this project now since it’s quickly getting cold in the far north. I want to get this deployed before the ice/snow comes.

    • #12376
      Cal
      Participant

      I just received the Digi Xbee3 that I ordered a week ago. Now I need a little help with a sketch to get me started. I tried using the code that Beth suggested (Logging_to_EnviroDIY.ino) but never got it to compile. Does anyone have a simple bring-up sketch for this module? You can contact me externally at ckillen@charter.net.

    • #12377
      Sara Damiano
      Moderator

      Which ADS1115 library are you using? Make sure you’re using the soligen2010 fork at https://github.com/soligen2010/Adafruit_ADS1X15/ – Don’t use the Adafruit original.

    • #12380
      Cal
      Participant

      OK – I’ve cleaned up my library problems as suggested. I’ve paired down the logging_to_EnviroDIY.ino to the bare minimum to check out the modem. I also turned on some debugging and I think I fixed a bug in the code that made it think it was connecting to a WiFi network. I know I got on the cellular network because it showed as active on Hologram.io but would not connect. I suspect I have a SIM card problem now. I’ll be contacting Hologram for help and a new SIM card (this one was borrowed from another modem I have). Thanks for all your help.

    • #12381
      Sara Damiano
      Moderator

      What was the bug you found?

    • #12387
      Cal
      Participant

      I ordered some parts and I’m back working on this. I have 4 each of Mayfly’s (v0.5b), Hologram SIMs, and XBee3’s (XB3-C-A2-UT-001). I’ve had a little trouble getting the library straight and I intend to learn and install PlatformIO, but for now I’m working on regular Arduino platform. I’m running Sara’s “logging_to_EnviroDIY” … I don’t know if it’s the latest version.

      Oh, the “bug” I reported last post wasn’t really a bug, but a choice between Cell and Wi-Fi in that code. I switched the commented line with the uncommented line:
      #elif defined(TINY_GSM_MODEM_XBEE)
      //modem.setupModem(&ModemSerial, modemVCCPin, modemStatusPin, modemSleepRqPin, ModemSleepMode, wifiId, wifiPwd);
      modem.setupModem(&ModemSerial, modemVCCPin, modemStatusPin, modemSleepRqPin, ModemSleepMode, apn);

      I’ve had some luck getting a BEE to attempt to connect to the network, because the Hologram website reports:

      {“linkid”:439623,”record_id”:385223430,”session_begin”:”2018-09-16 14:14:40″,”timestamp”:”2018-09-16 14:15:39″,”bytes”:0,”imei”:”35275xxxxxxxxxx”,”cellid”:4864,”lac”:20502,”network_name”:”AT&T Mobility”}

      However, the modem never connects. I added some more time and some AT commands to TinyGsmClientXBee getRegistrationStatus() to make sure the modem is ON and responding. I get some response to these commands, but I only get “22” response for status. The output:

      sending S# to get SIM num
      [16873422] <<< 894450030xxxxxxxxxx

      sending IM to get IMEI
      [16873504] <<< 35275xxxxxxxxxx

      sending OA to get APN
      [16873570] <<< ERROR

      sending MN to get operator
      [16873625] <<< OK

      sending DB to get signal strength
      [16873678] <<< OK

      sending AI to get status
      [16873732] <<< 22

      My cell strength (4G) is good here so I don’t think that’s the problem. I’ve tried different antennae too. I’m ready, willing and able to insert some debug code to find out what’s wrong if anybody has some ideas. Thanks for your help in advance.

    • #12390
      fisherba
      Participant

      Hi Cal, there’s a thread on GitHub about getting this thing up and running. Looks like others are having trouble as well. Perhaps contributing your debugging will help things along.

      https://github.com/EnviroDIY/ModularSensors/issues/162

    • #12414
      Cal
      Participant

      I’ve cut the trace at SJ13 and made the solder bridge to directly connect the LIPO battery to the modem. Now the LTE-M XBee doesn’t reply to anything – I’m sure it’s not powering on. Am I missing some switch or setting? I’m using some version of logging_to_EnviroDIY.ino.

    • #12488
      Sara Damiano
      Moderator

      Huh.. I don’t know why the XBee would entirely stop responding. Does it still respond on XCTU? Could you have accidentally put it to sleep?

      So far I have not managed to get my LTE-M XBee to connect to the internet with Hologram’s sims. I get denied service every time; sometimes quickly, sometimes after hanging at “22” (searching) for a long time. I’m having the same issue whether it’s on a Mayfly, connected to a PC and talking to XCTU, or connected to a PC and using a terminal with the USB direct access pins at AT commands.

      The same hologram sim works fine in a 3G XBee and my LTE-M XBee can connect to the network just fine when I put in my AT&T sim from my cell phone. But I cannot get the hologram sim to allow connection with my LTE XBee.

    • #12727
      Cal
      Participant

      After a sabbatical of several months, I’m now back working on the LTE-M XBee and I HAVE IT WORKING!

      For software, I’m using:
      – StreamDebugger
      – Parts of Diagnostics.ino
      – TINY_GSM_MODEM_XBEE
      – My own .ino

      My hardware is:
      – My XBee (Digi XBee3 Cellular Smart Modem XB3-C-A2-UT-001)
      – Mayfly 0.5b
      – Soldered SJ13
      – 3.7v Lipo battery
      – USB to Windows PC – no XCTU
      – Hologram SIM

      My network is AT&T, very weak signal in south Florida.

      Here are some items that helped me get over the hump:
      1. My XBee won’t communicate at any speeds higher than 9600 baud!

      2. I have to connect my battery AFTER I attach the USB to my PC. Otherwise the XBee won’t communicate at all.

      3. It takes anywhere from 6 to 20 minutes to connect to the network where I am. None of the software routines in the library that I’ve found will wait that long before starting over – creating an endless loop. The Hologram Dashboard showed that there was “some activity” every few hours, so I knew the XBee was trying. So I wrote my own code to give it more time and BINGO. I will see the dreaded “22” response to AT-AI (registering to network) for several minutes, then “25” (registration denied) for a while, then eventually “00” (connected).

      4. The next problem I found is either a timing bug in TinyGsmClientXBee.h or in some configuration that I don’t understand. In “modemConnect”, the code tries to determine the IP@ from a URL using the “LA” (Lookup Address). Unfortunately, the “OK” from the AT command precedes the IP@ in the serial response. The code ignores the IP@ and replies with IP@= 0.0.0.0. I modified the stream.readStringUntil statement to keep looking for the address which solved the problem.

      5. Now that I have most things working I’m going to try to get the XBee to sleep, so far unsuccessfully. I can see that most of the time the XBee is using about 2ma when just connected to the network. But every minute it briefly does some activity that burns a lot more power. Any help on this would be greatly appreciated.

      I’d be happy to talk with anybody more about my experience.

    • #12741
      BrianJastram
      Participant

      Cal,

      I have the hardware:

      Mayfly Datalogger v0.5b
      Digi XBee3 Cellular Lte-M/NB-Iot – XB3-C-A2-UT-001
      No antenna – 3 bars of AT&T on my iphone
      Soldered SJ13 and cut trace BEE-Vcc to 3v3 – 4.19V between Bee pins 1 and 10
      3.7v Lipo battery
      Solar panel from mayfly startup kit
      USB to Windows PC – XCTU installed but not implemented
      Hologram SIM activated

      Software is:

      logging_to_EnviroDIY with lines 53 (loggername), 54 (file name), 58 (registration token) 59 (sampling feature), 67 (BEE_TYPE = “gprs”), 68 (APN = “hologram”), and 321 (onboard_battery multiplier * 4.7 *) customized

      and I’m getting this message from the Arduino 1.8.8 Serial Monitor:

      09:44:27.286 -> — Request —
      09:44:27.286 -> https://data.envirodiy.org/api/data-stream/
      09:44:27.333 -> TOKEN: d02f68c0-2ed7-44e4-b912-d27c5aec74b0
      09:44:27.379 -> Content-Type: application/json
      09:44:27.426 -> {“sampling_feature”: “85e1d0c8-40dd-49ad-9a3a-6619a5500a6f”, “timestamp”: “2019-01-25T10:44:27-05:00”, “fec11d32-0658-4ef0-8a27-bdffa2104e31”: 26.25, “a7329b1b-b002-4fa8-afba-ae83b82ab8e9”: 4.94}
      09:45:08.974 ->
      09:45:08.974 -> Request to data.envirodiy.org timed out, no response from server or insufficient signal to send message.

      I’ve tried multiple iterations of connecting the battery to the board.
      My hologram dashboard shows the device state is live but there is no usage.
      My site on Monitor My Watershed shows ‘Sensors have no data’.

      I have a 900Mhz radio network setup here in the Minneapolis MN and I know those radios (RF450) need individualized configurations and I haven’t done that type of thing to the XBee3 yet.

      I would like to get this XBee3 connected and configured and get my data logging to the https://data.envirodiy.org/api/data-stream/ server.

      How can I fix this?

      • #12746
        mdean
        Participant

        Hi Brian,

        I’m in Minneapolis too and was just troubleshooting something similar yesterday. The main fix that I needed to make, along the lines of what Cal posted was increasing the timeout time in TinyGSM, which if I recall correctly was set at a minute. I increased it to 20 minutes to safely fall within the range of times that Cal posted. The Xbee3 consistently takes about 12 minutes to connect to the hologram network from my office (though I do have an antenna). I’ve seen on the Hologram forum that this could be due to both the NB-IoT and LTE-M being available to the modem on startup. As an aside, I plan on trying to send AT commands to specify LTE-M and AT&T to speed up connection times (it’s a drag to wait 20 minutes every time you troubleshoot).

        I also observed the need to define the modem serial at 9600 baud like Cal did (confirmed in the Digi documentation that 9600 is the default for the Xbee3).

        Since you aren’t seeing data usage on Hologram, I wonder if one of those points (connection timeout or serial setting) might be the problem.

    • #12748
      BrianJastram
      Participant

      mdean,

      I want to try those things but don’t have enough experience yet to know exactly how. When you reference TinyGSM (increasing the timeout time) what exactly do you mean by TinyGSM? And defining the modem serial at 9600 is understandable except I don’t see where to do that (in my logging_to_EnviroDIY sketch or in a different sketch that sets up the modem)?

      I feel like I’m close.
      Thanks for your input.

    • #12749
      Cal
      Participant

      Brian,

      I feel your pain. I tried to get started months ago with logging_to_envirodiy and gave up. I believe the code is at too high a level to understand what is going on, what’s working and what’s not. You really need to get some “bring-up” software in place to be able to write AT commands and see the XBee respond. That’s why I went with the software noted above and then wrote my own. Here are a few specific suggestions:

      1. Get an antenna for your XBee. I don’t think it will ever connect without one.

      2. Get the Digi manual for your chip: Digi XBee3® Cellular LTE-M/NB-IoT, https://www.digi.com/resources/documentation/digidocs/PDFs/90002258.pdf. Read as much as you can stand. You are going to reference it over and over.

      3. Make sure you have TinyGSM library installed in your libraries folder

      4. Start with the “Diagnostics.ino” sketch under libraries/TinyGSM/Diagnostics. Set the right parameters.

      5. No doubt it will fail quickly – so you can write your own AT commands to start getting some response from your modem. ex.
      modem.sendAT(GF(“AP”)); // test airplane mode
      modem.waitResponse(200,at_out) ; // response will be 0=off or 1=on

      modem.sendAT(GF(“AM0”)); // set airplane mode off
      modem.waitResponse(200) ;

      6. Have “TinyGsmClientXBee.h” and “TinyGsmClient.h” open in an editor to see what routines “Diagnostics.ino” is using and what AT commands are set.

      7. Little-by-little you will start to understand all the things that have to be done in what order to get the modem to work AND what things are failing and why.

      I can send you my code that works for me if you want. Write me at ckillen@tia-software.com

      Cal

    • #12750
      Cal
      Participant

      Mdean,

      When I went to Carrier Profile 2 (at&t) instead of CP 0, my connect time decreased by about 1 minute. Not a huge improvement. I’m hoping my long connect time is due to poor cell signal or bad configuration – and not a modem problem. I’m going to try to travel to a better area this weekend and see if I get connected faster. I’m also interested in trying an AT&T SIM card to see if that improves things. I think I can get one to test for a short time.

      Cal

    • #12751
      Sara Damiano
      Moderator

      Ugh. I’m sorry you’re having so much trouble understanding what’s going on in ModularSensors. It’s a very heavy-weight library.

      While you’re deep debugging your modem connection, though, sticking to TinyGSM and a basic sketch, or even just XCTU, is probably the way to go.

    • #12754
      Sara Damiano
      Moderator

      I’ve spent a lot more time playing with the LTE-M XBee3 so I think I can help a bit better now.

      I cannot get it to connect without the solder jumper – it just needs the extra uumph. And the antenna is also definitely not optional.

      No matter what I do, it sometimes stops responding. I’m seeing this whether I have it powered off the mayfly or if I have it on a separate Skywire development board, so I don’t think’s a capacitance or brown-out problem. Putting it to sleep and waking it again seems to magically resolve it.

      Setting the network technology (“N#) to 2 (LTE-M only) seems to speed the connection up dramatically for me. On waking from sleep it will connect in comfortably under a minute.

      And, acting against the manual, I’ve found I can connect even faster and it flakes out less if I put the thing in bypass mode and tell TinyGSM it’s a u-blox (which it is). Go figure.

      To put it into bypass mode you set AP5, WR (write changes) and then FR for a force reset. It doesn’t enter bypass until after that.

    • #12755

      @srgdamiano, that is great news. Do your recent discoveries lead to a clear path for getting this to work with ModularSensors on the Mayfly?

    • #12756
      Sara Damiano
      Moderator

      I’ve made some tweaks to try to make the LTE XBee work better. Code wise, it should have already been working, though. The problem was more about slowness/inability to make a connection to the internet and periodic non-responsiveness. That problem is somewhat upstream of ModularSensors.

    • #12761
      Jim Moore
      Participant

      I noticed that Atlas Scientific sensors are not in the ModularSensors list. I have built two EC sensor stations that are currently deployed in Great Marsh primarily to monitor stormwater runoff from the Pa Tpk. Scott Ensign has suggested I write this project up in more detail. Sara, are you interested in adding these sensors to ModularSensors if so I can give the code and details for this project?

      Currently these EC stations are storing the data on a sd card only. Access to these stations can be a bit challenging to say the least especially in this weather!

      I recently purchased some XBee’s from Sparkfun and have been able to get them talking to each other using the serial passthrough example code loaded on a Mayfly. I have checked out the range of the XBee Pro (60 mW) and I think they have the range to talk to a central location using the XBee’s ‘out of the box’ configuration.

      I am looking for any code examples for using XBee for end to end comm. Basically I want to send data to a central station station when ever the mayfly wakes up and takes
      EC and temperature data.

      On the hardware side has anyone had experience connecting an SMA conector to the XBee board with the attached whip antenna? The distances involved are about 1 KM LOS so will probably need some gain antennas since I am quite sure the little whip antennas wont quite cut it.

      I attached a dropbox link to brief report on the deployment of the EC/temp stations

    • #12764
      Adam Gold
      Participant

      I’m having a similar problem with the LTE-M Xbee3 that folks in this forum have already described, but slightly different. I have the same hardware as Cal and Brian, but I have a Taoglas LTE-M/NB-IoT antenna. Using the menu_a_la_carte.ino from Modular Sensors, the modem will throw a lot of “NO RESPONSE” messages while trying to synchronize with NIST, and the cell signal strength and % will be displayed as -105 and 12 when written to the SD card. It is getting a good amount of signal when I connect the modem to XCTU with an XBEE explorer-type board, but it takes a few minutes to connect. I tried using some simple code with AT commands that was posted in the “Trouble Initializing XBEE LTE-M” forum to wake it up and reset defaults, but it only responds about half of the time to the “+++” commands and never responds to AT commands with StreamDebugger.

      I switched from using the main branch of Modular Sensors to the develop branch, but I got the same kind of response. I then changed up some of the “timeout” values in “TinyGSMXbee.h” and got this response:

      Sending data to data.envirodiy.org
      08:54:25.650 -> POST /api/data-stream/ HTTP/1.1
      08:54:25.650 -> Host: data.envirodiy.org
      08:54:25.650 -> TOKEN: [my token]
      08:54:25.650 -> Content-Length: 402
      08:54:25.650 -> Content-Type: application/json
      08:54:25.650 ->
      08:54:25.650 -> {“sampling_feature”: [my sampling feature]}
      08:54:25.650 ->
      08:55:17.649 -> — Response Code —
      08:55:17.649 -> 504

      I could see that the modem was trying because the Hologram Dashboard showed activity, but my values for cell strength were all zero. I modified some code in EnviroDIYPublisher::sendData to try and increase the waiting time for a response from the data portal:

      After this change, I got a similar response, but there are no “NO RESPONSE” codes, a “Bad timestamp, not setting clock.” message, and my data were sent to the portal once. Every time after that initial upload to the data portal, I will get a 504 response code. The cell strength and % were still reported as zero even when it uploaded to the data portal. Output showing initial successful upload:

      Setting up sleep mode on the XBee.
      08:46:28.963 -> [2797] ### Modem: Digi XBee3™ Cellular LTE-M
      08:46:29.308 -> Attempting to synchronize RTC with NIST
      08:46:29.308 -> This may take up to two minutes!
      08:47:06.473 -> Bad timestamp, not setting clock.
      08:48:01.713 -> ——————————————
      08:48:18.506 -> Successfully connected to SD Card with card/slave select on pin 12
      08:48:18.540 ->
      08:48:18.540 -> \/—- Line Saved to SD Card —-\/
      08:48:18.540 -> 2019-02-01 08:48:00,2,-9999,11025,4.761,30.25,0,0
      08:48:18.574 ->
      08:48:18.574 ->
      08:48:26.027 ->
      08:48:26.027 -> Sending data to data.envirodiy.org
      08:48:42.099 -> POST /api/data-stream/ HTTP/1.1
      08:48:42.099 -> Host: data.envirodiy.org
      08:48:42.099 -> TOKEN: [My Token]
      08:48:42.099 -> Content-Length: 402
      08:48:42.099 -> Content-Type: application/json
      08:48:42.099 ->
      08:48:42.099 -> {“sampling_feature”:[My sampling features]}
      08:48:42.099 ->
      08:48:45.941 -> — Response Code —
      08:48:45.941 -> 201

      Does anyone have code that consistently works with the LTE-M Xbee3 or suggestions on how to proceed? I am hoping to have a total of 10 stations that each have an LTE cell modem so they will work for a long time, and I don’t want to invest in the LTE-M Xbee3s if they’re not dependable. Are there other LTE cell modems that are known to work easily with a Mayfly like the Digi 4G LTE Xbee or the Digi 4G LTE-Cat1 Xbee3?

    • #12766

      @srgdamiano, thanks talking to me on the phone Wednesday afternoon, explaining to me all your recent advances and successes.

      All, I just answered that question on GitHub here: https://github.com/EnviroDIY/ModularSensors/issues/162#issuecomment-459879699

      Here it is, also pasted below.

      From what I understand, to get the Digi XBee3 LTE-M module to work on the Mayfly with Modular Sensors, it is necessary to:

      1. Use “Bypass” mode to directly interact with the UBLOX modem chip, bypassing Digi’s chip, rather than using the standard “Transparent” mode, which would cause full freezes (probably due to power instabilities because there isn’t a capacitor chain on the Digi LTE-M module or the Mayfly).
      2. Turn off the NBIoT radio to speed up the connection, by setting the network technology (“N#) to 2 (LTE-M only).
      3. Turn off Power Saving mode, because this mode interacts with the network regarding when it will wake again, and if that doesn’t match the logging interval that we give it, it becomes impossible to wake up the modem when we need it.

      @SRGDamia1 has implemented these changes in the current develop branch:
      https://github.com/EnviroDIY/ModularSensors/commits/develop

      She’s had it working since her Jan. 29 commit, be9e2eb, but she’s been working on improvements since then.

      This solution still isn’t perfectly stable, because of the following hardware issues (which could all be addressed by an Xbee adaptor shield that I would like to build):

      • Neither the Digi XBee3 LTE-M module or the Mayfly have the recommenced capacitor chain on the Xbee power line. This is the likely culprit for brownouts.
      • Benefit of optionally switching Xbee-Mayfly pin connections for the “status”, depending on radio module
      • The Mayfly doesn’t have a means to separately reboot or power-down the Xbee module
      • The Mayfly doesn’t set all the unused pins to Ground, which would be ideal for broader radio compatibility, with for example the Nimblelink Skywire.

      The new SODAQ SARA UBEE R410M radio module, https://shop.sodaq.com/sodaq-sara-ubee-r410m.html, has the same UBlox SARA-R410M radio chip as the Digi XBee3 LTE-M module​, but it also has a built-in capacitor chain, which could substantially improve the stability when deployed with the Mayfly.

      Sara, what did I miss?

    • #12774
      Sara Damiano
      Moderator

      I just want to be really clear that the very slow connection speed and non-response is A PROBLEM WITH THE XBEE ITSELF, NOT THE CODE.

      The messages like “no response received” are merely letting you know that the Bee is not responding.

      There is nothing I’ve done in the code recently that changed it from “not working” to “working” with the LTE-M XBee3. I’ve done a lot more testing and tweaks to make it work better, that’s all. The basic code has been working as long as the module has been available.

    • #12775

      @srgdamiano, thanks for making it really clear that the issues folks have been facing are primarily on the side of Digi’s LTE-M XBee3 hardware/software, and the work you’ve done with the ModularSensors code are all work-arounds to deal with the instability of Digi’s LTE-M XBee3 hardware/software when running on the Mayfly hardware.

      I had failed to clearly convey that message in my previous post. Sorry about that!

    • #12782
      Dave
      Participant

      Hi everyone,

      Very quick question. Something I didn’t see listed in the above replies has to do with antenna selection. Anthony or Sara, do you have a recommendation as to an antenna for one of the new Digi LTE-M Xbee3’s? We have had really good success with the 900mhz xbees and are now working on projects where there is cell service, so we’re exploring these new options.

      Sincerely,

      Dave

    • #12784
      Sara Damiano
      Moderator

      I haven’t done any comparisons, but I bought Taoglas Maximus FXBU66 antennas and they seem to work quite well: https://www.taoglas.com/product/maximus-fxub66-ultra-wide-band-flex-antenna-smam/

    • #12786
      BrianJastram
      Participant

      Dave,

      I bought the PulseLarson W3554B0140 RF ANT 829MHZ/2.2GHZ PCB TRACE (https://www.digikey.com/products/en?keywords=553-2574-ND) and I’m pretty sure it works. It looks like the one that comes with the Development kit (https://www.digi.com/products/models/xk3-c-n1-ut-e).

    • #12886
      Cal
      Participant

      After a few months of successful communication with the DIGI XBee3, I am now starting to get failures with longer and successive Internet messages. Delays between sending messages helps.

      I believe the problem is power related even though I’ve made the solder jumper. Once the XBee fails to transmit, I have to power-cycle it or airplane mode on/off to get out of the lockup. I’m invested in modules and software, so I need to make this solution work this summer rather than to start over with some other modem.

      I think I should be able to solder an additional jumper wire or a capacitor from somewhere on the Mayfly to the Bee socket to increase the power supply to the XBee. Does anybody know if this would work? If so, where should I make the connections? How big of a capacitor?

      Cal

    • #12887
      Sara Damiano
      Moderator

      There’s a known bug from Digi that any of the XBee3’s with revision “B” of the primary processor, where it will become unresponsive even with very short dips or irregularities in voltage: https://www.digi.com/resources/documentation/Digidocs/90002258/#Troubleshooting/ts_brownout.htm%3FTocPath%3DTroubleshooting%7C_____7

      I don’t know about the capacitors though. A manually soldered capacitor chain might create more problems than it solves. https://nimbelink.com/Documentation/Skywire/1001619_Breadboard_WhitePaper.pdf

    • #12888

      Sara, thanks for your link to the bug on the XBee3 LTE-M RF Module. That is helpful to know that some of the issues folks have experienced were due to a known hardware bug. Do you know if the hardware fixed modules are available to purchase yet?

      Also, regarding your concern about adding a manually soldered capacitor chain, your link describes why it wouldn’t be a good idea using a breadboard, or probably even the SparkFun Breakout Board for XBee Module, because the power traces are undersized to transmit those short bursts of high-amp power. However, it seems that manually soldering capacitors into an appropriately-sized power line would likely work, right?

    • #12889
      Shannon Hicks
      Keymaster

      I bought some of the Xbee3 LTE-M modules a few weeks ago and they had hardware version D printed on them, so they appear to be the latest version. I also updated their firmware to a version that came out a few weeks ago which supposedly has some improvements too. Digi also states in the manual several time (including with big warning symbols) that Bypass mode has been deprecated and should not be used because it causes instability in the cellular connectivity. So I’m now switching ours over to transparent mode to see if they are more stable. Previously in Bypass mode, I had the same issue that Cal did where things would work fine for a few days, but then the module would stop responding and require me to reset it. I’m hoping that operation in transparent mode will be better.

      Something else that I discovered lately is that because of the workaround we did with using the SJ13 option for powering the Bee socket pin 1 directly from LiPo is that the module is now constantly powered. This is great as long as the Mayfly is turned on and can put the LTE-M bee to sleep by asserting the bee’s sleep pin high. The Mayfly is able to keep that pin high even when the Mayfly is asleep (if you write your code correctly). However, when the Mayfly gets turned off at the main power switch, the Bee module is no longer kept in sleep mode by the Mayfly, so it wakes up and stays on permanently until someone turns the Mayfly back on. The LTE-M bee draws about 7ma when idle, so it’ll drain a battery after a short while if you don’t have a solar panel connected. So for now, I just remove the Bee module from the socket when I turn the Mayfly off. It’s possible that you could solder a pullup resistor to the bee sleep pin, but that gets messy and could cause other issues. So our next version of the Mayfly board will incorporate some new changes to how all the Bee socket stuff is handled to fix this problem and to add some other functionality.

Viewing 37 reply threads
  • You must be logged in to reply to this topic.