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
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
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.