ESP32 - i2c sniffing-scl,sda - eeprom (k16c24)

Hello how can i sniff the data from the i2c (sda, scl) using esp32? I want to get the data of systolic and diastolic, and pulse rate data where it was printed on the screen, on the link above, it shows that he can get the data from scl and sda pin.

The eeprom has 0x50 address, and i can't get the data, please help ASAP

The video is part of a series. Part 4 contains a link to the source code on github.

A cheap logic analyser could be a useful tool for sniffing I2C protocol.
However, if you already have an EEPROM which is loaded with data, the best starting point is a data sheet for the EEPROM type if you are able to identify it. There are a number of arduino libraries for interfacing to EEPROMs.

Hello I've run dome test to find the raw data on the eeprom, which is not changing at all, the result from the blood pressure monitor is 114 - 87 - 85 (systolic, diastolic, pulse rate) the code said that count variable is 28,29,30 but the data below is not align with the result on bp device

Reading block 0x50
Byte 0: 170
Byte 1: 112
Byte 2: 166
Byte 3: 111
Byte 4: 255
Byte 5: 225
Byte 6: 170
Byte 7: 169
Byte 8: 20
Byte 9: 128
Byte 10: 6
Byte 11: 50
Byte 12: 10
Byte 13: 10
Byte 14: 19
Byte 15: 99
Byte 16: 15
Byte 17: 12
Byte 18: 50
Byte 19: 12
Byte 20: 139
Byte 21: 93
Byte 22: 166
Byte 23: 132
Byte 24: 185
Byte 25: 6
Byte 26: 20
Byte 27: 10
Byte 28: 100
Byte 29: 128
Byte 30: 164
Byte 31: 150

Hello currently i dont have time to use logic analyzer, but i already found the address 2hich is 0x50 to 0x57 but the raw data i found on the serial monitor has no great/real value on the result

On the blood pressure device I have, the user to explicitly press the "MEM" key to store the results so I guess that these are not automatically saved in the EEPROM.
What is the part number on the EEPROM you are reading ?

@invictre , how are you extracting the information from the EEPROM?

The I2C bus within the device may (or may not) be active at any time. Maybe the pressure sensors use I2C - I don't know. You can't simply connect up to an active I2C bus and interact with the devices on it as you are likely to end up with bus collisions when your messages are placed on the I2C bus at the same time the internal microcontroller is using the I2C bus.

You need to sniff the active I2C bus - i.e. monitor the messages on the bus to extract the data you need. I believe that the term for this is "promiscuous mode" and not many micros support it. I don't believe that the ESP32 does.

What that means is you can't use the I2C hardware within the micro to sniff the bus. There are some I2C bus sniffer sketches around but I think they only work with a 100kHz bus (called standard mode). If your blood pressure monitor uses a 400kHz bus (called fast mode), then you will likely struggle to extract live information from the bus.

One of the cheap 24MHz logic analysers - they are around a few dollars - would easily handle the analysis of the I2C bus. It would tell you what values were being written to what locations within the NVM device. It would also tell you what speed the I2C bus is operating at.

This discussion may help you out:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.