I2C Transaction failed after update to ESP 5.4.1 and Arduino 2.3.5 (IDFGH-15047)
Answers checklist.
- [x] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
- [x] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
- [x] I have searched the issue tracker for a similar issue and not found a similar issue.
General issue report
I auto updated to ESP 5.4.1 and Arduino 2.3.5 today, and uploaded code now causes errors where there were none previously. System is an ESP32-S3 N8R2, with PSRAM turned on.
I have a 0.96 OLED display (SSD1306) on Wire, and 2 different I2C devices (SHT30 temp sensor and vl53l4 TOF sensor) on Wire1.
2:55:19.265 -> E (4123) i2c.master: I2C software timeout 12:55:19.265 -> E (4123) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed 12:55:19.265 -> E (4124) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed 12:55:19.331 -> E (4181) i2c.master: I2C software timeout 12:55:19.331 -> E (4181) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed
Increase timeout threshold and show your logic wave if possible which can provide some clue.
@MarksWizard Could you please try it on master? A bug related to i2c_master_multi_buffer_transmit has just been solved.
hi @mythbuster5 thanks for the quick response! I am happy to try it on the master branch, but I am not sure how to do this using Arduino IDE. Are you able to point me in the right direction?
I'm not familiar with Arduino IDE either. Could you only try with esp-idf?
And some more questions:
I auto updated to ESP 5.4.1 and Arduino 2.3.5 today, and uploaded code now causes errors where there were none previously. System is an ESP32-S3 N8R2, with PSRAM turned on.
- From which esp-idf version to esp v5.4.1?
- Arduino might not call
i2c_master_multi_buffer_transmitdirectly. So may I see how you call this function? - Provide logic wave if possible would be more helpful. @MarksWizard
@mythbuster5 do you know if Arduino code will compile under ESP-IDF? This is a fairly complex program with several libraries and 3000+ lines of my own code. I am not sure how easily this will port to the ESP-IDF, though I have definitely considered making the switch. I also have never used the tool chain for my own code, only to compile and upload other people’s projects. Again, I had never seen this error before auto updating Arduino IDE and ESP yesterday. I checked the Arduino changelog and there is no mention of I2C in the latest update.
- I updated from whatever the last release was, it looks 5.2.5?
- I am using several software libraries to control/communicate with the various sensors on the device, so I am not sure where the troubled call is coming from. It literally floods my serial output with those messages. I will try to poke through the libraries today and see where the command
i2c_master_multi_buffer_transmitis coming from. - I don’t have an oscilloscope unfortunately.
In the mean time I am going to try to comment out the I2C sensors individually to see if I can find which one is causing the issue.
@mythbuster5 I found another user with the same error on the arduino-esp32 GitHub. https://github.com/espressif/arduino-esp32/issues/11228
Arduino uses this link for the “Boards Manager” to include ESP32 programming on the Arduino IDE. Not sure if it provides any clues?
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
@MarksWizard while it is not possible to install Arduino based on ESP-IDF master through IDE's board manager, you can manually install it in your sketches folder by following these steps: https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#windows-manual-installation (further down there are guides for Linux and Mac if that is what you are running). Just make sure that when you are pulling the Arduino repo, you are pulling the idf-master branch. This will get the latest development sources and libs based on the latest IDF master.
I have the exact same problem as well with a single bme680 unit connected to esp32. Previous no issues as unit is long running, but i started to get these error after the same updates. i thought it was the wiring as the unit would run for some time before the error showed itself again. A reboot gets it running again but it eventually comes back.
@me-no-dev @mythbuster5
Thanks for the help!
I believe I have correctly installed master branch to /Users/MarksWizard/Documents/Arduino
Verify archive... Extracting archive... Renaming mkspiffs-0.2.3-arduino-esp32-osx to mkspiffs ... Elapsed time 00:00.01 Files extracted successfully.
Platform Tools Installed
Restarted Arduino IDE and reuploaded code, but the issue remains. I am going to restart my system now, I will report back if anything changes.
12:30:55.002 -> E (225576) i2c.master: I2C software timeout 12:30:55.002 -> E (225576) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed 12:30:55.002 -> E (225577) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed 12:30:55.034 -> E (225634) i2c.master: I2C software timeout 12:30:55.034 -> E (225634) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed 12:30:55.068 -> E (225634) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed 12:30:55.100 -> E (225692) i2c.master: I2C software timeout 12:30:55.100 -> E (225692) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed 12:30:55.100 -> E (225693) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed 12:30:55.166 -> E (225750) i2c.master: I2C software timeout 12:30:55.166 -> E (225750) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed 12:30:55.166 -> E (225750) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed 12:30:55.231 -> E (225808) i2c.master: I2C software timeout 12:30:55.231 -> E (225808) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed 12:30:55.231 -> E (225809) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed
@me-no-dev
That does not seem to work.
In my case i have multiple version of arduino on my system so the IDE 2.0 resides under "documents/arduino 2.0 Esp" which i installed as per the instructions in your post.
I can see the hardware folder under the directory now.
But when i compile the ide uses this folder to compile with
"C:\Users\sysop\AppData\Local\Arduino15\packages\esp32\hardware\esp32
So it does not use the one in the sketchbook folder so what i did was copied the files for the one created with the instructions into the proper directory under AppData and recompiled and upload my sketch.
As soon as a boot the unit with the button on the esp i get the following errrors as my sketch runs.
` ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0030,len:4888 load:0x40078000,len:16516 load:0x40080400,len:4 load:0x40080404,len:3476 entry 0x400805b4
E (17) i2c.master: I2C hardware timeout detected E (17) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pul l-ups are correctly set up I2C device found at address 0x77 done
BSEC library version 1.4.8.0 E (4059) i2c.master: I2C hardware NACK detected E (4059) i2c.master: I2C transaction unexpected nack detected E (4060) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (4067) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (4674) i2c.master: I2C hardware NACK detected E (4674) i2c.master: I2C transaction unexpected nack detected E (4674) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (4680) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (4787) i2c.master: I2C hardware NACK detected E (4787) i2c.master: I2C transaction unexpected nack detected E (4787) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (4792) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (4900) i2c.master: I2C hardware NACK detected E (4900) i2c.master: I2C transaction unexpected nack detected E (4900) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (4905) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (5013) i2c.master: I2C hardware NACK detected E (5013) i2c.master: I2C transaction unexpected nack detected E (5013) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (5018) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (5126) i2c.master: I2C hardware NACK detected E (5126) i2c.master: I2C transaction unexpected nack detected E (5126) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (5131) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (5239) i2c.master: I2C hardware NACK detected E (5239) i2c.master: I2C transaction unexpected nack detected E (5239) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (5244) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (5352) i2c.master: I2C hardware NACK detected E (5352) i2c.master: I2C transaction unexpected nack detected E (5352) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (5357) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (5465) i2c.master: I2C hardware NACK detected E (5465) i2c.master: I2C transaction unexpected nack detected E (5465) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (5470) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (5578) i2c.master: I2C hardware NACK detected E (5578) i2c.master: I2C transaction unexpected nack detected E (5578) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (5583) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (5591) i2c.master: I2C hardware NACK detected E (5595) i2c.master: I2C transaction unexpected nack detected E (5600) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (5607) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (5615) i2c.master: I2C hardware NACK detected E (5619) i2c.master: I2C transaction unexpected nack detected E (5624) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (5631) i2c.master: i2c_master_receive(1240): I2C transaction failed E (5738) i2c.master: I2C hardware NACK detected E (5738) i2c.master: I2C transaction unexpected nack detected E (5738) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (5743) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (5751) i2c.master: I2C hardware NACK detected E (5755) i2c.master: I2C transaction unexpected nack detected E (5760) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (5767) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (5775) i2c.master: I2C hardware NACK detected E (5779) i2c.master: I2C transaction unexpected nack detected E (5784) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (5791) i2c.master: i2c_master_receive(1240): I2C transaction failed E (5898) i2c.master: I2C hardware NACK detected E (5898) i2c.master: I2C transaction unexpected nack detected E (5898) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (5903) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (5911) i2c.master: I2C hardware NACK detected E (5915) i2c.master: I2C transaction unexpected nack detected E (5920) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (5927) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (5935) i2c.master: I2C hardware NACK detected E (5939) i2c.master: I2C transaction unexpected nack detected E (5944) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (5951) i2c.master: i2c_master_receive(1240): I2C transaction failed E (6058) i2c.master: I2C hardware NACK detected E (6058) i2c.master: I2C transaction unexpected nack detected E (6058) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6063) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (6071) i2c.master: I2C hardware NACK detected E (6075) i2c.master: I2C transaction unexpected nack detected E (6080) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6087) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (6095) i2c.master: I2C hardware NACK detected E (6099) i2c.master: I2C transaction unexpected nack detected E (6104) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6111) i2c.master: i2c_master_receive(1240): I2C transaction failed E (6218) i2c.master: I2C hardware NACK detected E (6218) i2c.master: I2C transaction unexpected nack detected E (6218) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6223) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (6231) i2c.master: I2C hardware NACK detected E (6235) i2c.master: I2C transaction unexpected nack detected E (6240) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6247) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (6255) i2c.master: I2C hardware NACK detected E (6259) i2c.master: I2C transaction unexpected nack detected E (6264) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6271) i2c.master: i2c_master_receive(1240): I2C transaction failed E (6378) i2c.master: I2C hardware NACK detected E (6378) i2c.master: I2C transaction unexpected nack detected E (6378) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6383) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (6391) i2c.master: I2C hardware NACK detected E (6395) i2c.master: I2C transaction unexpected nack detected E (6400) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6407) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (6415) i2c.master: I2C hardware NACK detected E (6419) i2c.master: I2C transaction unexpected nack detected E (6424) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6431) i2c.master: i2c_master_receive(1240): I2C transaction failed E (6538) i2c.master: I2C hardware NACK detected E (6538) i2c.master: I2C transaction unexpected nack detected E (6538) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6543) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (6551) i2c.master: I2C hardware NACK detected E (6555) i2c.master: I2C transaction unexpected nack detected E (6560) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6567) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (6575) i2c.master: I2C hardware NACK detected E (6579) i2c.master: I2C transaction unexpected nack detected E (6584) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6591) i2c.master: i2c_master_receive(1240): I2C transaction failed E (6698) i2c.master: I2C hardware NACK detected E (6698) i2c.master: I2C transaction unexpected nack detected E (6698) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6703) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (6711) i2c.master: I2C hardware NACK detected E (6715) i2c.master: I2C transaction unexpected nack detected E (6720) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6727) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (6735) i2c.master: I2C hardware NACK detected E (6739) i2c.master: I2C transaction unexpected nack detected E (6744) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6751) i2c.master: i2c_master_receive(1240): I2C transaction failed E (6858) i2c.master: I2C hardware NACK detected E (6858) i2c.master: I2C transaction unexpected nack detected E (6858) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6863) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (6871) i2c.master: I2C hardware NACK detected E (6875) i2c.master: I2C transaction unexpected nack detected E (6880) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6887) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (6895) i2c.master: I2C hardware NACK detected E (6899) i2c.master: I2C transaction unexpected nack detected E (6904) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (6911) i2c.master: i2c_master_receive(1240): I2C transaction failed E (7018) i2c.master: I2C hardware NACK detected E (7018) i2c.master: I2C transaction unexpected nack detected E (7018) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (7023) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (7031) i2c.master: I2C hardware NACK detected E (7035) i2c.master: I2C transaction unexpected nack detected E (7040) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (7047) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed E (7055) i2c.master: I2C hardware NACK detected E (7059) i2c.master: I2C transaction unexpected nack detected E (7064) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (7071) i2c.master: i2c_master_receive(1240): I2C transaction failed E (7178) i2c.master: I2C hardware NACK detected E (7178) i2c.master: I2C transaction unexpected nack detected E (7178) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed E (7183) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed
Connecting to graveyard1.WiFi connected IP address: 192.168.1.103 [DEFAULT] ESP32 Board MAC Address: 1c:69:20:e6:1d:04 Setting up time Got the time from NTP Setting Timezone to EST5EDT,M3.2.0,M11.1.0
Tuesday, April 08 2025 12:33:34 zone EDT -0400 Time variables 12
Connect to MQTT broker...connected
topic home/nb/node03/dev99 value:NODE 3 WAKEUP: ESP32_03_FAN topic home/nb/node03/dev00 value:0 topic home/nb/node03/dev01 value:0 topic home/nb/node03/dev02 value:-74 topic home/nb/node03/dev03 value:ESP32_03_FAN topic home/nb/node03/dev10 value:192.168.1.103 topic home/nb/node03/dev16 value:OFF topic home/nb/node03/dev17 value:OFF topic home/nb/node03/dev18 value:OFF topic home/nb/node03/dev19 value:OFF topic home/nb/node03/dev52 value:{"dev":"52","N4_TH":[34.30,44.06,343,67,34,44]} topic home/nb/node03/dev49 value:{"dev":"49","N1_T8":[41.90,44.06,46.04,41.00,40.10,45.50,41.90,40.82]} E (103229) i2c.master: I2C hardware NACK detected
`
I beleive this error is pointing a to wiring problem and not the latest release, i have serveral units all with i2c devices, i have recompiled and uploaded their firmware using the stock updates of arduino without any changes and the trouble does not follow to the other units.
@ve3sjk although it’s not entirely impossible, I did not move my device at all during the upload. Several people are reporting this issue, all arising from the update.
https://github.com/espressif/arduino-esp32/issues/11228
Edit: Actually I just tried uploading to a bare bones ESP32 S3 without anything connected at all. I am still getting the errors.
I also saw these errors during compile, which I didn’t notice before.
In file included from /Library/Arduino15/packages/esp32/hardware/esp32/3.2.0/cores/esp32/Stream.h:25, from /Library/Arduino15/packages/esp32/hardware/esp32/3.2.0/cores/esp32/Arduino.h:196, from /Documents/Arduino/FEB_26_2025/FEB_26_2025.ino:14: /Library/Arduino15/packages/esp32/hardware/esp32/3.2.0/cores/esp32/Print.h:64:18: warning: 'virtual size_t Print::write(const uint8_t*, size_t)' was hidden [-Woverloaded-virtual=] 64 | virtual size_t write(const uint8_t buffer, size_t size); | ^~~~~ In file included from /Documents/Arduino/libraries/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/src/SSD1306Wire.h:34, Documents/Arduino/Tides_Full_FEB_26_2025/Tides_Full_FEB_26_2025.ino:27: Documents/Arduino/libraries/ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays/src/OLEDDisplay.h:343:12: note: by 'OLEDDisplay::write' 343 | size_t write(const char s); | ^~~~~ FEB_26_2025.ino: In function 'void setup()': FEB_26_2025.ino:307:3: warning: missing initializer for member 'esp_timer_create_args_t::arg' [-Wmissing-field-initializers] 307 | };
@MarksWizard when you select a board, you will see two cores in the boards menu, one will say ESP32 Arduino (in Sketchbook) and that is the one you need to select board from. The one that says esp32 is the one installed from Board Manager
@MarksWizard That is true in my case i did re locate the sensor. What i found intersting is that i have two identical boards, both freenov breakouts and freenov esp32. I select esp32 dev module under boards. I do see that link under boards and can confirm i am compiling under the new git stuff that i installed as above.
So the board with the error has 1 i2c device on it bme680 and is talking to 3 modbus devices and I am getting the same error as you.
The other board same hardware has 6 i2c devices and is talking to 2 ultrasonic sensors with serial and 6 modbus devices and it has no errors at all, despite the fact that it also has the same device as the first board, being a bme680 sensor as one of its sensors.
I just flashed the first one again now that i confirmed i was using the new boards will let it run and see how long it takes to throw the errors.
@mythbuster5 for reference, the initialization of the I2C driver is done here: https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-i2c-ng.c#L107-L129 This file contains the Arduino I2C lower layer driver that is based on I2C NG of ESP-IDF
@ve3sjk
E (17) i2c.master: I2C hardware timeout detected
E (17) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pul l-ups are correctly set up
I2C device found at address 0x77
This has already been fixed on idf master. Becuase probe doesn't support stretch before.
And lots of following nack, I guess 0x77 is not correct.
Hi @me-no-dev @mythbuster5
I have uploaded my code using the ESP-IDF master that me-no-dev helped me set up using ESP32 Arduino (in Sketchbook). Compiling and uploading my code to a bare (no sensors) ESP32 S3 dev board still gives me the same errors. :(
Today I will work on trying to reproduce the issue with a smaller sketch. I’m not sure yet, but I think the issue may have something to do with the OLED display. For that I am using the this library.
https://github.com/vlast3k/Arduino-libraries/blob/master/SSD1306/SSD1306Wire.h
Ok since I thought it was my OLED library, I decided to switch it up. This is much simpler example code from a different library (Adafruit), but is still producing the error. Again this board is a normal ESP32 S3 dev board with nothing attached.
ssd1306_128x64_i2c example from https://github.com/adafruit/Adafruit_SSD1306
@mythbuster5
After a bit of a struggle, I was able to compile and upload the TextBoxDemo from https://github.com/nopnop2002/esp-idf-ssd1306/tree/master directly through ESP-IDF (No Arduino). I still saw the errors.
Then I made sure that my ESP-IDF was on the master branch, reinstalled everything, and reuploaded the TextBoxDemo code.. I am still seeing the same error. I am using the same basic ESP32 S3 dev board with nothing attached.
idf.py --version
ESP-IDF v5.5-dev-1655-gc5865270b5-dirty
I think my testing shows
- Multiple users are experiencing the issue
- The issue is not fixed on the master branch
- The issue is not specific to a certain library
- The issue is not specific to the display
- The issue is not related to Arduino IDE
- The issue is not due to faulty wiring
E (17) i2c.master: I2C hardware timeout detected E (17) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pul l-ups are correctly set up I2C device found at address 0x77This has already been fixed on idf master. Becuase probe doesn't support stretch before.
And lots of following nack, I guess 0x77 is not correct.
Device 0x77 is a bme680 sensor, i moved it back to directly wired to breakout board from a quad about 4 foot long.
I have not seen the error since doing that so far been running for about 5 hours.
@MarksWizard I believe you can reproduce the issue but... I'm trying to reproduce the issue via TextBoxDemo and every thing works well with S3-DevKit.
We also simply provide a ssd1306 example in esp-idf: https://github.com/espressif/esp-idf/tree/master/examples/peripherals/lcd/i2c_oled
Thanks a lot for your effort, but more clue is very helpful. What about connect a logic analyzer and see data on line?
@MarksWizard when you select a board, you will see two cores in the boards menu, one will say
ESP32 Arduino (in Sketchbook)and that is the one you need to select board from. The one that saysesp32is the one installed from Board Manager
@me-no-dev If I select the one that says "esp32", the "LoRa_rx_tx.ino" sketch compiles and upload, but then I run into this issue (i2c.master...). I'm using a Heltec LoRa 32 v3 and Arduino IDE v2.3.6 If I select the one that says "ESP32 Arduino (in Sketchbook)", it does not compile and gives me the following error: "The system cannot find the path specified. exit status 1". Not very helful as it does not tell me which path is specified. Thanks,
Guy
@guy9ak you probably did not execute get.py or get.exe as given by the instructions, so install did not pull the tools and libs required for Arduino
@guy9ak you probably did not execute
get.pyorget.exeas given by the instructions, so install did not pull the tools and libs required for Arduino
@me-no-dev Thanks for your reply! Sorry, but I am not an advanced user. Could you tell me where I could find the instructions that you are referencing? Thanks.
@guy9ak my comment in this same thread
Hi @mythbuster5 sorry that it took me a bit to respond.
I built and uploaded the I2C_oled example from the ESP32 peripherals folder, but it doesn’t work either... I had SDA on GPIO 1 and SCL on GPIO 2 per your post.
Output: `11:51:34.406 -> ���ESP-ROM:esp32s3-20210327
11:51:34.406 -> Build:Mar 27 2021
11:51:34.406 -> rst:0xc (RTC_SW_CPU_RST),boot:0x2b (SPI_FAST_FLASH_BOOT)
11:51:34.406 -> Saved PC:0x403759c8
11:51:34.406 -> SPIWP:0xee
11:51:34.406 -> mode:DIO, clock div:1
11:51:34.406 -> load:0x3fce2820,len:0x15d0
11:51:34.406 -> load:0x403c8700,len:0xd20
11:51:34.406 -> load:0x403cb700,len:0x2f60
11:51:34.406 -> entry 0x403c8924
11:51:34.439 -> I (29) boot: ESP-IDF v5.5-dev-1655-gc5865270b5-dirty 2nd stage bootloader
11:51:34.439 -> I (29) boot: compile time Apr 14 2025 11:06:09
11:51:34.439 -> I (29) boot: Multicore bootloader
11:51:34.439 -> I (32) boot: chip revision: v0.2
11:51:34.439 -> I (34) boot: efuse block revision: v1.3
11:51:34.439 -> I (38) boot.esp32s3: Boot SPI Speed : 80MHz
11:51:34.439 -> I (42) boot.esp32s3: SPI Mode : DIO
11:51:34.471 -> I (46) boot.esp32s3: SPI Flash Size : 2MB
11:51:34.471 -> I (49) boot: Enabling RNG early entropy source...
11:51:34.471 -> I (54) boot: Partition Table:
11:51:34.471 -> I (56) boot: ## Label Usage Type ST Offset Length
11:51:34.471 -> I (63) boot: 0 nvs WiFi data 01 02 00009000 00006000
11:51:34.471 -> I (69) boot: 1 phy_init RF data 01 01 0000f000 00001000
11:51:34.471 -> I (76) boot: 2 factory factory app 00 00 00010000 00100000
11:51:34.504 -> I (82) boot: End of partition table
11:51:34.504 -> I (86) esp_image: segment 0: paddr=00010020 vaddr=3c050020 size=0efdch ( 61404) map
11:51:34.504 -> I (104) esp_image: segment 1: paddr=0001f004 vaddr=3fc92a00 size=01014h ( 4116) load
11:51:34.504 -> I (105) esp_image: segment 2: paddr=00020020 vaddr=42000020 size=49a54h (301652) map
11:51:34.570 -> I (161) esp_image: segment 3: paddr=00069a7c vaddr=3fc93a14 size=018f4h ( 6388) load
11:51:34.570 -> I (163) esp_image: segment 4: paddr=0006b378 vaddr=40374000 size=0e90ch ( 59660) load
11:51:34.570 -> I (178) esp_image: segment 5: paddr=00079c8c vaddr=600fe000 size=0001ch ( 28) load
11:51:34.570 -> I (184) boot: Loaded app from partition at offset 0x10000
11:51:34.601 -> I (184) boot: Disabling RNG early entropy source...
11:51:34.601 -> I (196) cpu_start: Multicore app
11:51:34.601 -> I (205) cpu_start: Pro cpu start user code
11:51:34.148 -> I (206) cpu_start: cpu freq: 160000000 Hz
11:51:34.148 -> I (206) app_init: Application information:
11:51:34.180 -> I (206) app_init: Project name: i2c_oled
11:51:34.180 -> I (210) app_init: App version: v5.5-dev-1655-gc5865270b5-dirty
11:51:34.180 -> I (216) app_init: Compile time: Apr 14 2025 11:05:55
11:51:34.180 -> I (221) app_init: ELF file SHA256: 3a63e6503...
11:51:34.180 -> I (225) app_init: ESP-IDF: v5.5-dev-1655-gc5865270b5-dirty
11:51:34.180 -> I (231) efuse_init: Min chip rev: v0.0
11:51:34.180 -> I (235) efuse_init: Max chip rev: v0.99
11:51:34.212 -> I (239) efuse_init: Chip rev: v0.2
11:51:34.212 -> I (243) heap_init: Initializing. RAM available for dynamic allocation:
11:51:34.212 -> I (249) heap_init: At 3FCA6178 len 00043598 (269 KiB): RAM
11:51:34.212 -> I (254) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
11:51:34.212 -> I (259) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
11:51:34.212 -> I (264) heap_init: At 600FE01C len 00001FCC (7 KiB): RTCRAM
11:51:34.212 -> I (270) spi_flash: detected chip: gd
11:51:34.244 -> I (273) spi_flash: flash io: dio
11:51:34.244 -> W (276) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
11:51:34.244 -> I (288) sleep_gpio: Configure to isolate all GPIO pins in sleep state
11:51:34.244 -> I (295) sleep_gpio: Enable automatic switching of GPIO sleep configuration
11:51:34.244 -> I (301) main_task: Started on CPU0
11:51:34.244 -> I (311) main_task: Calling app_main()
11:51:34.277 -> I (311) example: Initialize I2C bus
11:51:34.277 -> I (311) example: Install panel IO
11:51:34.277 -> I (311) example: Install SSD1306 panel driver
11:51:34.277 -> E (321) i2c.master: I2C hardware NACK detected
11:51:34.277 -> E (321) i2c.master: I2C transaction unexpected nack detected
11:51:34.277 -> E (331) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed
11:51:34.277 -> E (331) i2c.master: i2c_master_multi_buffer_transmit(1193): I2C transaction failed
11:51:34.310 -> E (341) lcd_panel.io.i2c: panel_io_i2c_tx_buffer(193): i2c transaction failed
11:51:34.310 -> E (351) lcd_panel.ssd1306: panel_ssd1306_init(151): io tx param SSD1306_CMD_SET_MULTIPLEX failed
11:51:34.310 -> ESP_ERROR_CHECK failed: esp_err_t 0x103 (ESP_ERR_INVALID_STATE) at 0x42006b47
11:51:34.310 -> file: "/IDF/examples/peripherals/lcd/i2c_oled/main/i2c_oled_example_main.c" line 177
11:51:34.343 -> func: app_main
11:51:34.343 -> expression: esp_lcd_panel_init(panel_handle)
11:51:34.343 ->
11:51:34.374 -> abort() was called at PC 0x40379e53 on core 0
11:51:34.374 ->
11:51:34.374 ->
11:51:34.374 -> Backtrace: 0x40375a89:0x3fca95d0 0x40379e5d:0x3fca95f0 0x4038074d:0x3fca9610 0x40379e53:0x3fca9680 0x42006b47:0x3fca96b0 0x420491d4:0x3fca9770 0x4037a895:0x3fca97a0
11:51:34.406 ->
11:51:34.406 ->
11:51:34.406 ->
11:51:34.406 ->
11:51:34.406 -> ELF file SHA256: 3a63e6503
11:51:34.406 ->
11:51:34.406 -> Rebooting... `
Unfortunately my testing environment consists of a laptop and USB-C cable, I don’t have any logic analyzers or anything other than a multimeter.
I wrote the simplest of Arduino sketches possible. The issue occurs while trying to initialize I2c with Wire.begin().
`#include <Arduino.h> //Library for using Arduinio IDE specific commands #include <Adafruit_GFX.h> //https://github.com/adafruit/Adafruit-GFX-Library #include <Adafruit_SSD1306.h> //https://github.com/adafruit/Adafruit_SSD1306 #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
int timer = 0; #define SDA 1 //variables for OLED display #define SCL 2
void setup() { delay(50);
Serial.begin(115200); //Begin serial connection
Serial.println("Initializing display"); delay(1000);
Wire.begin(SDA, SCL); Serial.println("Wire started"); delay(1000); if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3D for 128x64 Serial.println(F("SSD1306 allocation failed")); }
display.clearDisplay(); Serial.println("Display Ready"); }
void loop() { display.clearDisplay();
while (timer < 3){
display.setTextColor(WHITE);
display.setTextSize(3);
display.setCursor(0,0);
display.print(timer);
display.display();
delay(1000);
}
}
`
Output `11:39:46.245 -> E �ESP-ROM:esp32s3-20210327
11:39:46.442 -> Build:Mar 27 2021
11:39:46.442 -> rst:0x1 (POWERON),boot:0xa (SPI_FAST_FLASH_BOOT)
11:39:46.442 -> SPIWP:0xee
11:39:46.442 -> mode:DIO, clock div:1
11:39:46.442 -> load:0x3fce2820,len:0x118c
11:39:46.442 -> load:0x403c8700,len:0x4
11:39:46.442 -> load:0x403c8704,len:0xc20
11:39:46.442 -> load:0x403cb700,len:0x30e0
11:39:46.442 -> entry 0x403c88b8
11:39:46.836 -> Initializing display
11:39:47.825 -> E (1068) i2c.master: I2C transaction unexpected nack detected
11:39:47.825 -> E (1068) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed`
@MarksWizard
It looks like i have three of the identical ESP32 S3 boards as the one in your picture, that i have not played with yet.
I can try one later and hookup the same OLED you have and see if it compliles using the (sketchbook) folder for the board.
According to the link below i beleive the default I2C pins are 8 and 9 on this board, i noticed in the picture you had ESP32 DEV Module selected as the board, i would think you would want to pick ESP32S3 Dev module from the list.
I will give it a try after dinner.
https://randomnerdtutorials.com/esp32-s3-devkitc-pinout-guide/
@ve3sjk yeah definitely let me know what your testing turns up. I am not sure where you see I have ESP32 selected, in my photo it clearly shows ESP32S3 in the port selection drop down and the lower right corner of the Arduino window?
In the example where I uploaded Arduino code, I selected pins 12 and 13 for the SCL/SDA and identify them in the software. Prior to the update this code would have ran fine. Just incase I was wrong though... I switched it to 8 for SDA, 9 for SCL and changed Wire.begin(SDA,SCL) to the default Wire.begin(). It worked!!!, switching back to Wire.begin(SDA,SCL) and the issue returns. So it is definitely something up with trying to software select the I2C @mythbuster5 @me-no-dev
@mythbuster5 Well I thought I had finally tracked down the bug to Wire.begin(SDA,SCL), but after a bit more testing that isn’t the issue.
I am now convinced that it is a wiring issue like @ve3sjk originally uncovered. I don’t know what changed from my earlier testing, or this simple wiring (EDIT: I have the SDA/SCL lines switched in the above photo, which triggered the issue), but I am now able to get the above Arduino code to run without issue on pins 12/13 for SDA/SCL. To reproduce the error, If you disconnect either of those pins the issue returns. So it’s great that it’s working again.. and I appreciate the message which informs us that there might be a wiring issue.
However, is there a way to keep it from completely spamming the serial console, like some sort of rate limiting timer on the output message? Under the current conditions I can’t debug my device “headless” without all of the sensors connected. Sometimes I want to just test bits of code for the web backend or something that doesn’t rely on those sensors or the screen being present.
@mythbuster5 et al In another thread the same problem has been discussed. @MarksWizard asked me to copy my comment from there, but I think a link is sufficient: https://github.com/espressif/arduino-esp32/issues/11228#issuecomment-2809209692
Some additional details: Arduino IDE is 2.3.6. I updated yesterday (from 2.3.4, jumped over 2.3.5), and at the same time updated the ESP32 board library from 3.1.3 to 3.2.0. The problems appeared immediately. but a downgrade to ESP32 ver 3.1.3 fixed it. No other changes to any library, nor to the sketch itself.