My log says that "N...
 
Notifications
Clear all

My log says that "No FabScanPi HAT or compatible device is found". What can i do?  

Page 1 / 2
   RSS

0

If you are have the Message "No FabScanPi HAT or compatible device found" in your log file you need to check the following options.

  1. First double check the solder joints of the 40-pin Header of the FabScanPi-HAT. If you are sure that there are no 'cold' solder joints move on reading, otherwise resolder those joints. Try again and have a look to the logs. If the error still occurs continue reading with 3.
  2. Check if your fabscanpi-server version is 0.8.0 or higher. Have a look into your default.config.json and check the serial baudrate. It should be 57600 for fabscanpi-server >= 0.4.2. If you changed the baudrate and the error still occurs continue with reading 3.
  3. Your bootloader is bricked, what means that you need to flash a new bootloader to your FabScanPi HAT. Continue with reading "How to flash the FabScanPi HAT Bootloader?"

How to flash the Bootloader?

! If you want to leave the HAT connected to the pi during the flashing process. Be sure you stopped the FabScanPi Server. You can use the following command to do that. !

$ sudo /etc/init.d/fabscanpi-server stop 

Option A: Using Raspberry Pi for flashing.

Connect the FabScanPi HAT pins as described below. (solder some wires to the solder pads). Use a resistor 2k2...5k6 in series for every signal. (see picture for details)

RPi  -> Target
IO25 -> Reset
IO11 -> SCK
IO10 -> MOSI
IO9  -> MISO
GND  -> GND
isp pi hat

Download bootloader:

$ wget  https://github.com/watterott/RPi-UNO-HAT/raw/master/docs/bloader.hex  

Edit the file avrdude.conf  and add the following lines:

$ sudo nano /usr/local/etc/avrdude.conf 
programmer id = "pi_isp"; 
desc = "GPIO bitbang";
type = "linuxgpio";
reset = 25; sck = 11;
mosi = 10;
miso = 9;
;

Flash bootloader:

$ avrdude -c pi_isp -p m328p -e -U flash:w:bloader.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0x05:m -U lock:w:0x0F:m

Option B: Using Arduino Uno (device ttyACM0 or ttyUSB0 ) for flashing.

Connection (Arduino Uno connected to RPi via USB):

Uno -> Target 
D10 -> Reset
D13 -> SCK
D11 -> MOSI
D12 -> MISO
GND -> GND
isp arduino hat

Download bootloader and ISP firmware:

$ wget  https://raw.githubusercontent.com/watterott/RPi-UNO-HAT/master/software/bloader.hex 
$ wget  https://raw.githubusercontent.com/watterott/RPi-UNO-HAT/master/software/isp.hex  

Flash ISP firmware to Arduino Uno:

 $ avrdude -c arduino -P /dev/ttyUSB0 -b 115200 -p m328p -e -U flash:w:isp.hex:i 

or

 $ avrdude -c arduino -P /dev/ttyACM0 -b 115200 -p m328p -e -U flash:w:isp.hex:i 

Flash bootloader:

$ avrdude -c stk500v1 -P /dev/ttyUSB0 -b 19200 -p m328p -e -U flash:w:bloader.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0x05:m -U lock:w:0x0F:m

or

$ avrdude -c stk500v1 -P /dev/ttyACM0 -b 19200 -p m328p -e -U flash:w:bloader.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0x05:m -U lock:w:0x0F:m

 

Posted by: @mario

If you are have the Message "No FabScanPi HAT or compatible device found" in your log file you need to check the following options.

  1. First double check the solder joints of the 40-pin Header of the FabScanPi-HAT. If you are sure that there are no 'cold' solder joints move on reading, otherwise resolder those joints. Try again and have a look to the logs. If the error still occurs continue reading with 3.
  2. Check if your fabscanpi-server version is 0.8.0 or higher. Have a look into your default.config.json and check the serial baudrate. It should be 57600 for fabscanpi-server >= 0.4.2. If you changed the baudrate and the error still occurs continue with reading 3.
  3. Your bootloader is bricked, what means that you need to flash a new bootloader to your FabScanPi HAT. Continue with reading "How to flash the FabScanPi HAT Bootloader?"

How to flash the Bootloader?

! If you want to leave the HAT connected to the pi during the flashing process. Be sure you stopped the FabScanPi Server. You can use the following command to do that. !

$ sudo /etc/init.d/fabscanpi-server stop 

Option A: Using Raspberry Pi for flashing.

Connect the FabScanPi HAT pins as described below. (solder some wires to the solder pads). Use a resistor 2k2...5k6 in series for every signal. (see picture for details)

RPi  -> Target
IO25 -> Reset
IO11 -> SCK
IO10 -> MOSI
IO9  -> MISO
GND  -> GND
isp pi hat

Download bootloader:

$ wget  https://github.com/watterott/RPi-UNO-HAT/raw/master/docs/bloader.hex  

Edit the file avrdude.conf  and add the following lines:

$ sudo nano /usr/local/etc/avrdude.conf 
programmer id = "pi_isp"; 
desc = "GPIO bitbang";
type = "linuxgpio";
reset = 25; sck = 11;
mosi = 10;
miso = 9;
;

Flash bootloader:

$ avrdude -c pi_isp -p m328p -e -U flash:w:bloader.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0x05:m -U lock:w:0x0F:m

Option B: Using Arduino Uno (device ttyACM0 or ttyUSB0 ) for flashing.

Connection (Arduino Uno connected to RPi via USB):

Uno -> Target 
D10 -> Reset
D13 -> SCK
D11 -> MOSI
D12 -> MISO
GND -> GND
isp arduino hat

Download bootloader and ISP firmware:

$ wget  https://raw.githubusercontent.com/watterott/RPi-UNO-HAT/master/software/bloader.hex 
$ wget  https://raw.githubusercontent.com/watterott/RPi-UNO-HAT/master/software/isp.hex  

Flash ISP firmware to Arduino Uno:

 $ avrdude -c arduino -P /dev/ttyUSB0 -b 115200 -p m328p -e -U flash:w:isp.hex:i 

or

 $ avrdude -c arduino -P /dev/ttyACM0 -b 115200 -p m328p -e -U flash:w:isp.hex:i 

Flash bootloader:

$ avrdude -c stk500v1 -P /dev/ttyUSB0 -b 19200 -p m328p -e -U flash:w:bloader.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0x05:m -U lock:w:0x0F:m

or

$ avrdude -c stk500v1 -P /dev/ttyACM0 -b 19200 -p m328p -e -U flash:w:bloader.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0x05:m -U lock:w:0x0F:m

 

Thanks Mario, flashing the bootloader worked for me! So happy.

I download this hex file : https://github.com/watterott/RPi-UNO-HAT/blob/master/software/bloader.hex

 

and used to flash this: sudo avrdude -c pi_isp -p m328p -e -U flash:w:bloader.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0x05:m -U lock:w:0x0F:m

0

Having the same problem and looks like I need to Flash the FabscanPI HAT bootloader.  Have a couple of questions about flashing using Option A.

  1. Please confirm the correct Resistor value (2k2...5k6) Is this 2k ohm to 5k ohm?
  2. Should the ,conf file already exist or does it need to be created new?
  3. As per the Watterott forum you mention - when the bootloader is flashed, what results are expected when the test is run?

Please let me now.

Thanks 

@mcinerney

Just curious if you ever got an answer I've followed the directions and can obtain the bootloader hex, but when I run the next command to flash the boot loader it says pi_spi does not exist? 

 

I'm curious if this is due to not editing the .conf file correctly or not 

 

Is there a folder to be in before typing the command like the log file or am I totally missing something? 

 

Also have 2 scan hats and both don't work... 

 

I will bet watterott never flashed the bootloader to begin with 

 

@trife

I was able to get one of my hats to work with the new software and the current boot loader.  I was connected to the hat as per the above documentation.  It would be good to have a log of what you get when you try and run the commands.

Mario is the expert and really helped me get mine going.

 

0

Hi @mario,

Thanks for the topic

It seems that the page at

https://github.com/watterott/RPi-UNO-HAT/raw/master/docs/bloader.hex

no longer exist.

Should we use

https://github.com/watterott/RPi-UNO-HAT/blob/master/software/bloader.hex

instead?
Thanks for your support



0
Posted by: @lre

It seems that the page at

https://github.com/watterott/RPi-UNO-HAT/raw/master/docs/bloader.hex

no longer exist.

Should we use

https://github.com/watterott/RPi-UNO-HAT/blob/master/software/bloader.hex

instead?

Yes. Thank you for the hint. I updated the links in the post.

0

Hi @Mario

I followed the instructions and used the new .hex file as per your post.

When I try and flash toe boot loader I get the message below (highlighted in Red), do you know what I am doing wrong?

I am using PUTTY to communicate with the PI and have logged in using "pi" and "raspberry" as the password.

*************************************

login as: pi

@192.168.1.36's">pi@192.168.1.36's password:

Linux fabscanpi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l

 

The programs included with the Debian GNU/Linux system are free software;

the exact distribution terms for each program are described in the

individual files in /usr/share/doc/*/copyright.

 

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent

permitted by applicable law.

Last login: Fri Nov 22 04:22:37 2019 from 192.168.1.7

 

SSH is enabled and the default password for the 'pi' user has not been changed.

This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

 

pi@fabscanpi:~ $ avrdude -c pi_isp -p m328p -e -U flash:w:bloader.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0x05:m -U lock:w:0x0F:m

Can't open gpioX/direction: Permission denied

 

avrdude done.  Thank you.

 

pi@fabscanpi:~ $

*****************************************************

Can you help me understand what is going wrong?

Thanks,

0
Posted by: @mcinerney

pi@fabscanpi:~ $ avrdude -c pi_isp -p m328p -e -U flash:w:bloader.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0x05:m -U lock:w:0x0F:m

try to run it with

sudo avrdude -c pi_isp -p m328p -e -U flash:w:bloader.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0x05:m -U lock:w:0x0F:m
0

@Mario,

Thanks for the reply.

That seemed to let me download and install the bootloader.  The Pi continued to boot to the command line and reported the following.  

pi@fabscanpi:~ $ cat /var/log/fabscanpi/fabscanpi.log

2019-11-22 22:25:21,319 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051

2019-11-22 22:25:21,324 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner

2019-11-22 22:25:23,349 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found

2019-11-22 22:25:23,353 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811

2019-11-22 22:25:25,572 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7

2019-11-22 22:25:27,839 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7

2019-11-22 22:25:28,393 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0

 

pi@fabscanpi:~ $ ps -ef | grep -i fabscanpi | grep -i python

root       520     1  5 22:25 ?        00:00:07 /usr/bin/python /usr/bin/fabscanpi-server --config=/etc/fabscanpi/default.config.json --settings=/etc/fabscanpi/default.settings.json --logfile=/var/log/fabscanpi/fabscanpi.log

 

pi@fabscanpi:~ $ sudo service fabscanpi restart

Failed to restart fabscanpi.service: Unit fabscanpi.service not found.

Now there isn't a "HAT not found message" in the log file - so i think we are on the right track.

I disabled SSH and set the Pi configuration to the desktop and now the browser reports the same screen via the IP address "The FabScanPi server is currently not running" and I see a flashing courser and mouse pointer on the attached HDMI monitor.

Please give me your thoughts.

Thanks

0
Posted by: @mcinerney

pi@fabscanpi:~ $ cat /var/log/fabscanpi/fabscanpi.log

2019-11-22 22:25:21,319 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051

2019-11-22 22:25:21,324 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner

2019-11-22 22:25:23,349 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found

2019-11-22 22:25:23,353 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811

2019-11-22 22:25:25,572 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7

2019-11-22 22:25:27,839 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7

2019-11-22 22:25:28,393 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0

I need more logging here. This log snippet is too short. 

0

@Mario,

I will have to see how to do that.  In the mean time I did some further testing and I want to make sure that the correct bloader.hex file is loaded.  When I use the bloader.hex file from the location " https://github.com/watterott/RPi-UNO-HAT/blob/master/software/bloader.hex " I receive the following message.

pi@fabscanpi:~ $ sudo avrdude -c pi_isp -p m328p -e -U flash:w:bloader.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0x05:m -U lock:w:0x0F:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: erasing chip
avrdude: reading input file "bloader.hex"
avrdude: invalid record at line 769 of "bloader.hex"
avrdude: read from file 'bloader.hex' failed

avrdude: safemode: Fuses OK (E:FD, H:D6, L:FF)

avrdude done. Thank you.

The file that I have loaded is from this location "https://github.com/watterott/RPi-UNO-HAT/raw/master/software/bloader.hex"

Am I using the wrong bloader.hex file?

Thanks again...

0
Posted by: @mcinerney

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: erasing chip
avrdude: reading input file "bloader.hex"

Looks very good so far. 

Can you post the complete output of the Bootloader file here. You can use the following command.

cat bloader.hex 

 

0

@Mario

Not sure how to attach a file, It is a big file, here you go.

Hope this helps.

Thanks again

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://github.githubassets.com">
<link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars2.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars3.githubusercontent.com">
<link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
<link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">

....
0

Just edited your post, because the first lines give us clarity. That is definitely not a correct hex file. It looks more like a dump of the GitHub html page.

The header of the file should start with this lines... 

:107E00001F92CDB7DEB7112484B714BE982F9D7092 
:107E100009F0E6D082E08093C00088E18093C10041
:107E200086E08093C20080E18093C4008EE0C3D0DE
:107E300010928500109284004899FECF489BFECF97
:107E400081E0809381004899FECF109281002091BB
:107E50008400822F20918500922F089644E0969509
:107E600087954A95E1F701978093C40098D08033B5
:107E7000E9F7A7D0812C912C13E001E025E0F22E48
:107E800031E1E32E8CD0813479F489D0898399D083

....

Try downloading again by doing:

wget  https://raw.githubusercontent.com/watterott/RPi-UNO-HAT/master/software/bloader.hex 
0

Ok, I think I figured out how to add a file as a attachment.

 

0

Understand - That file location gets me this file.

Which is what I think we need, I will download it to the HAT and see what happens.

:107E00001F92CDB7DEB7112484B714BE982F9D7092
:107E100009F0E6D082E08093C00088E18093C10041
:107E200086E08093C20080E18093C4008EE0C3D0DE
:107E300010928500109284004899FECF489BFECF97
:107E400081E0809381004899FECF109281002091BB
:107E50008400822F20918500922F089644E0969509
:107E600087954A95E1F701978093C40098D08033B5
:107E7000E9F7A7D0812C912C13E001E025E0F22E48
:107E800031E1E32E8CD0813479F489D0898399D083
:107E90008981823811F482E005C0813811F486E0CE
:107EA00001C083E075D071C0823411F484E103C055
:107EB000853419F485E08DD068C0853549F46FD0DC
:107EC000D82E6DD08D2C912C982A880C991C5CC0D2
:107ED000863521F484E07DD080E0E4CF843609F05B
:107EE00036C05DD05CD0D82E5AD0C82EA12CBB2471
:107EF000B39455D0F50181935F01DE12FACF61D0C2
:107F0000F5E4CF1201C0FFCFF40117BFE89507B623
:107F100000FCFDCFA401A0E0B1E02C911296CD01B0
:107F20000197FC01808130E0382BFA01090107BF7D
:107F3000E89511244E5F5F4FDA12EFCFF401F7BEE0
:107F4000E89507B600FCFDCFE7BEE8951EC0843774
:107F500071F425D024D0D82E22D033D05401F5018D
:107F600085915F0115D0DA94D110F9CF0EC0853715
:107F700039F427D08EE10CD085E90AD08FE092CF7A
:107F8000813511F488E017D01CD080E101D07ACF80
:107F90009091C00095FFFCCF8093C600089580911A
:107FA000C00087FFFCCF8091C00084FD01C0A89570
:107FB0008091C6000895E0E6F0E098E19083808328
:107FC0000895EDDF803219F088E0F5DFFFCF84E11E
:107FD000DFCFCF93C82FE3DFC150E9F7CF91F1CFC7
:0C7FE000282E80E0E8DFE0E0FF27099495
:0400000300007E007B
:00000001FF

 

0

Hi @Mario,

after many trials und reading (almost) all related posts in the forum, I'm still not able to get the Fabscanpi-server started.

I used the image to install Fabscanpi (SW is v.2019-11-08-22-00).

I followed all recommended steps to solve the issue: Changes made to the default.settings.json - file, re-flashed the bootloader, checked for cold solder joints and checked the serial interface (with a scope) while server is starting. All positive.

Below the fabscanpi.log; it always stops trying to connect to the Arduino.

2019-12-01 14:36:25,296 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051
2019-12-01 14:36:25,298 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-01 14:36:25,961 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-01 14:36:25,963 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-01 14:36:28,140 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-01 14:36:30,394 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-01 14:36:30,946 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0

 

Please let me know any further ideas on what I can check or change, to get the Scanner up and running.

@hexa-quax

Good Day,

What changes did you make to the "default.settings.json" - file.

Thanks,

@hexa-quax and Mario,

Additionally, I decided to purchase a new HAT and PI, thinking I might have some bad hardware. And wanting to have a fresh start.

Wish me luck!!!

 

Page 1 / 2
Share: