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

Trouble initializing XBee3 LTE-M

Home Forums Mayfly Data Logger Trouble initializing XBee3 LTE-M

This topic contains 18 replies, has 5 voices, and was last updated by  neilh 2 weeks ago.

  • Author
    Posts
  • #12612

    Dan
    Participant

    I recently successfully set up a MayFly with GPRSbee radio. It works great.

    I’m trying to get a second MayFly working with the Digi XBee3 LTE-M radio. This is on hologram, using a brand-new SIM card, which I understand should be possible. I’m not sure if I’m getting to that point, since even initializing the radio doesn’t seem to work 100%. I understand there is no soldering needed with this radio, and there is no JST connector as there is on the GPRSbee, so I’m not sure if there is a power issue… Anyway, with

    #define MODEM_DEBUGGING_SERIAL_OUTPUT Serial
    #define TINY_GSM_DEBUG Serial

    enabled, I’m getting output like this:

    So far, so good. Then, when trying to sync with NIST, I get:

    And then lots and lots of NO RESPONSE! lines until the 120 seconds is up. Am I missing something major here? Thanks.

  • #12613

    Dan
    Participant

    OK, looking at the GitHub issue, it looks like I may need to Solder SJ13 after all…?

  • #12615

    Shannon Hicks
    Keymaster

    The Mayfly’s bee footprint was originally set up to only power modules that require moderate current supplied to the Vcc pin of the module, such as Xbee RF modules (900Mhz and 2.4Ghz), Bee wifi, and Bee bluetooth. There are even GPS modules with the Bee footprint that work great on the Mayfly. Then when we started using 2G and 3G cellular modules from SODAQ, they have their own separate JST sockets for connecting them directly to the LiPo battery, thus supplying sufficient voltage and current (they require ~3.7v and up to 2A). But other brands of cellular boards, like the Digi 4G board, don’t have the external power connection option, so the only way to power them is through the Bee header on the Mayfly, which is why I added the SJ13 option on the latest v0.5b Mayfly boards. So just cut the small trace that’s connecting the center pad of SJ13 (labeled BEE_Vcc) to the 3v3 pad, and put a solder bridge joining BEE_Vcc to the pad labeled LIPO.

  • #12617

    Dan
    Participant

    Thank you Shannon.

    OK, I cut the trace and confirmed no continuity between BEE_Vcc and 3v3 at SJ13. Then I made a solder bridge between BEE_Vcc and LIPO. I have ~4.1V between GND and LIPO/BEE_Vcc.

    The modem powers up and is evidently powered by the battery now but I still end up with the NO RESPONSE messages…

  • #12621

    Sara Damiano
    Moderator

    I’ve usually seen that “no response” pattern with the 3G XBee’s without the solder jumper. I’ve assumed it was them “browning out” as they tried to connect to the internet. With those, switching the solder jumper seemed to fix the problem. Have you been able to connect to the internet at all with the LTE-M XBee? Is it working attached to a computer with XCTU?

  • #12641

    Sara Damiano
    Moderator

    I’ve spent more time fiddling with the LTE-M XBee and I’m seeing the same results.

    It’s a hardware problem, not software; the modem really does stop responding. I wonder if it’s that there’s not enough capacitance along the power line causing very short voltage drops even when it’s tied right to the battery. The user guide for the LTE-M XBee specifically warns that the main control board on the XBee can become unresponsive after power dips and will need a full power-cycle to get it back. Oddly, though, I’m having it start responding again without actually power cycling it.

    I have a Skywire development board that has more capacitance on the power line. I’ll fiddle with it and see if I’m having the same issues.

    @shicks?

  • #12655

    Dan
    Participant

    Well, I have regressed even further. Now I can’t even get the modem to turn on. I confirm ~4.2V between pins 10 and 1 on the Xbee, so it is definitely getting power (and from the LiPo to boot) but it is no longer responding to the first initialization in e.g. logging_to_EnviroDIY.ino. Unforunately I don’t have any development board other than the MayFly to test on. Am I missing something major here?

  • #12658

    Sara Damiano
    Moderator

    My first guess would be that you put it to sleep and it won’t wake up.

    Can run a really simple script just to hold the pins to wake it up and allow you to type in commands from your serial port monitor?

  • #12659

    Sara Damiano
    Moderator
  • #12670

    Dan
    Participant

    Thanks Sara. The modem responds with an “OK” to the “+++” in setup() but once it’s in the loop it does not respond to anything I type in the serial monitor (AT commands, +++, etc). That’s the purpose of the StreamDebugger, right?

  • #12673

    Sara Damiano
    Moderator

    Yes, that’s what the streamdebugger is supposed to do.

    Hmm.. try forcing a reset to all default values. The TinyGSM library drops the timeouts for xbee communication really low, which is great for the mayfly sending commands, but not as good for human typists.

  • #12674

    Sara Damiano
    Moderator

    The default settings allow up to 10 seconds before it times out and drops you out of command mode and has a 1 second “guard” time around the +’s to get back in. TinyGSM cuts the guard down to 100ms.

  • #12731

    Cal
    Participant

    Sometimes I get the XBee into a mode that won’t respond to AT commands. It has something to do with the sequence of bringing up power to the Mayfly and power to the modem. To get out of this mode, I’d like to try to programmatically “reset” the XBee modem via it’s reset pin #5. In the wiring diagram of the Mayfly, it shows a small circle around that pin as if there is some way to make a connection to it with a wire/digital output…but I can’t find anything on the board. Do you know if/how I can do this?

  • #12732

    neilh
    Participant

    I’ve also had this problem with the Xbee S6 WiFi. However I’ve lowered the polling rate and a few other tweaks of the TinyGSM and its been better https://github.com/neilh10/TinyGSM.
    @cal the Mayfly 0.5b schematic diagram of the U6/XBEE-1XBEE-1_LOCK shows the RESET pin5 – the schematic symbol of circle on the mainbody is typically a way of indicating the RESET is pulled low to activate it, also sometimes indicated as -RESET.

    I’d be interested in the solution for where to connect the Xbee reset line to the Mega1284 – but haven’t tried any options yet.

  • #12747

    Sara Damiano
    Moderator

    Neil’s right about the symbol – it’s a reset-not pin – pull it low to reset.

    But… it’s not connected to anything else on the board, so you can’t pull it in any direction without some hacking. You could use the pin stubs on the back of the board to solder on a wire to connect the bee reset pin to some processor pin. The Digi documentation recommends putting a capacitor near the reset pin to prevent any resets from noise.

  • #12759

    Sara Damiano
    Moderator

    Shannon soldered a jumper on a board for me to connect the reset pin to a data pin on the Mayfly’s mcu so I could try it with the XBee. Unfortunately, it won’t work if you’re powering the XBee off of the battery (ie, w/ solder jumper 13). Erm… or rather, unfortunately, the board I had her put the jumper on seems to have gone very flakey. It works on a different board.

  • #12768

    neilh
    Participant

    Oh good to hear it works.
    What pin are you using on the Mayfly.? I could see the references in the code on modemConnect() but couldn’t find any designation.

    One of the problems is that the ATmega1284 doesn’t have any 5V compatible pins, so it may cause some unpredictable behaviour if it pulls the mega1284 pin up too hard – which depends on the Xbee.

    One way would be to decouple with a NMOSFET with low drive voltage – eg with legs/TO92-3 TN0702N3-G – it turns on between 0.5-1V
    https://www.digikey.com/products/en?keywords=TN0702N3

    https://ww1.microchip.com/downloads/en/DeviceDoc/TN0702%20C080813.pdf
    It doesn’t need an R on the Gate where it interfaces to the micro, and probably doesn’t needs a pullup on the Drain, as there may be enough pull up in the Xbee – otherwise I would recommend a 10K-1M R. Its only activated for short period of time so the R doesn’t really matter – except it must be low enough to guarentee that the MOSFET turns OFF.

    How To Use MOSFET – Beginner’s Tutorial

  • #12773

    Sara Damiano
    Moderator

    The XBee’s are all 3.3V logic levels.

    I used pin A4.

  • #12779

    neilh
    Participant

    Thanks.
    The cct V0.5b shows an option of connecting the Xbee to the LiIon V_bat – which can get to 4.2V – and a very nice low impedance for the Cellular Tx power requirements.
    So if the Xbee-V1-UT/XB3-C-A2 Cellular @ 4.2V was pulling up, that would over drive the mega1284 pins above their Vcc (3.3V).
    At some point the megas1284 protection diodes start to conduct. The issue not stated in the Xbee docs is if there is a -RESET pullup. If there is no pull-up, or its week (greater than 100K) its probably workable.

You must be logged in to reply to this topic.