Notifications
Clear all

[Solved] HAT not working - same as everyone else


JustinB
Posts: 6
Topic starter
(@justinb)
Active Member
Joined: 3 years ago

Mario, I am incredibly frustrated with this damn thing. I have sunk a few hundred dollars into building a fabscan the last couple months. The first HAT didn't work, so I bought another thinking maybe I messed it up. But the results are the same. The Arduino in the HAT is not responding. I have tried your instructions to reflash it using an Uno, and that didn't work either. This thing is nothing but frustration and wasted money.

Logs are below. There is very little info because this is a fresh install. And no, I don't have the previous logs. Just look at everyone else's with this problem.

I can perform advanced troubleshooting. I have a two channel oscilloscope here, but I'm not going to waste any more of my time trying to make sense of this by going through the schematics. If you need any measurements to fix this, tell me. Otherwise, the whole thing may go in the trash.

pi@fabscanpi:~ $ sudo /etc/init.d/fabscanpi-server status

fabscanpi-server: running.

pi@fabscanpi:~ $ sudo systemctl status fabscanpi-server

● fabscanpi-server.service - LSB: Start and stop the fabscanpi-server daemon
Loaded: loaded (/etc/init.d/fabscanpi-server; generated)
Active: active (running) since Fri 2019-12-20 1612 GMT; 10min ago
Docs: man:systemd-sysv-generator(8)
Process: 463 ExecStart=/etc/init.d/fabscanpi-server start (code=exited, status=0/SUCCESS)
Tasks: 10 (limit: 2077)
Memory: 185.3M
CGroup: /system.slice/fabscanpi-server.service
└─559 /usr/bin/python /usr/bin/fabscanpi-server --config=/etc/fabscanpi/default.config.json --s

Dec 20 1637 fabscanpi sudo[687]: pam_unix(sudo session closed for user root
Dec 20 1637 fabscanpi sudo[719]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/avrdude
Dec 20 1637 fabscanpi sudo[719]: pam_unix(sudo session opened for user root by (uid=0)
Dec 20 1637 fabscanpi sudo[725]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/strace
Dec 20 1637 fabscanpi sudo[725]: pam_unix(sudo session opened for user root by (uid=0)
Dec 20 1637 fabscanpi sudo[734]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/avrdude
Dec 20 1637 fabscanpi sudo[734]: pam_unix(sudo session opened for user root by (uid=0)
Dec 20 1638 fabscanpi sudo[734]: pam_unix(sudo session closed for user root
Dec 20 1639 fabscanpi sudo[725]: pam_unix(sudo session closed for user root
Dec 20 1639 fabscanpi sudo[719]: pam_unix(sudo session closed for user root

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

2019-12-20 1633,021 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051
2019-12-20 1633,025 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-20 1635,015 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-20 1635,021 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-20 1637,326 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-20 1639,528 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-20 1640,074 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0
23 Replies
JustinB
Posts: 6
Topic starter
(@justinb)
Active Member
Joined: 3 years ago

Update -

Now the AVR is completely bricked.

pi@fabscanpi:~ $ avrdude -c stk500v1 -P /dev/ttyACM0 -b 19200 -p m328p -e -U flashbloader.hex:i -U lfusem -U hfusem -U efusem -U lockm

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.

pi@fabscanpi:~ $ avrdude -c stk500v1 -b 19200 -P /dev/ttyACM0 -p ATmega328P -v

avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/pi/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/ttyACM0
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.
mario
Posts: 570
Admin
(@mario)
Member
Joined: 4 years ago

First of all I think the caption can be easily misunderstood. Yes there are some users having this problem. And I am still trying to reproduce this behavior on my FabScans. But tested a couple of fresh HATs and it worked, so it is hard to find the error when it does not occur. But you can be sure that it is in my interest to help all of you people who are having this problem. 

There are different reasons why the HAT will show a behavior like this. 

  1. 1. Cold solder joints ( I think not in your case
  2. A corrupted bootloader ( maybe your case )
  3. A FabScanPi software bug

What we need to do in your case is, that we have to fix your boot loader problem ( your second post). 

Posted by: @justinb

avrdude -c stk500v1 -P /dev/ttyACM0 -b 19200 -p m328p -e -U flashbloader.hex:i -U lfusem -U hfusem -U efusem -U lockm

But you should 

  • try to use port /dev/ttyAMA0
  • baudrate 57600 or 115200.  (better 57600) , of course 19200 maybe also works. 

You wrote that you have more than one HAT. We should try one of the HATs where you are able to read the device signature. The we should try to flash the latest FabScanPi Firmware manually. I will capture a log of my running setup this evening, so you are able to see a sequence on how the scanner starts. I will also reflash a boot loader with my described method, just to prove again that the description is correct. 

I am sure we will get this "damn thing" running. ? 

JustinB
Posts: 6
Topic starter
(@justinb)
Active Member
Joined: 3 years ago

Let me clarify. I posted about having issues with the bootloader not flashing two months ago, but my post was never answered. I also sent an email to you on a different subject with questions I had prior to putting money into this project. I didn't get a response and my partner in this build (another tech that needs a 3d scanner to improve his business) to proceed, so we went with just the info we could find here and the other fabscan resources. I can't find that other HAT right now. This unresponsive one is the only one I have on my workbench right now.

So I am a little angry that it isn't working. I should have said "same as some of these previous posts". I apologize for that.

I will see what I can do and get back to you. Thank you for responding.

mario
Admin
(@mario)
Joined: 4 years ago

Member
Posts: 570

@justinb sorry for not responding earlier to your posts. I am doing this project mostly by night after my day job.

In general those HATs are nothing else then arduinos which you can stick on the pi. If you have an arduino you can try to use it, instead of the HAT. But you need to change the port to /tty/USB0.

But I would recommend that we get your HAT back in a state where we can read the signature again and than we will have a  further look. 

mcinerney
(@mcinerney)
Joined: 3 years ago

Trusted Member
Posts: 60

@justinb

I am having roughly the same issues that you have are having. However, I believe I was able to flash the boot loader OK. Just not sure how to test it.
Can you please tell me how you have the pi configured to boot? Are you using desktop or Console with or without password auto logon.

I really Would appreciate hearing your input. I am sure we will get this figured out eventually.

mario
Posts: 570
Admin
(@mario)
Member
Joined: 4 years ago

@justinb @mcinerney

I have an idea on what is going on. I think that the FabScanPi Software runs into a deadlock while it tries to install the firmware when the HAT is a new one with only the boot loader on it. That would explain why the FabScan works for people who made an update and why it does not run for people who started with a plain kit.

But Attention: it is not a good idea to change back to v.0.7.0 there was another serial connection bug which breaks the boot loader so that you need to reflash it. 

I will test all this stuff this evening and give you feedback as soon as possible. 

 

mcinerney
(@mcinerney)
Joined: 3 years ago

Trusted Member
Posts: 60

@mario

Well tat would make sense.

I figured you were on top of the situation.

Please let me know if there is anything  I can do to help.

Thanks for your efforts!!

rafaelcgo
(@rafaelcgo)
Joined: 3 years ago

Active Member
Posts: 5

@mario

I've just started with fabscan, flashed my first time today, having the same issues.

 

1. Keeping the February release (I guess it is the v0.7.0) is not an option?

2. What about flashing the February release, testing everything, running and then upgrading to the November release? Is that a good plan?

 

Thanks

 

ps: It looks like you're overwhelmed with lots of bugs and complaints, if is there anything we might do to help, let us know.

mario
Posts: 570
Admin
(@mario)
Member
Joined: 4 years ago

Hi everyone, 

i had some time for testing. I flashed my HAT to get in an initial state. Afterwards i run into the same error. But i think i have also found a solution. Please try the following and give me your feedback:

First stop the FabScanPi-Server with:

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

Then check if the connection to the HAT works and the bootloader of the HAT is ok:

sudo avrdude-autoreset -p m328p -b 115200 -carduino -P/dev/ttyAMA0

A message like this is what we want:

avrdude-original: Using autoreset DTR on GPIO Pin 7

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f (probably m328p)

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done.  Thank you.

If it fails it returns something like this: 

avrdude-original: Using autoreset DTR on GPIO Pin 7

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xbf

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xbf

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xbf

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xbf

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xbf

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xbf

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xbf

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xbf

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xbf

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xbf

avrdude done.  Thank you.

This failure can be caused by one of the follwing reasons:

  1. Baudrate is not working, try to change it to 57600 instead of 115200. One of this values should work, if not check 2 and 3. Especially when you tried to use a previous version of the fabscanpi-server < 0.8.0 go to 3. 
  2. Bad solder joints, double check your solder joints
  3. Corrupted Firmware. Try to reflash your firmware by following the guide.

If you are able to produce the first shown above. You can go further and change the serial section of the /etc/default.config.json by adding the parameter flash_baudrate to your baudrate which you used in the previous step. 

"serial": {
"plattform_type": "fabscanpi",
"baudrate": 57600,
"autoflash": "True",
"flash_baudrate": 115200,
"port": "/dev/ttyAMA0"
}

After changing the config  start the server again: 

sudo /etc/init.d/fabscanpi-server start

Have a look into your fabscanpi.log. A successful startup sequence should look like this lines...

2019-12-27 1308,926 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.1-dev
2019-12-27 1308,928 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-27 1309,583 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-27 1309,586 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-27 1311,807 - fabscan.lib.util.FSUtil - INFO - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 1312,358 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0
2019-12-27 1315,367 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Installed firmware version: v.20190811
2019-12-27 1315,368 - fabscan.scanner.laserscanner.driver.FSSerial - INFO - FabScanPi is connected to FabScanPi HAT or compatible on port: /dev/ttyAMA0
2019-12-27 1317,376 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Connection baudrate is: 57600
2019-12-27 1317,376 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Firmware flashing baudrate is: 115200
2019-12-27 1317,377 - fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Reset FabScanPi HAT...
2019-12-27 1317,702 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - M18;
2019-12-27 1318,032 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - G07;
2019-12-27 1318,533 - fabscan.scanner.laserscanner.driver.FSCamera - DEBUG - Cam Stream with Resolution (800, 600) stopped
2019-12-27 1318,534 - fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Reset FabScanPi HAT...
2019-12-27 1318,862 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - M18;
2019-12-27 1319,192 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - G07;
2019-12-27 1319,192 - fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Hardware controller initialized...
2019-12-27 1319,437 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Laser Scan Processor initilized...FSScanProcessor (urn6e0684b0-e7fc-42c4-9e51-b189a7b227fd)
2019-12-27 1319,438 - fabscan.server.FSWebServer - DEBUG - /usr/share/fabscanpi/
2019-12-27 1319,468 - fabscan.FSScanner - INFO - Job scheduler started.
2019-12-27 1319,468 - fabscan.FSScanner - INFO - Scanner initialized...
2019-12-27 1319,469 - fabscan.FSScanner - INFO - Number of cpu cores: 4
2019-12-27 1319,470 - fabscan.lib.util.FSDiscovery - INFO - Registering ip 192.168.1.123 to discovery service.
2019-12-27 1319,569 - fabscan.server.services.websocket.FSWebSocketHandler - DEBUG - New client connected
2019-12-27 1319,965 - fabscan.FSScanner - DEBUG - Upgrade available: False 0.8.1-dev
2019-12-27 1319,968 - fabscan.scanner.laserscanner.FSScanProcessor - DEBUG - Checking Hardware connections
2019-12-27 1320,207 - fabscan.lib.util.FSDiscovery - INFO - Successfully registered to find.fabscan.org
2019-12-27 1320,343 - fabscan.FSScanner - INFO - Added discovery scheduling job.

I am just woking on a solution for an automatic baudrate detection...

I hope you had some peaceful Christmas days. I am sure we will still fix this issue this year.

- Mario

mcinerney
(@mcinerney)
Joined: 3 years ago

Trusted Member
Posts: 60

@mario

Should we stop the server before executing the command listed below?

sudo avrdude-autoreset -p m328p -b 115200 -carduino -P/dev/ttyAMA0

Yes. The server needs to be stopped. I added this to my post.

mcinerney
(@mcinerney)
Joined: 3 years ago

Trusted Member
Posts: 60

@mario

Stopped the server, ran the next command and received the response we needed, modified the config file, restarted server and even rebooted.

Here is log file, still stops at "Trying to connect Arduino on port: /dev/ttyAMA0"

I see that the server version is not correct and there are 2 "fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin" lines.  Not sure if this matters.

2019-12-27 1520,571 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051
2019-12-27 1520,575 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-27 1522,453 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-27 1522,459 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-27 1524,770 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 1527,027 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 1527,578 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0

 

Looking forward to your input, and hope you had a great Christmas also.....

mario
Posts: 570
Admin
(@mario)
Member
Joined: 4 years ago

@mcinerney

Ok. As next step we will try to flash the latest fabscan firmware manually: 

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

sudo avrdude-autoreset -D -V -U flash/usr/lib/python2.7/dist-packages/fabscan/firmware/fabscanpi_v.20190811.hex:i -b 115200 -carduino -pm328p -P/dev/ttyAMA0

sudo /etc/init.d/fabscanpi-server start

where you should set the baudrate to the one you discovered in the previous steps..

The flashing output should be something like: 

avrdude-original: Using autoreset DTR on GPIO Pin 7

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f (probably m328p)

avrdude: reading input file "/usr/lib/python2.7/dist-packages/fabscan/firmware/fabscanpi_v.20190811.hex"

avrdude: writing flash (12480 bytes):

Writing | ################################################## | 100% 1.68s

avrdude: 12480 bytes of flash written

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done.  Thank you.
mcinerney
(@mcinerney)
Joined: 3 years ago

Trusted Member
Posts: 60

@mario

Well Mario, you are a miracle worker.  That worked!

The server and browser are up an running, time to work on  calibration and a scan.

Many Thanks.

I posted the result of the above commands and log file for your reading pleasure.

PS. for others, make sure you use the correct directory, it is "etc" not "ect" as per the above post. ? 

 

pi@fabscanpi:/ $ sudo /etc/init.d/fabscanpi-server stop
fabscanpi-server stopped.
pi@fabscanpi:/ $ sudo avrdude-autoreset -D -V -U flash/usr/lib/python2.7/dist-packages/fabscan/firmware/fabscanpi_v.20190811.hex:i -b 115200 -carduino -pm328p -P/dev/ttyAMA0/firmware/fabscanpi_v.20190811.hex:i -b 115200 -carduino -pm328 avrdude-original: Using autoreset DTR on GPIO Pin 7

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "/usr/lib/python2.7/dist-packages/fabscan/firmware/fabscanpi_v.20190811.hex"
avrdude: writing flash (12480 bytes):

Writing | ################################################## | 100% 2.12s

avrdude: 12480 bytes of flash written

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done. Thank you.

pi@fabscanpi:/ $ sudo /etc/init.d/fabscanpi-server start
avrdude-original: Using autoreset DTR on GPIO Pin 7
fabscanpi-server started.

Log file below.

pi@fabscanpi:/var/log/fabscanpi $ cat fabscanpi.log
2019-12-27 2235,196 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051
2019-12-27 2235,200 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-27 2237,113 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-27 2237,118 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-27 2251,794 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 2254,063 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 2254,614 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0
2019-12-27 2205,517 - fabscan.lib.util.FSUtil - DEBUG - System Exit initiated...
2019-12-27 2239,017 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051
2019-12-27 2239,018 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-27 2239,677 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-27 2239,680 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-27 2241,857 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 2244,117 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 2244,668 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0
2019-12-27 2245,959 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051
2019-12-27 2245,964 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-27 2250,367 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-27 2250,373 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-27 2252,660 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 2230,381 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 2230,933 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0
2019-12-28 1013,453 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051
2019-12-28 1013,459 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-28 1016,854 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-28 1016,859 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-28 1019,178 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-28 1021,588 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-28 1022,141 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0

Editoral Note - this is where the log stopped after a fresh boot, next line is after stopping server.

2019-12-28 1017,745 - fabscan.lib.util.FSUtil - DEBUG - System Exit initiated...

Editoral Note - below is where the log started after issuing this command.
"sudo avrdude-autoreset -D -V -U flash/usr/lib/python2.7/dist-packages/fabscan/firmware/fabscanpi_v.20190811.hex:i -b 115200 -carduino -pm328p -P/dev/ttyAMA0"

2019-12-28 1143,252 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051
2019-12-28 1143,254 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-28 1143,907 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-28 1143,909 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-28 1146,129 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-28 1148,398 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-28 1148,950 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0
2019-12-28 1151,959 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Installed firmware version: v.20190811
2019-12-28 1151,960 - fabscan.scanner.laserscanner.driver.FSSerial - INFO - FabScanPi is connected to FabScanPi HAT or compatible on port: /dev/ttyAMA0
2019-12-28 1153,968 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Connection baudrate is: 57600
2019-12-28 1153,969 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Firmware flashing baudrate is: 115200
2019-12-28 1153,970 - fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Reset FabScanPi HAT...
2019-12-28 1154,293 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - M18;
2019-12-28 1154,623 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - G07;
2019-12-28 1155,125 - fabscan.scanner.laserscanner.driver.FSCamera - DEBUG - Cam Stream with Resolution (800, 600) stopped
2019-12-28 1155,125 - fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Reset FabScanPi HAT...
2019-12-28 1155,453 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - M18;
2019-12-28 1155,783 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - G07;
2019-12-28 1155,784 - fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Hardware controller initialized...
2019-12-28 1156,077 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Laser Scan Processor initilized...FSScanProcessor (urnb80d677c-9ac4-4b64-bd68-bba567898485)
2019-12-28 1156,078 - fabscan.server.FSWebServer - DEBUG - /usr/share/fabscanpi/
2019-12-28 1156,107 - fabscan.FSScanner - INFO - Job scheduler started.
2019-12-28 1156,108 - fabscan.FSScanner - INFO - Scanner initialized...
2019-12-28 1156,109 - fabscan.FSScanner - INFO - Number of cpu cores: 4
2019-12-28 1156,110 - fabscan.lib.util.FSDiscovery - INFO - Registering ip 10.0.0.195 to discovery service.
2019-12-28 1157,822 - fabscan.lib.util.FSDiscovery - INFO - Successfully registered to find.fabscan.org
2019-12-28 1157,943 - fabscan.FSScanner - INFO - Added discovery scheduling job.
2019-12-28 1146,365 - fabscan.server.services.websocket.FSWebSocketHandler - DEBUG - New client connected
2019-12-28 1147,239 - fabscan.lib.util.FSUpdate - ERROR - <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>
2019-12-28 1147,242 - fabscan.FSScanner - DEBUG - Upgrade available: False 0.8.0+201911082051
2019-12-28 1147,246 - fabscan.scanner.laserscanner.FSScanProcessor - DEBUG - Checking Hardware connections
2019-12-28 1157,948 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.01 C
2019-12-28 1157,951 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.01 C
2019-12-28 1157,950 - fabscan.FSScanner - DEBUG - CPU Temperature: 43.47 C
2019-12-28 1157,953 - fabscan.FSScanner - DEBUG - CPU Temperature: 45.08 C
2019-12-28 1157,951 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.01 C
2019-12-28 1157,951 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.55 C
2019-12-28 1157,951 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.55 C
2019-12-28 1157,951 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.01 C
2019-12-28 1157,951 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.01 C
2019-12-28 1157,949 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.01 C
2019-12-28 1157,951 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.01 C
2019-12-28 1157,950 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.01 C
2019-12-28 1157,948 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.01 C
2019-12-28 1157,951 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.01 C
2019-12-28 1157,948 - fabscan.FSScanner - DEBUG - CPU Temperature: 43.47 C
2019-12-28 1147,248 - fabscan.server.services.websocket.FSWebSocketHandler - DEBUG - Client disconnected
2019-12-28 1147,785 - fabscan.server.services.websocket.FSWebSocketHandler - DEBUG - New client connected
2019-12-28 1148,535 - fabscan.lib.util.FSUpdate - ERROR - <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>
2019-12-28 1148,537 - fabscan.FSScanner - DEBUG - Upgrade available: False 0.8.0+201911082051
2019-12-28 1148,542 - fabscan.scanner.laserscanner.FSScanProcessor - DEBUG - Checking Hardware connections
2019-12-28 1157,950 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.01 C
2019-12-28 1157,948 - fabscan.FSScanner - DEBUG - CPU Temperature: 42.93 C
2019-12-28 1157,950 - fabscan.FSScanner - DEBUG - CPU Temperature: 43.47 C
2019-12-28 1157,948 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.01 C
2019-12-28 1157,948 - fabscan.FSScanner - DEBUG - CPU Temperature: 44.01 C

mario
Posts: 570
Admin
(@mario)
Member
Joined: 4 years ago

There is also a bug report on GitHub for this issue.

https://github.com/mariolukas/FabScanPi-Server/issues/139

I am just trying to find out if my fix works for all of you.

m.marino
Posts: 31
(@m-marino)
Eminent Member
Joined: 3 years ago

Same issue and I am getting:

avrdude: ser_open(): can't open device "/dev/ttyAMA0/firmware/fabscanpi_v.20190811.hex Not a directory

avrdude done. Thank you.

Raspberry Pi 3 B new install.

 

When powering up get green light on LED ring on one LED. That is all. Have rechecked solder joints and will do so again. I am a UK full license amateur  radio operator so I do know how to solder (but also know how easy it is to have a connection that is just not full on an I/O board).

Other then that it is moving forward.

 

m.marino
Posts: 31
(@m-marino)
Eminent Member
Joined: 3 years ago

@mario

Additional information on issues as follows:

pi@fabscanpi:~ $ sudo /etc/init.d/fabscanpi-server stop
No process in pidfile '/tmp/fabscanpi-server.pid' found running; none killed.
fabscanpi-server stopped.
pi@fabscanpi:~ $ sudo avrdude-autoreset -D -V -U flash/usr/lib/python2.7/dist-packages/fabscan/firmware/fabscanpi_v.20190811.hex:i -b 115200 -carduino -pm328p -P/dev/ttyAMA0/firmware/fabscanpi_v.20190811.hex:i -b 115200 -carduino -pm328 avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude: ser_open(): can't open device "/dev/ttyAMA0/firmware/fabscanpi_v.20190811.hex Not a directory

avrdude done. Thank you.

Hope this additional information helps

 

mario
Posts: 570
Admin
(@mario)
Member
Joined: 4 years ago
Posted by: @m-marino

pi@fabscanpi:~ $ sudo avrdude-autoreset -D -V -U flash/usr/lib/python2.7/dist-packages/fabscan/firmware/fabscanpi_v.20190811.hex:i -b 115200 -carduino -pm328p -P/dev/ttyAMA0/firmware/fabscanpi_v.20190811.hex:i -b 115200 -carduino -pm328 avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7

I think you accidentally pasted the command twice. The correct command should be: 

sudo avrdude-autoreset -D -V -U flash/usr/lib/python2.7/dist-packages/fabscan/firmware/fabscanpi_v.20190811.hex:i -b 115200 -carduino -pm328p -P/dev/ttyAMA0

Try also the following, just to be sure that the connection to the HAT works: 

sudo avrdude-autoreset -p m328p -b 115200 -carduino -P/dev/ttyAMA0


This should return something like: 

avrdude-original: Using autoreset DTR on GPIO Pin 7

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f (probably m328p)

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done.  Thank you.

 

If you don't get this output try to use -b 57600 instead. Have you already tried a Software version below 0.8.0 ?

m.marino
(@m-marino)
Joined: 3 years ago

Eminent Member
Posts: 31

@mario

No I have not tried a version below 0.8.0. Results what you suggested is this:

pi@fabscanpi:~ $ sudo avrdude-autoreset -D -V -U flash/usr/lib/python2.7/dist -packages/fabscan/firmware/fabscanpi_v.20190811.hex:i -b 115200 -carduino -pm328 p -P/dev/ttyAMA0
avrdude-original: Using autoreset DTR on GPIO Pin 7

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "/usr/lib/python2.7/dist-packages/fabscan/firmware/f abscanpi_v.20190811.hex"
avrdude: writing flash (12480 bytes):

Writing | ################################################## | 100% 2.09s

avrdude: 12480 bytes of flash written

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done. Thank you.

 

Will see if this has allowed the server to function.

pi@fabscanpi:~ $ sudo service fabscanpi restart
Failed to restart fabscanpi.service: Unit fabscanpi.service not found.
pi@fabscanpi:~ $

 

Will look at trying an older version of the software.

 

m.marino
(@m-marino)
Joined: 3 years ago

Eminent Member
Posts: 31

Having issues with getting an older image of FabScanPi

mario
Posts: 570
Admin
(@mario)
Member
Joined: 4 years ago
Posted by: @m-marino

pi@fabscanpi:~ $ sudo service fabscanpi restart

This is not supported yet. Due systemd is not configured for the fabscanpi-server. You need to restart it the old way. Using 

sudo /etc/init.d/fabscanpi-server restart
Posted by: @m-marino

Having issues with getting an older image of FabScanPi

It is not a good idea to use an older version. 

m.marino
(@m-marino)
Joined: 3 years ago

Eminent Member
Posts: 31

@mario

Did full re-install and everything is working so far. Don't know what was the issue and will try to find out for you. But now it is connecting and running.

 

m.marino
Posts: 31
(@m-marino)
Eminent Member
Joined: 3 years ago

@mario

Looks like I improperly modified the json file and that was part of the issue. Was able to go back and get the 3200 dealt with and the 2 lasers as well. So right now calibrating. Is it normal for the time to keep increasing and temp to get a bit warm on the Pi 3 B??

 

mario
Posts: 570
Admin
(@mario)
Member
Joined: 4 years ago
Posted by: @m-marino

keep increasing and temp to get a bit warm on the Pi 3 B??

Yes. That is quite normal. The Pi is running on 3 cores. You can prevent by installing a fan. Have a look at the Blog post for the 0.8.0 release. 

I will close this thread now, because this topic is solved. If you have further issues please open a new topic. 

Share: