Tracker software

Hi,

I’m using the Tracker software from https://github.com/SodaqMoja/SodaqOne-UniversalTracker. I have a Sodaq ONE board V1. Running the code is no problem, the GPS finds it’s coordinates and transmits them via LoRa to my backend. So far so good, but connecting a battery and running the code without USB connected will result in a state where the code hangs. It hangs until a timeout is reached and then restarts. Debugging the code using the LEDs gave me the line where it hangs: printBootUpMessage(SerialUSB); (line 187, in the main page, in the setup)
Debugging it further:
printBootUpMessage(SerialUSB); --> getHWEUI(); --> initLora(true); --> if (LoRaBee.initABP(LORA_STREAM, devAddr, appSKey, nwkSKey, params.getIsAdrOn())) --> resetDevice() --> if (expectString(STR_DEVICE_TYPE_RN)) --> if (readLn() > 0) --> int len = this->loraStream->readBytesUntil(’\n’, buffer + start, size); HERE IT TIMES OUT…
It seems the code cannot retreive the HWEUI from the LoRa unit.

Eventually I commented out the printBootUpMessage and tried running the code without retrieval of HWEUI. This let to another timeout:
params.read(); --> if (_header != DEFAULT_HEADER || _crc16 != calcCRC16) {reset();} --> if (configResetCallback) {configResetCallback();} HERE IT TIMES OUT…

This function configResetCallback() is unclear to me from a code perspective (function with pointer which gets set to a value to do what?), but the name suggests just a callback of the resetting of the configuration.

Anyway, I cannot get the code run without USB connected. Who can help me?

Hi,

Some RN modules are not responding anymore after you upload new code to the board.
They need a complete power cycle to be used again. Disconnect the lipo / usb and re-open the serial monitor.
In ONE V2 we added a reset line to the RN module to be able to let the microcontroller give the RN module a reset.

When you connect a battery to the sodaq one does not do anything. You also have to connect the power pin.
http://support.sodaq.com/sodaq-one/battery/

Regards,
Jan

Hi Jan,

thank you for a quick answer. Keep in mind I don’t want a PC connected when using the device. I want it to be operating in the field, without a laptop. Just switching it on, finding GPS coordinates and measuring, sending its coordinates and measurement values over LoRa and sleep for an hour.

I have the power pin connected, it is operating on battery power. It is just not getting through the setup code. I will give the complete power cycle option a try.

Gr Frank

And can add a wire to the reset pin of the RN2483 module and connect it to an IO pin of the Sodaq ONE board to trigger it on startup?

Hi Frenkie,

That’s exactly what we did on V2 of the SODAQ ONE.