Home › Forums › Mayfly Data Logger › Newbie Mayfly Setup for RS485 sensor to internet › Reply To: Newbie Mayfly Setup for RS485 sensor to internet
Hi @srgdamiano, Thanks for the headsup on new enviroDIY/TinyGSM release. I can see init changes on https://github.com/EnviroDIY/TinyGSM/branches
I did start with Mayfly setup:
const char *wifiId = “MyGuest”; // The WiFi access point, unnecessary for gprs
const char *wifiPwd = “”; // The password for connecting to WiFi, unnecessary for gprs
const long ModemBaud = 9600; // Default for XBee is 9600, I’ve sped mine up to 57600
const int8_t modemSleepRqPin = 23;//23; // Modem SleepRq Pin (for sleep requests) (-1 if unconnected)
const int8_t modemStatusPin = 19;//BEECTS;//19; // Modem Status Pin (indicates power status) (-1 if unconnected)
const int8_t modemVCCPin = -1; // Modem power pin, if it can be turned on or off (-1 if unconnected)
ModemSleepType ModemSleepMode = modem_sleep_reverse; // How the modem is put to sleep
and thats when it initialized and then hung. XCTU showed MyGuest, Encryption Enable, PK Passphrase empty (which it always shows as empty, it seems its a write only field for pwds!).
So connecting a logic analyzer on XbeeWifi pins the modemSleepRqPin wasn’t requesting wake state and sending data to a sleeping Xbee – so after about 3hrs of tracing input to the XbeeWifi module I figured I was getting it wrong.
So checking the updates pending on EnviroDIY/TinyGSM I figure I should use your new release (thanks for all the updates to vshymanskyy/TinyGSM) and then try again.
So to try again with the Mayfly, I think should
1) Reset the XBEE WiFi module to defaults via XCTU
2) Set “logging_to_EnviroDIY.ino” to sleep mode as above and then Monitor the modemSleepRqPin and modemStatusPin and Tx & Rx
and see if it works.
I can go onto a different project until the new EnviroDIY/TinyGSM lib is released.
Alternatively, if it would be useful to you, I could attempt a pre – release build of enviroDIY/TinyGSM (master or original?).
Here is my current log
<start log with pins enabled, and WiFi configured********************************>
Now running logging_to_EnviroDIY.ino on Logger nh06c
Logger timezone is UTC-8
RTC timezone is UTC
Creating a new on/off method for the Digi XBee with power on pin -1 status on pin 19 and on/off by holding pin 23 low.
Creating a new TinyGSM modem and client for the Digi XBee…
Initializing Digi XBee…
[1863] ### Modem: Digi XBee® Wi-Fi
… Complete!
Modem attached!
Pin 8 set as LED alert pin
Pin 21 set as testing mode entry pin
Registration token set!
Sampling feature UUID set!
Current RTC time is: 2000-01-06T11:00:22-08:00
Setting up logger nh06c to record at 10 minute intervals.
This logger has a variable array with 7 variables, of which 7 come from 4 sensors and 0 are calculated.
Successfully connected to SD Card with card/slave select on pin 12
Opened existing file: nh06c_2000-01-06.csv
Data will be saved as nh06c_2000-01-06.csv
This logger is also tied to a NO MODEM SELECTED for internet connectivity.
Turning modem on.
Skipping modem in sensor power up!
Skipping modem in sensor power down!
Attempting to synchronize RTC with NIST
This may take up to two minutes!
Waiting up to 5 seconds for modem to respond to AT commands…
Modem does not respond to AT commands!
Turning modem off.
Clock interrupt!
Push button on pin 21 at any time to enter sensor testing mode.
Logger setup finished!
——————————————
Cloÿ,HZ·terrupt!
Clock interrupt!
Current Unix Timestamp: 947156460
Logging interval in seconds: 600
Mod of Logging Interval: 60
Number of Readings so far: 0
Mod of 120: 60
Not time yet.