Zam
Posts: 7
Joined: Thu Aug 03, 2017 2:28 pm

OSError: Cannot detect RPi-Sense FB device

Tue Aug 29, 2017 6:05 pm

Hello everyone! I have read a lot about this problem but I still can not solve it.

I have a project with the sense hat and LabView, The sense hat worked very well, I left it for a few days and when I wanted to execute one of the examples I get the following error

Traceback (most recent call last):
File "/home/pi/Desktop/PY Sense Hat/Rainbow.py", line 2, in <module>
sense = SenseHat()
File "usr/lib/python3/dist-packages/sense_hat/sense_hat.py", line 39, in init
raise OSError ('Cannot detect %s device' % self.SENSE_HAT_FB_NAME)
OSError: Cannot detect RPi-Sense FB device

Also when I connect the raspberry, the leds of the sense hat immediately turn on and off, just like a white flash

I have raspberry pi 3 and kernel 4.9
Thanks for your attention

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: OSError: Cannot detect RPi-Sense FB device

Fri Sep 01, 2017 3:54 pm

The white flash makes me think the AVR chip on the Sense HAT, which drives the LEDs, has had it's memory corrupted.
If you don't see the rainbow test card then something is not right with the hardware for sure. Do you have another Pi you can try it on?

Zam
Posts: 7
Joined: Thu Aug 03, 2017 2:28 pm

Re: OSError: Cannot detect RPi-Sense FB device

Mon Sep 04, 2017 5:24 pm

Davespice wrote:
Fri Sep 01, 2017 3:54 pm
The white flash makes me think the AVR chip on the Sense HAT, which drives the LEDs, has had it's memory corrupted.
If you don't see the rainbow test card then something is not right with the hardware for sure. Do you have another Pi you can try it on?
Hi Dave :D I tried with a Raspberry Pi 2 and the led matrix of the sense hat lights up rainbow color. But it stays on until I turn off the Raspberry.

I do not know why with the RPI3 the sense hat blinks white

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: OSError: Cannot detect RPi-Sense FB device

Tue Sep 05, 2017 9:11 am

It may be that the EEPROM is not working then. This is a small chip which is used to identify the HAT to the Raspberry Pi. So it may be that it's just not detecting the HAT correctly.

You can force the Raspberry Pi to believe a Sense HAT is connected though and that can sometimes solve the rainbow-forever problem.

Run this command in a terminal window;

Code: Select all

sudo nano /boot/config.txt
Scroll to the bottom of the file and add this line;

Code: Select all

dtoverlay=rpi-sense
Then press Ctrl - O followed by Enter to Save, and Ctrl - X to quit.
Then do a reboot. See if that helps.

Zam
Posts: 7
Joined: Thu Aug 03, 2017 2:28 pm

Re: OSError: Cannot detect RPi-Sense FB device

Tue Sep 05, 2017 4:36 pm

Davespice wrote:
Tue Sep 05, 2017 9:11 am
It may be that the EEPROM is not working then. This is a small chip which is used to identify the HAT to the Raspberry Pi. So it may be that it's just not detecting the HAT correctly.

You can force the Raspberry Pi to believe a Sense HAT is connected though and that can sometimes solve the rainbow-forever problem.

Run this command in a terminal window;

Code: Select all

sudo nano /boot/config.txt
Scroll to the bottom of the file and add this line;

Code: Select all

dtoverlay=rpi-sense
Then press Ctrl - O followed by Enter to Save, and Ctrl - X to quit.
Then do a reboot. See if that helps.
Thank's Dave, I put dtoverlay=rpi-sense in /boot/config.txt but rainbow-forever problem continues, the LEDS will not turn off even if I turn off the raspberry, they only turn off when I disconnect the raspberry :(

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: OSError: Cannot detect RPi-Sense FB device

Fri Sep 08, 2017 12:11 pm

I think you have a faulty Sense HAT, I would return it to the retailer.

Zam
Posts: 7
Joined: Thu Aug 03, 2017 2:28 pm

Re: OSError: Cannot detect RPi-Sense FB device

Tue Sep 12, 2017 6:00 pm

Davespice wrote:
Fri Sep 08, 2017 12:11 pm
I think you have a faulty Sense HAT, I would return it to the retailer.
Please dont tell me that :( The Sense hat it is not mine It's from the company where I'm doing my professional practices

Zam
Posts: 7
Joined: Thu Aug 03, 2017 2:28 pm

Re: OSError: Cannot detect RPi-Sense FB device

Wed Sep 13, 2017 4:27 pm

Davespice wrote:
Fri Sep 08, 2017 12:11 pm
I think you have a faulty Sense HAT, I would return it to the retailer.
Hi Dave, when i put

Code: Select all

sudo i2cdetect -y 1
in terminal the output is:

Code: Select all

[email protected]:~ $ sudo i2cdetect -y 1
     
0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 

10: -- -- -- -- -- -- -- -- -- -- -- -- 1c -- -- -- 

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

50: -- -- -- -- -- -- -- -- -- -- -- -- 5c -- -- 5f 

60: -- -- -- -- -- -- -- -- -- -- 6a -- -- -- -- -- 

70: -- -- -- -- -- -- -- --    
this means that the sensors of the sense hat are detected by my Raspberry???

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5306
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: OSError: Cannot detect RPi-Sense FB device

Wed Sep 13, 2017 4:35 pm

It looks like everything but the actual 'brain' (an AVR microcontroller) of it is detected. That prevents the joystick and LEDs from working.

If you're brave and don't mind potentially making things worse, you can try re-programming it:
https://github.com/raspberrypi/rpi-sense

RogerT
Posts: 3
Joined: Tue Aug 28, 2018 3:11 pm

Re: OSError: Cannot detect RPi-Sense FB device

Tue Aug 28, 2018 3:52 pm

Hi,
I got the same problem with a brand new Sense HAT (mounted on a PïB3).
The LEDs are blinking white very quickly one time at startup.
After different tests, I believe that there is a hardware misconfiguration of this Sense HAT. And some users are complaining about the same: IMU, P/T, humidity/T sensors are fine and accessed but the LEDS (and joystick) have no I2C address.
The solution could be to flash the Sense HAT EEPROM in order to make all its components accessible.
One guy in Norway could successfully flash it from a Pi2 (because from a Pi3B it was not possible, as I saw). And when mounting it back on his Pi3 the Sense HAT was operational.

I tried your script test.py but it failed because the HW is not visible on the I2C bus and sense_hat.py stops when it tries to access this resource (see details hereafter).

Do you have available tools in order to fully check the HW of the Sense HAT from another computer (from the Pi/Raspbian or through TCP/IP or serial port)?
And do you also have checking tools for Pi HW ? (it could be very useful in the future)

Do you have stable eeprom file and tools in order to update the EEPROM?

Thanks

Best regards
Roger

Pls find more technical details herafter:

=================
I encounter the following trouble, connecting a Pi3B with a brand new Sense HAT :
only the IMU (0x1c and 0x6a), P/T (0x5c) and humidity/T sensors (0x5f) are accessible as proven by the software provided at
https://www.raspberrypi.org/documentati ... sense-hat/ :

Code: Select all

$ RTIMULibDrive11
Settings file not found. Using defaults and creating settings file
Detected LSM9DS1 at standard/standard address
Using fusion algorithm RTQF
Detected LPS25H at standard address
Detected HTS221 at standard address
min/max compass calibration not in use
Ellipsoid compass calibration not in use
Accel calibration not in use
LSM9DS1 init complete
Sample rate 0: : roll:5.379217, pitch:0.279984, yaw:-106.367970
Pressure: 1014.2, height above sea level: -7.5, temperature: 37.2, humidity: 31.4
Sample rate 0: : roll:5.396069, pitch:0.350395, yaw:-106.527626
Pressure: 1014.1, height above sea level: -7.5, temperature: 37.4, humidity: 31.8
(measures are continuously displayed until Ctrl-x)

But the LEDs (and Joystick) managed by Atmel ATTINY88 are not accessible (0x46 ; to be checked - does the Joystick the same I2C address as LEDs or an individual address ? -as could be inferred as 0xf3, considering some articles-):

Code: Select all

$ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: — — — — — — — — — — — — —
10: — — — — — — — — — — — — 1c — — —
20: — — — — — — — — — — — — — — — —
30: — — — — — — — — — — — — — — — —
40: — — — — — — — — — — — — — — — —
50: — — — — — — — — — — — — 5c — — 5f
60: — — — — — — — — — — 6a — — — — —
70: — — — — — — — —
So, obviously, the library sense_hat.py is unhappy when it tries to access LEDs (SENSE_HAT_FB_NAME), for instance in the very first example Hello Wordl! at https://projects.raspberrypi.org/en/pro ... ense-hat/4, as in your case:

Code: Select all

$ python main.py
Traceback (most recent call last):
File “main.py”, line 2, in
sense = SenseHat()
File “/home/pi/Documents/SenseHAT/Helloworld/sense_hat/sense_hat.py”, line 39, in init
raise OSError(‘Cannot detect %s device’ % self.SENSE_HAT_FB_NAME)
OSError: Cannot detect RPi-Sense FB device
("RPi-Sense FB" is not present on the I2C bus)

So, it seems clear that there is a HW problem with my/the Sense HAT. I believe it's an HW misconfiguration instead of a LEDS system failure.

I tried another Pi3B: same result.
I tried things like add the following line to /boot/config.txt with no success :

Code: Select all

dtoverlay = rpi-sense

I tried to update the EEPROM of the Sense HAT, the most sensible thing to do, but it failed (certainly because done from a Pi3B, and I have no Pi2 to try with).
cf. https://www.raspberrypi.org/documentati ... sense-hat/
“These steps may not work on Raspberry Pi 2 Model B Rev 1.0 and Raspberry Pi 3 Model B boards. The firmware will take control of I2C0, causing the ID pins to be configured as inputs.”


On march 15, 2016 Simen told us that he could successfully flash the EEPROM of the Sense HAT from a Pi2 and got it operational when putting it back on his Pi3.
I followed the instructions to update EEPROM and it bricked my Sense HAT #326
This seems to confirm my conclusion.
I'm currently stuck here.
===========================================

RogerT
Posts: 3
Joined: Tue Aug 28, 2018 3:11 pm

Re: OSError: Cannot detect RPi-Sense FB device

Tue Aug 28, 2018 7:19 pm

Very latest news:

1/ I flashed the Sense HAT EEPROM, thanks to the RPI-sense resources at https://github.com/raspberrypi/rpi-sense but it failed:

$ make flash

avrdude: error: AVR device not responding
It looks like the AVR component does not answer (Atmel ATTINY88) .

This was some kind of HW test.

2/ I got a new Sense HAT from a shop.
It displayed rainbow immediately at startup which was a good sign.
That SHOULD be told on Getting started with Sense HAT : “Rainbow on Sense HAT at startup = OK / No rainbow = HW problem, pls. return it to the shop”.
Then I could have the very first Hello World! example working and pygame_joystick.pi as well.

Now I have a simple and important question:
How can we fully test the HW of a Pi or a HAT?
(get HW components state and EEPROM configuration).

This is usual for instance when checking a laptop HW.
In my case, flashing the EEPROM could have been enough if the AVR answered.

Thanks

Return to “Astro Pi”

Who is online

Users browsing this forum: No registered users and 2 guests