Notifications
Clear all

[Solved] HAT not working - same as everyone else  

Page 1 / 3

JustinB
Posts: 6
Topic starter
(@justinb)
Active Member
Joined: 1 year 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: 1 year 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: 497
Admin
(@mario)
Member
Joined: 2 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: 1 year 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.

2 Replies
mario
Admin
(@mario)
Joined: 2 years ago

Member
Posts: 497

@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: 1 year 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: 497
Admin
(@mario)
Member
Joined: 2 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. 

 

2 Replies
mcinerney
(@mcinerney)
Joined: 1 year 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: 1 year 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.

Page 1 / 3
Share: