I2C i2cdetect command not working on my Onion2+



  • Hi All,

    So I've managed to flash two Omega Onions with the latest firmware, in both cases I had an issue connecting to wifi with the second case I had to manually download the latest image and run it in via USB. This experience already gives the perception that the Onion is buggy in general. I used the official expansion dock etc.

    Anyhow, my project needs to interact with a I2C "MCP23017" port-expander IC.
    I decided to test the i2c functions available through the command line and like my experience using
    a raspberry pi the i2cdetect is very useful for scanning available I2C devices. Strange thing is, with nothing connected to the I2C (just plain Omega Onion2+ and dock) the command returns showing "ghost devices" in the range: 0x30 -> 0x37 and 0x50 -> 0x5f:
    0_1502707447603_a0b4be76-9fc4-433e-979f-b915e1ee01df-image.png

    Then with the port expander connected up I am able to get some coms done using the i2cget command but the i2cdetect still shows the same output.

    A suggestion was given to use the -q switch with the i2cdetect command however this just returns no devices detected even with my port expander on port 0x20.

    I think there is an issue with the i2cdetect command, is it possible to get the source code for this binary?

    Any other information is also appreciated.
    Thanks.


    Log in to reply
     


  • Hi Umar,
    The i2cdetect doesn't work properly but you can still use the i2c on omega2. if you are looking for sample code to use MCP23017 you can find them over here
    MCP23017 python lib
    I have been using Omega 2 i2c to control relay, read sensors and ADC without any problems.
    Hope this helps.
    Thanks



  • Just to help others out look here for the bitbanged approach that @UFD created
    https://community.onion.io/topic/2312/i2c-detect-slave-method


Log in to reply
 

1 out of 3

Looks like your connection to Community was lost, please wait while we try to reconnect.