Notifications
Clear all

Rpi Firmware

20 Posts
4 Users
0 Likes
9,944 Views
amulaya
Posts: 8
Topic starter
(@amulaya)
Active Member
Joined: 5 years 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: 5 years ago

Hi Amulaya,
I also tried starting from a Raspbian-lite image, but I encountered problems in particular with the python-opencv-tbb package that I didn't understand where to find it.
Try instead to create the SD card with the FabscanPI image using the Rufus software (portable version)

https://github.com/pbatard/rufus/releases/download/v3.4/rufus-3.4p.exe

 

Reply
amulaya
Posts: 8
Topic starter
(@amulaya)
Active Member
Joined: 5 years ago

I used flashed my sd card with the firmware and it booted but I'm not getting the interface. I can't find any instructions on what exactly I'm supposed to do after booting the rpi.

Reply
rene
 rene
Admin
(@rene)
Joined: 5 years ago

Active Member
Posts: 14

Hi amulaya, does this mean that the GUI does not show or are you saying that you don't know what to do with it? In general, you can find the software documentation here: https://fabscanpi-server.readthedocs.io/en/latest/software/

 

Reply
amulaya
Posts: 8
Topic starter
(@amulaya)
Active Member
Joined: 5 years ago

Hey Rene,

It doesn't show, I followed all the steps till the software user manual but when I enter the ip address in my browser it says 'unable to connect'

Reply
AndreaCH
(@andreach)
Joined: 5 years ago

Active Member
Posts: 10

Can you ping fabscanpi ip address from your PC?

Reply
amulaya
Posts: 8
Topic starter
(@amulaya)
Active Member
Joined: 5 years ago

Yes I can ping it. There is no problem in pinging.

error log is:

2019-03-19 11:55:32,964 - fabscan.server.FSScanServer - INFO - FabScanPi-Server 0.7.0
2019-03-19 11:55:35,055 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Port in Config found
2019-03-19 11:55:35,063 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Latest available firmware version is: v.20190211
2019-03-19 11:56:26,704 - fabscan.lib.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
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....
2019-03-19 11:56:26,728 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Connection baudrate is: 57600
2019-03-19 11:56:26,728 - fabscan.scanner.laserscanner.driver.FSSerial - DEBUG - Firmware flashing baudrate is: 57600
2019-03-19 11:56:26,729 - fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Reset FabScanPi HAT...
2019-03-19 11:56:26,729 - fabscan.scanner.laserscanner.driver.FSSerial - ERROR - 'NoneType' object has no attribute 'write'
2019-03-19 11:56:26,729 - fabscan - CRITICAL - Fatal error: 'NoneType' object has no attribute 'read'

Reply
AndreaCH
Posts: 10
(@andreach)
Active Member
Joined: 5 years 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
amulaya
(@amulaya)
Joined: 5 years 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: 5 years 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: 5 years ago

Active 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: 570
Admin
(@mario)
Honorable Member
Joined: 5 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
amulaya
(@amulaya)
Joined: 5 years 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: 570
Admin
(@mario)
Honorable Member
Joined: 5 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
Topic starter
(@amulaya)
Active Member
Joined: 5 years 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
mario
Admin
(@mario)
Joined: 5 years ago

Honorable Member
Posts: 570

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

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

One suggestion to the re-flashing issue. You can deactivate auto flashing in the default.config.josn. 

Anyway I added the cnc shield firmware to the next release. So it will be available as one of the default firmwares. The only thing you need to to is setting the board in the default.config.json. I think the next release will be available at the end of this month.

Reply
Share: