@lbdcdrc
Where you ever able to fix that issue?
I’ve paused developing with my XBees for some months and everything was working, could deal with 5 different I2C devices at once.
Now I’m trying to get back to the development and I’m getting “OSError: [Errno 7019] ENODEV” all the time, tried different XBees, different sensors, different development boards… Changed cables… I really don’t know what else to try.
Thanks for the suggestion @mvut.
Today I was investigating this further and changed the only piece that I hadn’t changed yet, the computer.
I moved from my Macbook Pro M1 Max to my wife’s Dell Inspiron with Windows 11 installed, and it worked!!
I tested the voltage and with the Mac I’m getting 3.51v whereas with the Dell I’m getting 3.3v.
3 conclusions:
Although the XBee I’m using is rated to work up to 3.6V, apparently when using I2C this doesn’t apply.
Certainly there has been an update in the past months for the Mac/MacOS that changed something in regard to USB power.
The development board I’m using does a very poor job regulating the voltage. It is a very cheap one.
I’ve tried to get the XBee Grove Development Board, but it was confiscated by the customs of my country, I’ll try to buy a different dev board.
It seems like the issue is related to the I2C device not being recognized by your end device. Here are some troubleshooting steps you can try:
Make sure the I2C device is properly connected to your end device and that the wiring is correct.
Check if the I2C device has the correct address. You are trying to read from memory address 0xD0 on device address 0x77, so make sure that is the correct address for your device. You can check the device’s datasheet or manual for this information.
Try using a different I2C device to see if the issue is with your current device or with your setup.
Double-check your code to make sure there are no errors or typos in the device address or memory address.
If none of these steps work, it may be helpful to reach out to the manufacturer of your XBee or I2C device for further assistance. book a pick up
I had the software tested and properly working for months now, with at least 4 different I2C devices.
Without changing anything else, just taking my setup to a different computer providing proper 5V via USB port, everything works.
My Mac after a recent upgrade started providing 5.35V through the USB ports instead of 5V, and my cheap development board couldn’t regulate it to 3.3V, it “regulates” to 3.51V. It certainly uses a constant step down rate.
The XBee doesn’t regulate it either, I’ve measured the voltage on the SCL and SDA lines and both were reading the same 3.51V of the main input.
Everything else works, uploading and running code, dealing with devices via UART, formatting the file system, reading/changing parameters via XCTU or via MicroPython code, Network discovery, etc., etc., etc.
I2C seems to be very sensitive to the voltage. I was getting all sorts of errors, not finding the devices, when finding them, the information read from device registers that should be constant would return random values, ENODEV and ETIMEDOUT happening very often and intermittently.
I’m no electronic expert, but the conclusion seems to be quite obvious. This article explains in more details the required voltage levels for I2C to work.
The error message “OSError: [Errno 7019] ENODEV” indicates that the I2C device at the address 0x77 is not responding or is not present on the bus. This could be due to a wiring issue, a problem with the device itself, or a software issue.
Here are a few things you can try to troubleshoot the problem:
Check your wiring: Ensure that the I2C device is connected properly to the XBee end device and that the connections are not loose or short-circuited. Double-check the device’s address to make sure it matches the address you’re trying to read from.
Check the power supply: Make sure that the I2C device is receiving enough power to function properly. Some devices may require a separate power supply or voltage regulator.
Check the I2C bus frequency: Make sure that the I2C bus frequency is set correctly for the device you’re trying to communicate with. Some devices may require a specific frequency or timing.
Try a different I2C device: If possible, try communicating with a different I2C device to make sure that the problem is not with your XBee end device or your Micropython code.
Hopefully, one of these steps will help you identify and resolve the issue. Good luck!
For the record, I was finally able to get a Digi Grove Board, just to find out that it’s voltage regulation is also constant, so I’m still getting 3.52V on the VCC and I2C pins, therefore I2C doesn’t work.
The whole problem is the Macbook, next step is to try an USB hub connected to the computer.
I know this one is stale, but I came across it and I will put in my two cents. I had similar issues a few years back. Was using a simple Bosch BME280 sensor with an XBee3. My troubles related back to the wiring. I made the mistake of using our standard 4 conductor sensor cable and it caused a lot of strange errors. I switched to ribbon cable and all the problems went away. If you are using simple run-of-the-mill jumper wires, those should work great. I2C also doesn’t like long wire lengths because of the issue you mentioned - voltage drops.