This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I2C driver doesn't load after Pi3 to Pi4 upgrade
#1
I recently upgraded my Openplotter deployment from RPi3 to RPi4.  The upgrade was pretty smooth.  However, when launching the I2C GUI nothing happens.  Running openplotter-i2c from the command line results in:

Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/openplotterI2c/startup.py", line 53, in check
    subprocess.check_output(['i2cdetect', '-y', '0']).decode(sys.stdin.encoding)
  File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['i2cdetect', '-y', '0']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/openplotter-i2c", line 11, in <module>
    load_entry_point('openplotterI2c==2.2.0', 'console_scripts', 'openplotter-i2c')()
  File "/usr/lib/python3/dist-packages/openplotterI2c/openplotterI2c.py", line 724, in main
    MyFrame().Show()
  File "/usr/lib/python3/dist-packages/openplotterI2c/openplotterI2c.py", line 95, in __init__
    self.checkInterface()
  File "/usr/lib/python3/dist-packages/openplotterI2c/openplotterI2c.py", line 162, in checkInterface
    result = cheking.check()
  File "/usr/lib/python3/dist-packages/openplotterI2c/startup.py", line 76, in check
    if ii['pipeElements'][0]['options']['type']=='SignalK':
KeyError: 'type'

I have both a BME380 and an MPU9250 on the bus.  MPU9250 is picked up by pypilot OK.  

Running i2cdetect -l shows i2c-1 active, nothing for i2c-0.  

i2cdetect -y 1 produces:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- 76 --

I've traced some of the code back but I'm not a python guy so I'm not sure why the script is failing where it is.  Hoping someone can point me in the right direction for a fix.  Thank you!
Reply
#2
are you running latest version of openplotter-i2c?
Reply
#3
2.2.0-beta
Reply
#4
Anyone have any thoughts on how to correct this?
Reply
#5
(2020-11-29, 07:52 PM)pillonm Wrote: Anyone have any thoughts on how to correct this?

Use an new default /boot/config.txt 

If this does Not work, delete the i2c Setting in openplotter config file.
I solved an outdated moitessier stetting in config.TXT this way.
Bye
Reply
#6
is it turned on in raspi-config ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)