cyoung / stratux

Aviation weather and traffic receiver based on RTL-SDR.
BSD 3-Clause "New" or "Revised" License
1.07k stars 365 forks source link

BMP280 on i2c bus causing "Error identifying IMU: remote I/O error" log entries and unable to be read #885

Open joshlawless opened 3 months ago

joshlawless commented 3 months ago
  1. Stratux version: v1.6r1-eu030 (150f2828ef)

  2. Stratux config:

    SDR

    • [ ] single
    • [X] dual

    GPS

    • [X] yes
    • [ ] no type: GPYes 2.0

    AHRS

    • [X] yes
    • [ ] no

    power source: USB battery pack

    usb cable: integrated in battery pack

  3. EFB app and version: n/a

    EFB platform: n/a

    EFB hardware: n/a

  4. Description of your issue:

Following the guidance from https://www.reddit.com/r/stratux/comments/135uney/nearly_plug_and_play_ahrs_pressure_sensor_fan/ I decided to swap out my original (wildly inaccurate) AHRS / fan controller 2.0 with Adafruit STEMMA ICM-20948 and BMP280 boards connected via I2C (daisy-chained with the BMP280 between the raspberry and the ICM-20948). The ICM-20948 (downstream in the daisy chain of i2c devices) works fine, but the Stratux web page reads Pressure Altitude: 0', the ALT flag is red, and the stratux log fills up with "Error identifying IMU: remote I/O error" entries and "Last BMP read" values that increase endlessly, unless I disable the Baro switch in settings (in developer mode), at which point the log file is free of these errors.

If I SSH into my Raspberry Pi 3B I can see the BMP280 on the i2C bus at address 0x77, and I can pull the chip ID (0x0058) from register 0xd0, so I think there's nothing wrong with the connection or the hardware. Checking the BMP280.go file I see that address 0x77 is expected, as is chipID 0x58, so I'm at a loss to understand the problem.

Sample log file with "Baro" switch on (no GPS solution because indoors):

2024/03/15 15:09:03 Logfile truncated
2024/03/15 15:09:03 Stratux v1.6r1-eu030 (150f2828ef12cdf1008251f028eb3ff9a6dd66ae) starting.
2024/03/15 15:09:03 Developer mode set
2024/03/15 15:09:03 Entered uatReader() ...
2024/03/15 15:09:05  - stratux-wifi.sh - Running Stratux WiFI Script.
2024/03/15 15:09:05  - stratux-wifi.sh - Killing wpa_supplicant AP services 
2024/03/15 15:09:05  - stratux-wifi.sh - Stopping DHCP services 
2024/03/15 15:09:05 ===== UAT Device Name  : UATRadio v1.0 =====
2024/03/15 15:09:05     UATRadio init success.
2024/03/15 15:09:07 Gps - autodected gps, using following parameters:
2024/03/15 15:09:07 GPS - chip: ublox 8, device: /dev/ublox8, baudrate: 115200
2024/03/15 15:09:07 Error identifying IMU: remote I/O error
2024/03/15 15:09:07 ICM-20948 detected.
2024/03/15 15:09:08  - stratux-wifi.sh - Restarting DHCP services
2024/03/15 15:09:10 GPS - successfully opened serial port /dev/ublox8 with baud 115200   (Valid NMEA msg received)
2024/03/15 15:09:11 Error identifying IMU: remote I/O error
2024/03/15 15:09:15 Error identifying IMU: remote I/O error
2024/03/15 15:09:19 Error identifying IMU: remote I/O error
2024/03/15 15:09:23 Error identifying IMU: remote I/O error
2024/03/15 15:09:27 Error identifying IMU: remote I/O error
2024/03/15 15:09:31 Error identifying IMU: remote I/O error
2024/03/15 15:09:33 stats [started: 30 seconds ago]
2024/03/15 15:09:33  - Disk bytes used = 45 kB (0.0 %), Disk bytes free = 262 MB (100.0 %)
2024/03/15 15:09:33  - CPUTemp=40.78 [40.78 - 43.47] deg C, MemStats.Alloc=740 kB, MemStats.Sys=13 MB, totalNetworkMessagesSent=0
2024/03/15 15:09:33  - UAT/min 0/0 [maxSS=0.00%], ES/min 0/0, Total traffic targets tracked=0
2024/03/15 15:09:33  - Network data messages sent: 0 total.  Network data bytes sent: 0 total.
2024/03/15 15:09:33  - Last GPS fix: 30 seconds ago, GPS solution type: 0 using 0 satellites (0/0 seen/tracked), NACp: 0, est accuracy 999999.00 m
2024/03/15 15:09:33  - GPS vertical velocity: 0.00 ft/sec; GPS vertical accuracy: 999999 m
2024/03/15 15:09:33  - Mode-S Distance factors (<5000, <10000, >10000): 2500.000000, 2800.000000, 3000.000000
2024/03/15 15:09:33 - Last IMU read: now, Last BMP read: 30 seconds ago
2024/03/15 15:09:35 Error identifying IMU: remote I/O error
2024/03/15 15:09:39 Error identifying IMU: remote I/O error
2024/03/15 15:09:43 Error identifying IMU: remote I/O error
2024/03/15 15:09:47 Error identifying IMU: remote I/O error
2024/03/15 15:09:51 Error identifying IMU: remote I/O error
2024/03/15 15:09:55 Error identifying IMU: remote I/O error
2024/03/15 15:09:59 Error identifying IMU: remote I/O error
2024/03/15 15:10:03 Error identifying IMU: remote I/O error
2024/03/15 15:10:03 stats [started: 1 minute ago]
2024/03/15 15:10:03  - Disk bytes used = 45 kB (0.0 %), Disk bytes free = 262 MB (100.0 %)
2024/03/15 15:10:03  - CPUTemp=40.78 [39.70 - 43.47] deg C, MemStats.Alloc=3.3 MB, MemStats.Sys=13 MB, totalNetworkMessagesSent=0
2024/03/15 15:10:03  - UAT/min 0/0 [maxSS=0.00%], ES/min 0/0, Total traffic targets tracked=0
2024/03/15 15:10:03  - Network data messages sent: 0 total.  Network data bytes sent: 0 total.
2024/03/15 15:10:03  - Last GPS fix: 1 minute ago, GPS solution type: 0 using 0 satellites (0/0 seen/tracked), NACp: 0, est accuracy 999999.00 m
2024/03/15 15:10:03  - GPS vertical velocity: 0.00 ft/sec; GPS vertical accuracy: 999999 m
2024/03/15 15:10:03  - Mode-S Distance factors (<5000, <10000, >10000): 2500.000000, 2800.000000, 3000.000000
2024/03/15 15:10:03 - Last IMU read: now, Last BMP read: 1 minute ago
2024/03/15 15:10:07 Error identifying IMU: remote I/O error
2024/03/15 15:10:11 Error identifying IMU: remote I/O error
2024/03/15 15:10:15 Error identifying IMU: remote I/O error
2024/03/15 15:10:19 Error identifying IMU: remote I/O error
2024/03/15 15:10:23 Error identifying IMU: remote I/O error
2024/03/15 15:10:27 Error identifying IMU: remote I/O error
2024/03/15 15:10:31 Error identifying IMU: remote I/O error
2024/03/15 15:10:33 stats [started: 1 minute ago]
2024/03/15 15:10:33  - Disk bytes used = 45 kB (0.0 %), Disk bytes free = 262 MB (100.0 %)
2024/03/15 15:10:33  - CPUTemp=39.70 [39.70 - 43.47] deg C, MemStats.Alloc=2.8 MB, MemStats.Sys=13 MB, totalNetworkMessagesSent=0
2024/03/15 15:10:33  - UAT/min 0/0 [maxSS=0.00%], ES/min 0/0, Total traffic targets tracked=0
2024/03/15 15:10:33  - Network data messages sent: 0 total.  Network data bytes sent: 0 total.
2024/03/15 15:10:33  - Last GPS fix: 1 minute ago, GPS solution type: 0 using 0 satellites (0/0 seen/tracked), NACp: 0, est accuracy 999999.00 m
2024/03/15 15:10:33  - GPS vertical velocity: 0.00 ft/sec; GPS vertical accuracy: 999999 m
2024/03/15 15:10:33  - Mode-S Distance factors (<5000, <10000, >10000): 2500.000000, 2800.000000, 3000.000000
2024/03/15 15:10:33 - Last IMU read: now, Last BMP read: 1 minute ago
2024/03/15 15:10:35 Error identifying IMU: remote I/O error
2024/03/15 15:10:39 Error identifying IMU: remote I/O error
2024/03/15 15:10:43 Error identifying IMU: remote I/O error
2024/03/15 15:10:47 Error identifying IMU: remote I/O error
2024/03/15 15:10:51 Error identifying IMU: remote I/O error
2024/03/15 15:10:54 ===== ES Device Serial: 00000001 PPM 0 Gain 37.2 =====
2024/03/15 15:10:54 Entered ES read() ...
2024/03/15 15:10:54 Executed /opt/stratux//bin/dump1090 --fix --net-stratux-port 30006 --net --device-index 0 --ppm 0 --gain 37.2 --mlat successfully...
2024/03/15 15:10:55 Error identifying IMU: remote I/O error
2024/03/15 15:10:59 Error identifying IMU: remote I/O error
2024/03/15 15:11:03 Error identifying IMU: remote I/O error
2024/03/15 15:11:03 stats [started: 2 minutes ago]
2024/03/15 15:11:03  - Disk bytes used = 49 kB (0.0 %), Disk bytes free = 262 MB (100.0 %)
2024/03/15 15:11:03  - CPUTemp=39.70 [39.17 - 43.47] deg C, MemStats.Alloc=2.4 MB, MemStats.Sys=13 MB, totalNetworkMessagesSent=0
2024/03/15 15:11:03  - UAT/min 0/0 [maxSS=0.00%], ES/min 0/0, Total traffic targets tracked=0
2024/03/15 15:11:03  - Network data messages sent: 0 total.  Network data bytes sent: 0 total.
2024/03/15 15:11:03  - Last GPS fix: 2 minutes ago, GPS solution type: 0 using 0 satellites (0/0 seen/tracked), NACp: 0, est accuracy 999999.00 m
2024/03/15 15:11:03  - GPS vertical velocity: 0.00 ft/sec; GPS vertical accuracy: 999999 m
2024/03/15 15:11:03  - Mode-S Distance factors (<5000, <10000, >10000): 2500.000000, 2800.000000, 3000.000000
2024/03/15 15:11:03 - Last IMU read: now, Last BMP read: 2 minutes ago
2024/03/15 15:11:07 Error identifying IMU: remote I/O error
2024/03/15 15:11:11 Error identifying IMU: remote I/O error
2024/03/15 15:11:15 Error identifying IMU: remote I/O error
2024/03/15 15:11:19 Error identifying IMU: remote I/O error
2024/03/15 15:11:23 Error identifying IMU: remote I/O error
2024/03/15 15:11:27 Error identifying IMU: remote I/O error

Sample log file with "Baro" switch off (after restarting the Stratux application from the developer menu):

2024/03/15 15:13:50 Logfile truncated
2024/03/15 15:13:50 Stratux v1.6r1-eu030 (150f2828ef12cdf1008251f028eb3ff9a6dd66ae) starting.
2024/03/15 15:13:50 Developer mode set
2024/03/15 15:13:50 client connected: 192.168.10.23:4000 (Office-iMac).
2024/03/15 15:13:50 client connected: 192.168.10.23:2000 (Office-iMac).
2024/03/15 15:13:50 Added critical system error: System uptime 297 seconds. Daemon was restarted.

2024/03/15 15:13:50 Entered uatReader() ...
2024/03/15 15:13:50 client connected: 192.168.10.23:49002 (Office-iMac).
2024/03/15 15:13:51 ===== UAT Device Name  : UATRadio v1.0 =====
2024/03/15 15:13:51     UATRadio init success.
2024/03/15 15:13:51 ===== ES Device Serial: 00000001 PPM 0 Gain 37.2 =====
2024/03/15 15:13:51 Entered ES read() ...
2024/03/15 15:13:51 Executed /opt/stratux//bin/dump1090 --fix --net-stratux-port 30006 --net --device-index 0 --ppm 0 --gain 37.2 --mlat successfully...
2024/03/15 15:13:54 ICM-20948 detected.
2024/03/15 15:13:54 Gps - autodected gps, using following parameters:
2024/03/15 15:13:54 GPS - chip: ublox 8, device: /dev/ublox8, baudrate: 115200
2024/03/15 15:13:57 GPS - successfully opened serial port /dev/ublox8 with baud 115200   (Valid NMEA msg received)
2024/03/15 15:14:20 stats [started: 30 seconds ago]
2024/03/15 15:14:20  - Disk bytes used = 49 kB (0.0 %), Disk bytes free = 262 MB (100.0 %)
2024/03/15 15:14:20  - CPUTemp=40.78 [40.24 - 41.32] deg C, MemStats.Alloc=2.3 MB, MemStats.Sys=13 MB, totalNetworkMessagesSent=47
2024/03/15 15:14:20  - UAT/min 0/0 [maxSS=0.00%], ES/min 0/0, Total traffic targets tracked=0
2024/03/15 15:14:20  - Network data messages sent: 41 total.  Network data bytes sent: 777 total.
2024/03/15 15:14:20  - Last GPS fix: 30 seconds ago, GPS solution type: 0 using 0 satellites (0/0 seen/tracked), NACp: 0, est accuracy 999999.00 m
2024/03/15 15:14:20  - GPS vertical velocity: 0.00 ft/sec; GPS vertical accuracy: 999999 m
2024/03/15 15:14:20  - Mode-S Distance factors (<5000, <10000, >10000): 2500.000000, 2800.000000, 3000.000000
2024/03/15 15:14:20 - Last IMU read: now
2024/03/15 15:14:50 stats [started: 1 minute ago]
2024/03/15 15:14:50  - Disk bytes used = 49 kB (0.0 %), Disk bytes free = 262 MB (100.0 %)
2024/03/15 15:14:50  - CPUTemp=40.24 [39.70 - 41.32] deg C, MemStats.Alloc=2.0 MB, MemStats.Sys=13 MB, totalNetworkMessagesSent=98
2024/03/15 15:14:50  - UAT/min 0/0 [maxSS=0.00%], ES/min 0/0, Total traffic targets tracked=0
2024/03/15 15:14:50  - Network data messages sent: 86 total.  Network data bytes sent: 1551 total.
2024/03/15 15:14:50  - Last GPS fix: 1 minute ago, GPS solution type: 0 using 0 satellites (0/0 seen/tracked), NACp: 0, est accuracy 999999.00 m
2024/03/15 15:14:50  - GPS vertical velocity: 0.00 ft/sec; GPS vertical accuracy: 999999 m
2024/03/15 15:14:50  - Mode-S Distance factors (<5000, <10000, >10000): 2500.000000, 2800.000000, 3000.000000
2024/03/15 15:14:50 - Last IMU read: now
2024/03/15 15:15:20 stats [started: 1 minute ago]
2024/03/15 15:15:20  - Disk bytes used = 49 kB (0.0 %), Disk bytes free = 262 MB (100.0 %)
2024/03/15 15:15:20  - CPUTemp=40.24 [39.70 - 41.32] deg C, MemStats.Alloc=2.3 MB, MemStats.Sys=13 MB, totalNetworkMessagesSent=147
2024/03/15 15:15:20  - UAT/min 0/0 [maxSS=0.00%], ES/min 1/1, Total traffic targets tracked=0
2024/03/15 15:15:20  - Network data messages sent: 130 total.  Network data bytes sent: 2277 total.
2024/03/15 15:15:20  - Last GPS fix: 1 minute ago, GPS solution type: 0 using 0 satellites (0/0 seen/tracked), NACp: 0, est accuracy 999999.00 m
2024/03/15 15:15:20  - GPS vertical velocity: 0.00 ft/sec; GPS vertical accuracy: 999999 m
2024/03/15 15:15:20  - Mode-S Distance factors (<5000, <10000, >10000): 2500.000000, 2800.000000, 3000.000000
2024/03/15 15:15:20 - Last IMU read: now

Output of i2cdetect when SSHed into raspberry:

pi@stratux:~ $ i2cdetect -y 1
     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: -- -- -- -- -- -- -- 77                         
pi@stratux:~ $ 

Output of i2cdump of address 0x77 (bmp280 is in standby mode, not sure how to write the correct byte value to force normal mode):

root@stratux:/dev# i2cdump -y 1 0x77 w
     0,8  1,9  2,a  3,b  4,c  5,d  6,e  7,f
00: 0000 0000 0000 0000 0000 0000 0000 0000 
08: 0000 0000 0000 0000 0000 0000 0000 0000 
10: 0000 0000 0000 0000 0000 0000 0000 0000 
18: 0000 0000 0000 0000 0000 0000 0000 0000 
20: 0000 0000 0000 0000 0000 0000 0000 0000 
28: 0000 0000 0000 0000 0000 0000 0000 0000 
30: 0000 0000 0000 0000 0000 0000 0000 0000 
38: 0000 0000 0000 0000 0000 0000 0000 0000 
40: 0000 0000 0000 0000 0000 0000 0000 0000 
48: 0000 0000 0000 0000 0000 0000 0000 0000 
50: 0000 0000 0000 0000 0000 0000 0000 0000 
58: 0000 0000 0000 0000 0000 0000 0000 0000 
60: 0000 0000 0000 0000 0000 0000 0000 0000 
68: 0000 0000 0000 0000 0000 0000 0000 0000 
70: 0000 0000 0000 0000 0000 0000 0000 0000 
78: 0000 0000 0000 0000 0000 0000 0000 8100 
80: 7081 9070 9f90 589f 3458 3934 0039 9600 
88: 6d96 1f6d 671f 3267 0032 ce00 91ce 8891 
90: d688 d0d6 0bd0 c30b 1dc3 a21d ffa2 f9ff 
98: fff9 8cff 3c8c f83c c6f8 70c6 1770 0017 
a0: 0000 0800 0008 0000 0000 0000 0000 0000 
a8: 0000 0000 0000 3300 0033 0000 c000 00c0 
b0: 5400 0054 0000 0000 0000 6000 0260 0002 
b8: 0100 ff01 08ff 1308 6013 0360 0003 0000 
c0: 0000 0000 ff00 00ff 0000 0000 0000 0000 
c8: 0000 0000 0000 0000 0000 0000 0000 5800 
d0: 0058 0000 0000 0000 0000 0000 0000 0000 
d8: 0000 0000 0000 0000 0000 0000 0000 0000 
e0: 0000 0000 0000 0000 0000 0000 0000 0000 
e8: 0000 0000 0000 0000 0000 0000 0000 0000 
f0: 0000 0000 0000 0000 0000 0000 8000 0080 
f8: 0000 8000 0080 0000 8100 0000 0000 0000 

This is following a fresh install of the v1.6r1-eu030, where I didn't keep the .conf file, but re-configured the wireless settings from the web interface, so as clean a fresh install as possible.

I'd be grateful for any guidance on how to get the BMP280 working

lynxul25 commented 4 weeks ago

Same issue here, 0x77 on the board, errors running in the logs. 2024/10/29 11:51:02 - Last IMU read: now, Last BMP read: 1 minute ago 2024/10/29 11:51:03 Error identifying IMU: remote I/O error