Home › Forums › Mayfly Data Logger › Cannot connect to internet for clock sync with NIST
- This topic has 13 replies, 4 voices, and was last updated 2020-02-11 at 9:05 AM by Heather Brooks.
-
AuthorPosts
-
-
2020-02-09 at 10:24 PM #13771
Hello
After some frustration in trying to log data to ThingSpeak, I decided to give logging to MMW a shot since I have everything. I am happy to report that I have gotten further into the process, but not quite all the way yet
Setup:
-Xbee3 LTE-M modem
-LTE Adapter
-LTE Antenna, connected to the cell jack
-LTE jumpered to the ‘secondary’ LiPo port
-LiPo connected to ‘primary’ port
-Mayfly ver. 0.5b
-Solder jumpered SJ13 Bee_Vcc to board 3v3.
-using logging_to_MWW.ino with a modified variable list to reflect what I have on hand.
-Brand new hologram SIM card
-apn = “hologram”
-I am confident in the accuracy of my UUIDs, but I never make it that far!
-Using ModularSensors Library version 0.23.16
-Battery voltage = 4.94vdcI dont get very far into the process, however; this is what I receive via the terminal:
“This logger has a variable array with 5 variables, of which 5 come from 4 sensors and 0 are calculated.
Sampling feature UUID is: XXXXbdf7-XXXX-474f-XXXX-05d5a768XXXX
Logger portion of setup finished.[3538] ### TinyGSM Version: 0.9.19
[8073] ### Modem: u-blox SARA-R410M-02B
[8073] ### Modem: u-blox SARA-R410M-02B
[8292] ### Modem: u-blox SARA-R410M-02BAttempting to connect to the internet and synchronize RTC with NIST
Could not connect to internet for clock sync.
Setting up sensors…
Data will be saved as IntStrm_Test_2020-02-09.csv
Putting processor to sleep”I am using a board that I have preciously sync’d the RTC, but I didn’t think that this would be cause for issue. It does log the data to SD as advertised, which is somewhat reassuring.
What is most alarming to me is that the blue “ASSOC” LED is always illuminated when the board is on, never blinking, only a solid light. However, both the ON and ASSOC LED’s turn off/on when the mainboard does.
I never see any orange light from the RSSI LED, and the values I record to SD reflect 0(zero) for both RSSI and signal strength. Which would make sense with zero connectivity.I have found some discussions about pretty much the same thing. When I add the flags to the .ini file, it gets upset about the “modems/DigiXBeeLTEBypass.h” line in the setup for the modem. No idea why. When I remove the debugging flags, it removes the red squiggle and seems happy enough to compile.
I have read about the pile of dead Xbee3’s that is over at Stroud, do I have a dud? Is there anything I can do to force the modem to do something?
I know that this is a lot to unpack, but any help would be appreciated.</p>
-Evan -
2020-02-10 at 12:23 AM #13772
Did you activate the SIM card with Hologram? If the orange RSSI LED light isn’t coming on, then you aren’t getting any cell reception. Once you do get cell reception, the orange LED will come on (and its brightness is indicative of the strength of the signal). And a few seconds after the orange light comes on, the blue light will start blinking, which shows that you’ve successfully joined the network. The problem we’re having with several of the “dead” LTE modules is that seem to lose the ability to join the network (blinking blue LED) after a few weeks or months in use. None of them have the issue of no orange LED. I’ve only seen instances of no orange LED when there was no antenna attached, the antenna had a bad (loose) connector, and using the module where there was no AT&T or Verizon LTE signal. Have you tried communicating directly with the Xbee LTE module using X-CTU to verify any of its settings or updating its firmware?
-
2020-02-10 at 8:10 AM #13773
Hi Shannon, thanks for responding!
I have registered my SIM with Hologram and the antenna is securely connected. You mentioned somewhere to be careful about the ufl connectors on the antenna coax line, and youre not kidding, smallest coaxial Ive seen.
It could totally be where I am working, though I receive LTE on my cell so I assumed the modem would too. But, I use a different carrier than the Hologram network rides on, maybe?
I imagine the RSSI indicator to act as the solar indicator on the Mayfly. *Cue me walking around staring at the adapter to find the optimum signal.* Thats good to know.
I have not yet tried reaching out directly to the modem, I will dig into that now and report findings.
Apparently my attachments didn’t make it through. If anyone is interested, Ill share what Ive got, but I think the program is sound.
Thanks again
-Evan -
2020-02-10 at 10:09 AM #13775
I’ve tried to connect to my modem via XCTU, and from what it is telling me, there is not an active bootloader on the module. Great!
It states that it cannot find a radio module on the selected port, the only device plugged into my machine. After failing to locate the radio, it prompts me with the option to use a recovery tool, when it then tells me there is no boot loader…Familiar with this hurdle? Is there anything I can do with this?
I’m reaching out to Digi Technical services to see what’s up. -
2020-02-10 at 10:45 AM #13776
What kind of carrier board or adapter board are you using between your PC and the Xbee LTE module?
-
2020-02-10 at 1:52 PM #13778
No active bootloader is… bad. Are you trying to talk to the XBee3 by way of the Mayfly or do you have a separate adapter board (like the Digi development board or a UartSBee or something similar)? It’s not impossible to use the Mayfly as a carrier board to connect your XBee3 to XCTU, but it won’t work that way “out of the box.” The LTE adapter board does something different.
If you’re using the LTE adapter board you shouldn’t need SJ13. That power jumper between the adapter board and the Mayfly doesn’t the same thing.
I don’t think the RSSI light is “on” by default. It’s one of the “options” for pin 6; the ModularSensors code should tell the XBee3 that that’s the option it wants. But even when selected I’ve never seen the RSSI light up until *after* you’ve joined the network (and the assoc has gone from solid to “standard single blink.”
-
2020-02-10 at 2:11 PM #13779
We haven’t figured out why we’ve had such a high failure rate with the LTE-M XBee3’s. It’s pretty discouraging.
I know there was an upload issue with the outputs you tried to post. (I think our wonderful webmaster is working to allow ino files to be posted.) But from what you did post, if TinyGSM was able to tell you that the modem was a “u-blox SARA-R410M-02B” it can only have done that if it succeeded in asking the modem for its name. That means your modem is definitely *not* completely broken and it must have an active bootloader even if XCTU can’t find it.
And what I said above about the assoc/rssi lights only applies if you’re running the XBee3 in “transparent” mode. You’re running in “bypass.” The assoc and RSSI lights do not work in bypass mode. The assoc light will probably never start to blink even after you’re connected and the RSSI light will stay off.
-
2020-02-10 at 2:46 PM #13780
Webmaster chiming in about the uploads issue. It should be possible to upload .ino and .txt files now. Unfortunately, it looks like .ini is not a mime type I can allow to be uploaded to the media library.
@charlesbrown, can you please try to upload your .ino again? -
2020-02-10 at 2:47 PM #13781
I heard back from Digi tech support and heard the same. I cant use the Mayfly as the middle man, Digi’s own dev board is another $70…is it expected that anyone who wants to use an XBee to also pick up a $70 protoboard to troubleshoot?
Hmmm, thats a good point about the modem not being totally spent, ill verify that it still spits out that info later tonight. It would be nice if it wasn’t completely gone.
Interesting about the lights, maybe thats a good thing and all is acting as it should.But, what about the lack of internet connection? If there is the potential that the lights are acting as they should, and the modem may be just fine, what else would inhibit the internet connection? Supposedly, I am surrounded by a sea of LTE coverage, so that shouldn’t be a problem.
Short of spending another $70 for a protoboard to diagnose the modem, any other thoughts to get this modem alive? Ill go camp at my local coffee shop if you think it’d help.
Evan
-
2020-02-10 at 2:48 PM #13782
-
2020-02-10 at 4:39 PM #13786
You shouldn’t really need the development board. If you’re going to use a bunch of the XBee’s I’d say it’s a $70 well spent, but you shouldn’t *need* it.
Nothing looks wrong in your program. I’m guessing you’re just not connecting to the internet. What build flags are you running with? Can you set all of these and post the log from the serial port monitor:
INI12345678910111213build_flags =-DSDI12_EXTERNAL_PCINT-D TINY_GSM_RX_BUFFER=64-D TINY_GSM_YIELD_MS=2-D TINY_GSM_DEBUG=Serial-D MS_LOGGERMODEM_DEBUG-D MS_LOGGERMODEM_DEBUG_DEEP-D MS_DIGIXBEE_DEBUG-D MS_DIGIXBEECELLULARTRANSPARENT_DEBUG-D MS_DIGIXBEECELLULARTRANSPARENT_DEBUG_DEEP-D MS_DIGIXBEE_DEBUG-D MS_DIGIXBEELTEBYPASS_DEBUG-D MS_DIGIXBEELTEBYPASS_DEBUG_DEEPThe output might be very long; you’ll probably see a _lot_ of lines that are AT+CEREG? and responses to that. That’s the Mayfly asking the cellular chip on the XBee3 if it’s registered on the network yet. If you eventually get a +CEREG=5 (or 1), you’re registered. If the response is still a 2 or 4 you’re not registered with the network. If you get as far as being registered and then you’re still not able to post data, that’s a problem with your code or my library. If you’re never registered, it’s the bee or the sim.
Some things to try if you’re not getting registered:
- Increase the time
modem.connectInternet(120000L)
up to 10 or 15 minutes (it’s in ms, 120000L = 2 minutes; 600000L = 10 minutes, the “L” tells the compiler it’s a “long” number). Making the initial connection with a new sim/board/tower may take a really long time.
- Flip back and forth between using “bypass” and “transparent” mode. See if one works.
- Run a basic program on your Mayfly that just wakes up the bee and leaves it awake. Let it sit a long while and see if you ever connect. Something like this should work:
-
C++12345678910111213141516171819202122#include <Arduino.h>void setup(){Serial.begin(115200);Serial1.begin(9600);pinMode(23, OUTPUT); // make sure the XBee is awakedigitalWrite(23, LOW);}void loop(){delay(1000);Serial1.print("+++"); // Enter command modedelay(1000);Serial1.print("ATAI\r"); // Ask if we're connected to the networkwhile (Serial1.available()){Serial.write(Serial1.read());}delay(300000L); // wait 5 minutes before asking again}
If you eventually get a “0” (zero) response, you’re finally connected. A “22” or “FF” means it’s searching or the status is unknown. A “25” means registration has been denied – if you get that, your APN that you set in your other code must have been wrong – I doubt you’ll get this.
- Increase the time
-
2020-02-10 at 10:25 PM #13788
Hi Sara,
Thanks a lot, this seems like the right direction.
After adding those flags, I am seeing a lot of:
+CREG: 0,2
OK
Which, by your notes, means I have no connection. This is great because it is keeping with the theme, I like the consistency.I adjusted the time the board to allow the modem to squawk before timing out up to 10 minutes, and so far to no avail.
Tonight I am going to let that basic program run and lets see how long it needs to find the network.Thanks a lot Sara, Ill share what I find.
-
2020-02-11 at 8:31 AM #13789
I am happy to report that everything seems to be working!
Sara, the program you provided didn’t seem to do anything? It compiles fine and is accepted by the board, but there doesn’t seem to be output? But, I did do what you suggested in letting it just sit there and let it attempt to connect.
I set modem.connectInternet(960000L) (16min) and set myconst uint8_t loggingInterval = 20 (20min), and then I went to bed. It hopped onto the network only ~10min after I put it down for the night…
It was a pretty great way to start the day seeing my data online!Thanks a lot for everyone’s help, and for the awesome documentation on Git. I would not have made it to this point without it.
Now the real fun begins.
I am going to do a quick write-up about my logger and its purpose to share here and then begin integrating more sensors and moving everything over to MMW.The sensor I intend to use is not listed within MMW so I plan on submitting a request via help@monitormywatershed.org to have it added.
It is a simple, hi/lo +/-5V kinda sensor, a simple three-wire deal.
I’ll include the datasheet with the request, is there anything else I can/must do to have it added?Thanks again for all your support!
-Evan
-
2020-02-11 at 9:05 AM #13790
@charlesbrown Glad to hear you’ve made progress! We’re always looking for guest bloggers to share their projects and provide tips/tricks/tutorials to help others. Please email me at webmaster@stroudcenter.org if you’re interested.
-
-
AuthorPosts
- You must be logged in to reply to this topic.