TheThingsNetwork / arduino-device-lib

Arduino Library for TTN Devices
MIT License
206 stars 96 forks source link

.resetHard command seems not working as expected #263

Closed LasaleFamine closed 4 years ago

LasaleFamine commented 4 years ago

As stated here: https://github.com/TheThingsNetwork/arduino-device-lib/issues/262#issuecomment-640048765 seems like the resetHard method is not working as expected.

A fast check of the resetHard implementation shows that there is a difference between the tested code on the issue linked above.

For completeness, here is the piece of code that actually resets the module, got from the issue:

#define RST 2

pinMode(RST, OUTPUT);
digitalWrite(RST, HIGH);
digitalWrite(RST, LOW);
delay(500);
digitalWrite(RST, HIGH);
jpmeijers commented 4 years ago

Looking at the code it looks exactly the same, as long as you follow the instructions in the documentation:

uint8_t resetPin: The output pin that is connected to the module's reset pin. The output pin should be configured as output and set to high by the user.

https://github.com/TheThingsNetwork/arduino-device-lib/blob/master/docs/TheThingsNetwork.md#method-hardreset

LasaleFamine commented 4 years ago

Fair enough, I've missed that piece on the doc. Just tested and it works as expected. Closing then. Thank you @jpmeijers.