HAT not working - s...
 
Notifications
Clear all

[Solved] HAT not working - same as everyone else

24 Posts
5 Users
2 Reactions
5,604 Views
JustinB
Posts: 6
Topic starter
(@justinb)
Active Member
Joined: 5 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 16:37:12 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 16:37:37 fabscanpi sudo[687]: pam_unix(sudo:session): session closed for user root
Dec 20 16:37:37 fabscanpi sudo[719]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/avrdude
Dec 20 16:37:37 fabscanpi sudo[719]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 20 16:37:37 fabscanpi sudo[725]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/strace
Dec 20 16:37:37 fabscanpi sudo[725]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 20 16:37:37 fabscanpi sudo[734]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/avrdude
Dec 20 16:37:37 fabscanpi sudo[734]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 20 16:37:38 fabscanpi sudo[734]: pam_unix(sudo:session): session closed for user root
Dec 20 16:37:39 fabscanpi sudo[725]: pam_unix(sudo:session): session closed for user root
Dec 20 16:37:39 fabscanpi sudo[719]: pam_unix(sudo:session): session closed for user root

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

2019-12-20 16:37:33,021 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051
2019-12-20 16:37:33,025 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-20 16:37:35,015 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-20 16:37:35,021 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-20 16:37:37,326 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-20 16:37:39,528 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-20 16:37:40,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: 5 years ago

Update -

Now the AVR is completely bricked.

pi@fabscanpi:~ $ 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

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)
Honorable Member
Joined: 6 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 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

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: 5 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: 6 years ago

Honorable 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: 5 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)
Honorable Member
Joined: 6 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: 5 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: 5 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)
Honorable Member
Joined: 6 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 13:11:08,926 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.1-dev
2019-12-27 13:11:08,928 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-27 13:11:09,583 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-27 13:11:09,586 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-27 13:11:11,807 - fabscan.lib.util.FSUtil - INFO - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 13:11:12,358 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0
2019-12-27 13:11:15,367 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Installed firmware version: v.20190811
2019-12-27 13:11:15,368 - fabscan.scanner.laserscanner.driver.FSSerial - INFO - FabScanPi is connected to FabScanPi HAT or compatible on port: /dev/ttyAMA0
2019-12-27 13:11:17,376 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Connection baudrate is: 57600
2019-12-27 13:11:17,376 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Firmware flashing baudrate is: 115200
2019-12-27 13:11:17,377 - fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Reset FabScanPi HAT...
2019-12-27 13:11:17,702 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - M18;
2019-12-27 13:11:18,032 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - G07;
2019-12-27 13:11:18,533 - fabscan.scanner.laserscanner.driver.FSCamera - DEBUG - Cam Stream with Resolution (800, 600) stopped
2019-12-27 13:11:18,534 - fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Reset FabScanPi HAT...
2019-12-27 13:11:18,862 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - M18;
2019-12-27 13:11:19,192 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - G07;
2019-12-27 13:11:19,192 - fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Hardware controller initialized...
2019-12-27 13:11:19,437 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Laser Scan Processor initilized...FSScanProcessor (urn:uuid:6e0684b0-e7fc-42c4-9e51-b189a7b227fd)
2019-12-27 13:11:19,438 - fabscan.server.FSWebServer - DEBUG - /usr/share/fabscanpi/
2019-12-27 13:11:19,468 - fabscan.FSScanner - INFO - Job scheduler started.
2019-12-27 13:11:19,468 - fabscan.FSScanner - INFO - Scanner initialized...
2019-12-27 13:11:19,469 - fabscan.FSScanner - INFO - Number of cpu cores: 4
2019-12-27 13:11:19,470 - fabscan.lib.util.FSDiscovery - INFO - Registering ip 192.168.1.123 to discovery service.
2019-12-27 13:11:19,569 - fabscan.server.services.websocket.FSWebSocketHandler - DEBUG - New client connected
2019-12-27 13:11:19,965 - fabscan.FSScanner - DEBUG - Upgrade available: False 0.8.1-dev
2019-12-27 13:11:19,968 - fabscan.scanner.laserscanner.FSScanProcessor - DEBUG - Checking Hardware connections
2019-12-27 13:11:20,207 - fabscan.lib.util.FSDiscovery - INFO - Successfully registered to find.fabscan.org
2019-12-27 13:11:20,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: 5 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: 5 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 15:59:20,571 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051
2019-12-27 15:59:20,575 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-27 15:59:22,453 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-27 15:59:22,459 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-27 15:59:24,770 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 15:59:27,027 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 15:59:27,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)
Honorable Member
Joined: 6 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:w:/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: 5 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:w:/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 22:04:35,196 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051
2019-12-27 22:04:35,200 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-27 22:04:37,113 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-27 22:04:37,118 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-27 22:04:51,794 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 22:04:54,063 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 22:04:54,614 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0
2019-12-27 22:15:05,517 - fabscan.lib.util.FSUtil - DEBUG - System Exit initiated...
2019-12-27 22:19:39,017 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051
2019-12-27 22:19:39,018 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-27 22:19:39,677 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-27 22:19:39,680 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-27 22:19:41,857 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 22:19:44,117 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 22:19:44,668 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0
2019-12-27 22:21:45,959 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051
2019-12-27 22:21:45,964 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-27 22:21:50,367 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-27 22:21:50,373 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-27 22:21:52,660 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 22:27:30,381 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-27 22:27:30,933 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0
2019-12-28 10:24:13,453 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.8.0+201911082051
2019-12-28 10:24:13,459 - fabscan.scanner.interfaces - DEBUG - Scanner Type is: laserscanner
2019-12-28 10:24:16,854 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-12-28 10:24:16,859 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190811
2019-12-28 10:24:19,178 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-28 10:24:21,588 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2019-12-28 10:24:22,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 10:59:17,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:w:/usr/lib/python2.7/dist-packages/fabscan/firmware/fabscanpi_v.20190811.hex:i -b 115200 -carduino -pm328p -P/dev/ttyAMA0"

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

mario
Posts: 570
Admin
(@mario)
Honorable Member
Joined: 6 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: 5 years ago

Same issue and I am getting:

avrdude: ser_open(): can't open device "/dev/ttyAMA0/firmware/fabscanpi_v.20190811.hex:i": 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: 5 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:w:/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:i": Not a directory

avrdude done. Thank you.

Hope this additional information helps

 

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

pi@fabscanpi:~ $ sudo avrdude-autoreset -D -V -U flash:w:/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:w:/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: 5 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:w:/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: 5 years ago

Eminent Member
Posts: 31

Having issues with getting an older image of FabScanPi

mario
Posts: 570
Admin
(@mario)
Honorable Member
Joined: 6 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: 5 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: 5 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)
Honorable Member
Joined: 6 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: