I’ve been using a Mojo on my dev setup for a week or so. At first it worked perfectly fine, but now I’m getting constant i2c errors when requesting “card.power”. The other commands seem to work fine.
I’m using an esp32 running espidf v5.4, note-c v2.3.1, and note firmware 8.1.3.17044 on a Notecarrier F v1.3
Any idea’s what the issue could be? I’m polling the mojo every ~7 minutes or so. Is there a minimum time between card.power requests ?
Hi @stopper4298 ,
We are happy to welcome you to the Blues forum!
Are you powering your device on a bench top power supply, USB, or a battery?
I’ll try to reproduce your issue, while I wait for you to get back to me.
Cheers,
Zak
Thanks for your quick reply!
I’m using it with a battery plugged in, and I have the feather plugged into the computer via usb. I have noticed that the battery voltage reading is not changing at all. I’d at least expect the voltage to drop very slowly
Okay, I think understand your setup enough to attempt a repro.
To further refine my understanding, can you answer these questions?
- Are you using the Adafruit ESP32 Huzzah Feather, or something different?
- Which type of Notecard are you using?
- Do you have any other peripherals plugged into the I2C than the MoJo?
I’ll reproduce it first thing in the morning and I’ll get back to you with my findings.
Best,
Zak
- Are you using the Adafruit ESP32 Huzzah Feather, or something different?
Correct, ESP32 Huzzah Feather v1
- Which type of Notecard are you using?
Notecard v2.1 black - NOTE-WBNAW, cellular + wifi
- Do you have any other peripherals plugged into the I2C than the MoJo?
Feather, Notecard, Mojo are the only peripherals on the I2C line. They’re using the default i2c address.
Other info:
I’m using the N_ATTN pin connected to a digital pin on the feather setup with an interrupt, and a few LEDs also controlled by the feather. BLE is enabled on the ESP32. Battery is a 5000mah lipo.
Notecard is in continuous mode with sync set to true.
I2C setup is:
i2c_master_bus_config_t i2c_mst_config = {
.i2c_port = I2C_NUM_0,
.sda_io_num = I2C_MASTER_SDA_IO,
.scl_io_num = I2C_MASTER_SCL_IO,
.clk_source = I2C_CLK_SRC_DEFAULT,
.glitch_ignore_cnt = 7,
.intr_priority = 0,
.trans_queue_depth = 0, // only used for asynchronous transactions
.flags{
.enable_internal_pullup = false,
.allow_pd = false, // disallow i2c bus to be disabled for power savings
}};
ESP_ERROR_CHECK(i2c_new_master_bus(&i2c_mst_config, &bus_handle));
i2c_device_config_t dev_cfg = {
.dev_addr_length = I2C_ADDR_BIT_LEN_7,
.device_address = NOTE_I2C_ADDR_DEFAULT,
.scl_speed_hz = 100000,
.scl_wait_us = 0, // uses register default
.flags{
.disable_ack_check = false,
}};
ESP_ERROR_CHECK(i2c_master_bus_add_device(bus_handle, &dev_cfg, &dev_handle));
I2C messages are working except for the card.power, which gives me this:
D (2803184) -Notecard-: [INFO]
D (2803184) -Notecard-: {"req":"card.power","crc":"00F1:4DC601CB"}
D (2803184) -Notecard-:
E (2803224) i2c.master: s_i2c_synchronous_transaction(918): I2C transaction failed
E (2803224) i2c.master: i2c_master_multi_buffer_transmit(1180): I2C transaction failed
I’ve reproduced your issue .
Now, I’m onto the slower diagnosing stage.
I’m making progress, but don’t have an answer for you yet.
I just didn’t want to leave you hanging.
Cheers,
Zak
Awesome, really glad to know that I’m not crazy
Thanks a bunch for your help and the update!