Home › Forums › Mayfly Data Logger › Trouble initializing XBee3 LTE-M › Reply To: Trouble initializing XBee3 LTE-M
2018-12-03 at 7:03 PM
#12673
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.
C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
#include <Arduino.h> #include <StreamDebugger.h> StreamDebugger StreamDbg(Serial1, Serial); void setup(){ Serial.begin(115200); delay(50); Serial1.begin(9600); delay(50); pinMode(23, OUTPUT); digitalWrite(23, LOW); pinMode(19, INPUT); delay(1500); StreamDbg.print("+++"); while (Serial1.available < 2) {} // wait for ok StreamDbg.print("ATRE"); // Restore device parameters to factory defaults. while (Serial1.available < 2) {} // wait for ok StreamDbg.print("ATWR"); // write the new (default) values while (Serial1.available < 2) {} // wait for ok StreamDbg.print("ATAC"); // apply changes while (Serial1.available < 2) {} // wait for ok } void loop() { // Start direct-access from Serial to Serial1 StreamDbg.directAccess(); } |