Forum Replies Created
-
AuthorPosts
-
LOL!
Doh! I’m sorry, I was confusing you with Dan who was troubleshooting issues with the UBee last week. They’re even worse than the LTE XBee3’s.
The power isn’t your problem testing in the lab. That seems a hair low for being connected to USB, but not concerning. On the last bypass output that you posted from over the weekend, you did connect and even got the time from NIST, so your SIM and XBee and Mayfly are all OK. It’s just making them play nice.
Yes, I think your next step is to update TinyGSM and re-test. You can try switching between the modes to see if it helps the connection. Don’t bother waiting more than 1 cycle and you can drop your interval down to as low as 1 minute while your watching. If NIST connection doesn’t work in any of the 5 attempts, you can almost give up right there and post the output.
If the XBee3 refuses to submit, try switching to the “bleeding edge” version of ModularSensors on the ModemLast branch. To use that run
pio lib uninstall EnviroDIY_ModularSensors
or
pio lib -g uninstall EnviroDIY_ModularSensors
(case matters). Then after the uninstall, modify your platformio.ini and remove
EnviroDIY_ModularSensors
from the lib_deps section and add
https://github.com/EnviroDIY/ModularSensors.git#modemLast
in its place. The modem last branch (as you might guess) restructures the way the internet connection happens. Instead of starting the modem first and waiting for it to connect as if it’s a sensor detecting the signal strength, the library keeps the modem off until all the other sensors are complete. Once the other sensor data is saved, the modem comes on, sends data to the world, and makes note of the signal strength just before going back to sleep. On the next sensor interval, the prior modem strength will be recorded. On the surface, the changes to your code should be pretty trivial, but the library will be doing different things underneath.
I just pushed some improvements yesterday to the EnviroDIY fork of TinyGSM that should help with the uBee.
Are you using the same program you posted earlier? Can you post the output with debugging enabled?
C++1sensor.setDebugStream(&Serial);Are you getting seeing responses in the raw debugging that mostly complete but are being rejected due to incorrect CRC or is the whole response only one or two bytes. Please post your output.
Are you sure you have the correct modbus address? Have you tried the running the GetSlaveId program: https://github.com/EnviroDIY/YosemitechModbus/blob/master/utilities/GetSlaveID/GetSlaveID.ino?
I finally actually did some testing with my own board and managed to get most of the same errors you found in Bypass mode and pushed some corrections to TinyGSM. It’s all about the issues with synchronous and asynchronous opening. I figured out how to make it crash every time and (hopefully) how to make that not happen. And the good news is that since both the XBee3 in Bypass and the Sodaq UBee are using the same code in TinyGSM, it should help both of them.
As for the issues with not connecting in transparent.. I’ve got nothing. Try some prayers to Isidore of Seville, patron of the internet. Sometimes switching the same board back and forth between transparent and bypass mode a couple of times works. More often I’ve been able to “fix” a board that wouldn’t connect in transparent by using bypass, but today I had three different boards that I couldn’t get to connect in bypass and suddenly happily connected in transparent. I have no idea why it happens.
I’m sorry. No, I don’t think it’s an issue with the battery or the SIM.
When you were running in Transparent, the XBee3 just didn’t register an internet connection. They just do that sometimes – refuse to acknowledge they are registered on the network. Sometimes switching from transparent to bypass and back to transparent “magically” fixes the connection issue on the transparent side. Do you know what version of the Digi firmware you have? The newest is a little better than older, but it’s still not perfect.
When you were running in Bypass, you were hitting the same issues that you hit with the UBee, except this time it connected, opened the channel, got data, and then somehow didn’t realize there was a connection and re-opened it several times.
You are exactly 1 commit behind for TinyGSM. Try again. Have you maybe installed TinyGSM to your “global” library registry instead of your local one? You might need to do a “pio lib -g update” (-g flag for global). Otherwise you can navigate directly to into the folder and use git to update:
cd .pio\libdeps\mayfly\TinyGSM
followed by
git pull
.
Attachments:
Ah ha! Can you check which version of SensorModbusMaster you have? Is it by chance 0.6.7 or lower? There’s was nasty bug that would cause non-avr boards to crash if the DE/RE pin was set and debugging was turned off. The bug was only caught and fixed by @neilh about a month ago. You can get the current version here: https://github.com/EnviroDIY/SensorModbusMaster
-
AuthorPosts