Modem firmware I’ve tried has been 7.1 or 7.2 (most of the field devices are at ^7)
and the latest (using notecard firmware update) [9.1.1.17181]
Yes, here are the hardware specs
ESP32-S3-WROOM-1U-N16R8
I2C GPIO are GPIO15 and GPIO16 for SDA/SCL
GPIO17 and GPIO18 are the UART lines to the modem
SCL and SDA on notecard are NC
For the software side, the modem gets it’s own thread, and the I2C gets its own thread (since only the battery charger and fuel gauge are using I2C)
Here’s how I start the UART for the notecard
Serial1.begin(9600);
Serial1.setPins(MCU_MODEM_SERIAL_RX, MCU_MODEM_SERIAL_TX);
pinMode(MODEM_ATTENTION_PIN, INPUT);
attachInterrupt(MODEM_ATTENTION_PIN, modemAlertISR, RISING);
and here’s how I initialize the modem
notecard.begin(Serial1, 9600);
J *hubSetRequest = notecard.newRequest("hub.set");
if (hubSetRequest) {
JAddStringToObject(hubSetRequest, "product", PRODUCT_UID);
JAddStringToObject(hubSetRequest, "sn", uniqueId);
// JAddStringToObject(hubSetRequest, "mode", "continuous");
JAddStringToObject(hubSetRequest, "mode", "off");
JAddBoolToObject(hubSetRequest, "sync", true);
if (!notecard.sendRequestWithRetry(hubSetRequest, 5)) {
ESP_LOGE("Cellular Thread", "hubsetRequest Initialization Error.");
return false;
}
}
J *auxModeSetRequest = notecard.newRequest("card.aux");
if (auxModeSetRequest) {
JAddStringToObject(auxModeSetRequest, "mode", "dfu");
if (!notecard.sendRequest(auxModeSetRequest)) {
ESP_LOGE("Cellular Thread", "Bad response during aux mode request");
}
} else {
ESP_LOGE("Cellular Thread", "Couldn't create aux mode request");
}
ESP_LOGD("Cellular Thread", "Starting DFU Set");
J *dfuSetRequest = notecard.newRequest("card.dfu");
if (dfuSetRequest) {
JAddStringToObject(dfuSetRequest, "name", "esp32");
JAddBoolToObject(dfuSetRequest, "on", true);
return notecard.sendRequest(dfuSetRequest);
}
and here’s how I start the battery thread (after the modem thread has initialized the modem)
Wire.end();
Wire.setPins(SDA_PIN, SCL_PIN);
Wire.begin(SDA_PIN, SCL_PIN); // Also tried just Wire.begin()
I am using the adafruit/Adafruit MAX1704 library for the fuel gauge and a custom one for the battery charger
if (!fuelGauge.begin(&Wire)) {
ESP_LOGE(BATTERY_THREAD_TAG, "No MAX17048G found");
}
The battery charger would get initialized similar to this
These devices have been in the field for a couple years on some of them, the issue has been around for a while, I just pin the library version to get by, but I would like to use the latest library
Thanks for your help