Notifications
Clear all

Rpi Firmware  

Page 2 / 3

amulaya
Posts: 8
(@amulaya)
Active Member
Joined: 1 year ago

hey,

My rpi was not booting with the custom image so I decided to use raspbian and follow instructions on the software section but when I'm trying to add directory to sources I get the error "permision denied" is there another way to install the firmware?

Reply
19 Replies
AndreaCH
Posts: 10
(@andreach)
Active Member
Joined: 1 year ago

2019-03-19 11:56:26,727 - fabscan.scanner.laserscanner.driver.FSSerial - ERROR - No FabScanPi HAT or compatible device found on port /dev/ttyAMA0
2019-03-19 11:56:26,727 - fabscan.scanner.laserscanner.driver.FSSerial - ERROR - Fatal FabScanPi HAT or compatible connection error..

 

Have you a FabscanPi HAT or compatibile card connected?

 

Reply
3 Replies
amulaya
(@amulaya)
Joined: 1 year ago

Active Member
Posts: 8

I'm using an arduino uno with cnc shield in place of hat. I had asked about it in the google group.

https://groups.google.com/forum/#!topic/fabscan/Cw7TkSnEQZw

Reply
AndreaCH
(@andreach)
Joined: 1 year ago

Active Member
Posts: 10
Posted by: amulaya

I'm using an arduino uno with cnc shield in place of hat. I had asked about it in the google group.

https://groups.google.com/forum/#!topic/fabscan/Cw7TkSnEQZw

if you have connected arduino <-> raspberry via USB, you can try  /dev/ttyACM0 ... i think AMA0 is the built-in ttl serial device (FabscanPI HAT connect this device)

Reply
rene
 rene
Admin
(@rene)
Joined: 1 year ago

Member
Posts: 14

Andrea is right, you need to change the name of the tty port if you use an external Arduino connected via USB instead of the official HAT.

You can list all relevant USB port with this command in your terminal or ssh connection:

ls -la /dev/ttyA*

if the list is empty, try this one:

ls -la /dev/ttyU*

 

Reply
mario
Posts: 442
Admin
(@mario)
Member
Joined: 2 years ago

A similar issue was already reported at : https://fabscan.org/community/latest-release/software-release-v-0-7-0/

Please try the following command 

sudo /etc/init.d/fabscanpi-server stop 
sudo avrdude-autoreset -p m328p -b 115200 -carduino -P/dev/ttyAMA0


After that the output should look similar 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.

In this case you should try to add the line:

"flash_baudrate": 115200

to the serial part of your FabScanPi config file. It should then look like:

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

Reply
1 Reply
amulaya
(@amulaya)
Joined: 1 year ago

Active Member
Posts: 8

Please try the following command 

sudo /etc/init.d/fabscanpi-server stop 
sudo avrdude-autoreset -p m328p -b 115200 -carduino -P/dev/ttyAMA0
WhatsApp Image 2019 03 20 at 2.03.13 PM
Reply
mario
Posts: 442
Admin
(@mario)
Member
Joined: 2 years ago

Rene is right. That was a important missing information. I did not know that you are using a custom hardware. Mostly an Arduino on the USB port creates a device called

/dev/ttyUSB0

You can discover the correct device name by the method which Rene mentioned before. Then give the command i described before a try ( the following example with/dev/ttyUSB0).


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

Finally don't forget to configure the port also in your

/etc/fabscanpi/default.config.json.

By the way the firmware pin settings should fit your board.

Reply
amulaya
Posts: 8
(@amulaya)
Active Member
Joined: 1 year ago

The RPi is working perfectly, but any components connected to the arduino are not working.

I've been trying to resolve the issue on my own but couldn't. I've checked all individual components and they are all functional but when connected it isn't working. 

I think in the arduino code during execution it might be selecting the wrong board but I'm unable to find where that is happening.

I'm using the same code that Rene sent in the Google group. 

P. S. - is it possible that when I connect arduino to RPi it updates the firmware which might remove the CNC shield code? 

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

Member
Posts: 442

Yes, the FabScan is checking the firmware. When it detects that the firmware is older than the current firmware in the source folder, than it automatically flashes the newer version to the Arduino. In your case the firmware is "older". You will have two options. 

  • Update the date in Version.h in the Arduino code. Build it and flash it. 
  • Change autoflash to False in the default.config.json serial section what prevents autoflashing (recommended)

By the way, i am preparing to support different firmwares in the next version by config. Please commit your changes to GitHub and do a pull request on the firmware branch. So i am able to merge your commitments and it will be available within the next version. 

 

Reply
amulaya
(@amulaya)
Joined: 1 year ago

Active Member
Posts: 8

Update the date in Version.h in the Arduino code. Build it and flash it.

It still changes the firmware

Change autoflash to False in the default.config.json serial section what prevents autoflashing (recommended)

The GUI stops working, in log it says:

2019-03-28 12:17:20,551 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.7.0
2019-03-28 12:17:21,153 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-03-28 12:17:21,155 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190211
2019-03-28 12:17:22,913 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyACM0
2019-03-28 12:17:30,931 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Installed firmware version: None
2019-03-28 12:17:30,933 - fabscan.scanner.laserscanner.driver.FSSerial - INFO - Old or no firmare detected trying to flash current firmware...
2019-03-28 12:17:30,984 - fabscan.lib.util.FSUtil - DEBUG - 808 /usr/lib/python2.7/dist-packages/fabscan/firmware/fabscanpi_v.20190211.hex
Reply
rene
 rene
Admin
(@rene)
Joined: 1 year ago

Member
Posts: 14
rene
Posts: 14
 rene
Admin
(@rene)
Member
Joined: 1 year ago

Since the firmware that I postet in the google group is an untested prototype for users who use an Arduino with CNC shield, it is very likely that things do not work. It is possible that the raspberry pi automatically updates the Arduino if your arduino firmware reports a version number that is lower than the official version thst ships with the fabscan pi server. Try the same version number and upload the firmware manually to the Arduino again.

Reply
Page 2 / 3
Share: