Closed dnowacki-usgs closed 4 years ago
Are you using a Sodaq UBee with a SARA U201 chip and a Mayfly? Are you sure you have the correct pins assigned? Unless you specifically chose not to power the modem and manually connected the reset, I suspect you do not.
For a Mayfly with a UBee-201 the pins should be:
// Sodaq uBee U201 with Mayfly
const int8_t modemVccPin = 23; // MCU pin controlling modem power (UBee pin 9/Mayfly pin 23 is connected to a MIC94040 which controls the power supply to the U201)
const int8_t modemStatusPin = 19; // MCU pin used to read modem status (UBee pin 12/Mayfly pin 19 is connected to U201's v_int via another MIC94040)
const int8_t modemResetPin = -1; // MCU pin connected to modem reset pin (UBee pin 5 is connected to reset_N on the U201, but this pin is not connected to the Mayfly mcu)
const int8_t modemSleepRqPin = 20; // MCU pin used for modem sleep/wake request (UBee pin 16/Mayfly pin 20 is directly connected to the U201's pwr_on pin - this (and only this) pin on the U201 is 5.5V tolerant)
const int8_t modemLEDPin = redLED; // MCU pin connected an LED to show modem status (Optional, but I like to use it)
This is based on the schema I have for the UBee dated 01/25/18, rev 1. If there have been changes since then, I do not have an updated schema
Thank you, it was the wrong pins. I searched quite a while looking for the pins for the uBee but couldn't find it on the GitHub wiki or elsewhere... Where is the best place to find the pins for other modems?
I should add it to the wiki, shouldn't I?
For the most part, you have to search for the schematic of whatever you have and figure it out yourself right now.
I've added pin numbers to the wiki for the UBee with ModularSensors: https://github.com/EnviroDIY/ModularSensors/wiki/Sodaq-uBee
You could have figured out the right pins by looking at the Mayfly schematic and the UBee schematic, but I definitely understand why you would have been confused looking at the two schematics. My copy of the UBee schematic is heavily annotated and I just added a few more scribbles to it today making sure I had everything right to put into the wiki.
I'm using a u-blox SARA-U201 with a Mayfly v0.5b and ModularSensors 0.23.16. Using a modified version of menu_a_la_carte.ino, I find that the modem is only activated every other logging interval. This is with relatively short intervals (2 and 5 minutes). The Mayfly goes through boot-up and NIST checking without issue. At the first interval, status pin 19 is low, indicating OFF, and it bails on doing any modem stuff before saving to the SD card. At the second interval, it does a hard reset on the modem, and successfully connects. At the third interval, it gets the same status pin low like at the first interval. I'm using the constructor from this wiki page. What's going on?
Edit: OK, I see the logic in
LoggerModem.cpp
that does the hard reset after an unsuccessful try. https://github.com/EnviroDIY/ModularSensors/blob/8bc62eb7705729e47e4a47a6b2f02dab955b63f8/src/LoggerModem.cpp#L314-L325 I guess the salient question might be, what are some reasons why the U201 is not waking up normally?Debug output: