mariolukas / fabscanpi-build-raspbian Goto Github PK
View Code? Open in Web Editor NEWBuild Script for FabScanPi Raspbian Images
Home Page: www.fabscan.org
Build Script for FabScanPi Raspbian Images
Home Page: www.fabscan.org
This issue is related to mariolukas/FabScanPi-Server#130
and #10
what is the login id and password. it is asking for it
to support wifi hotspot, client mode and lan connection add netconnecd to the fabscan pi project.
https://github.com/foosel/netconnectd
best way would be to build an own debian package which is located in the archive.fabscan.org server
I'm not seeing changed to apt-cacher-ng status of hits/misses as I did in the previous build. Maybe the cacher changes of a day or two ago didn't make it into the latest updates?
FYI, I liked seeing the fabscan packages in the image build process. ๐
Add Xcfb as virtial x-server for meshlabserver
https://sourceforge.net/p/meshlab/discussion/499532/thread/46e8b626/
Adding the following lines should fix the loop device issue and give more detailed logging.
script="build_raspbian_sd_card.sh"
# rotate logfiles
#
logfile="/var/log/build_rpi_wheezy_sd_card"
[ -f "$logfile.4" ] && mv -f "$logfile.4" "$logfile.5"
[ -f "$logfile.3" ] && mv -f "$logfile.3" "$logfile.4"
[ -f "$logfile.2" ] && mv -f "$logfile.2" "$logfile.3"
[ -f "$logfile.1" ] && mv -f "$logfile.1" "$logfile.2"
[ -f "$logfile" ] && mv -f "$logfile" "$logfile.1"
# clear loop devices opened by previous runs of this script.
# The command losetup -a prints used loop devices like this (1 line per device)
#
# /dev/loop0: [fc00]:14039433 (/root/rpi/rpi_basic_wheezy_20170129.img)
#
# print status of loop device related stuff...
#
lo_status()
{
loop_count=`losetup -a | grep -c rpi_basic_wheezy`
if [ $loop_count -eq 0 ]; then
echo "there are no open loop devices (good). "
return 0
fi
echo "
*** there is/are $loop_count open loop device(s):
"
losetup -a
echo "
mtab says:
----------"
grep loop /etc/mtab
echo "
mount says:
-----------"
mount | grep loop
echo "
loop devices in /dev are:
-------------------------"
ls -l /dev/ | grep loop
echo "
loop devices in /dev/mapper are:
--------------------------------"
ls -l /dev/mapper | grep loop
}
unmount_loop_devices()
{
loop_count=`losetup -a | grep -c rpi_basic_wheezy`
if [ $loop_count -eq 0 ]; then
echo "unmount_loop_devices() : no stale devices detected (good)/"
return 0
fi
loop_devices=`losetup -a | grep rpi_basic_wheezy \
| awk -F: '{print $1;}'`
lo_status
for f in "$loop_devices"; do
echo "
*** closing stale loop device $f..."
echo "
DM partition 1
--------------"
set -x
dmsetup info /dev/mapper/loop0p1
umount -v -f -d /dev/mapper/loop0p1
echo "umount returned $?"
dmsetup info /dev/mapper/loop0p1
sleep 1
dmsetup -f remove /dev/mapper/loop0p1
echo "dmsetup -f remove /dev/mapper/loop0p1 returned $?"
set +x
echo "*** device is $f..."
echo "
DM partition 2
--------------"
set -x
dmsetup info /dev/mapper/loop0p2
umount -v -f -d /dev/mapper/loop0p2
echo "umount returned $?"
dmsetup info /dev/mapper/loop0p2
sleep 1
dmsetup -f remove /dev/mapper/loop0p2
echo "dmsetup -f remove /dev/mapper/loop0p2 returned $?"
echo "*** device is $f..."
losetup -d "$f"
lo_result=$?
if [ $lo_result -ne 0 ]; then
ls -l /dev/ |grep loop
ls -l /dev/mapper/
fi
echo "losetup returned $lo_result"
set +x
done
loop_count=`losetup -a | grep -c rpi_basic_wheezy`
if [ $loop_count -eq 0 ]; then
echo "
all stale loop devices could be removed
"
return 0
fi
# at this point something went wrong. Collect information
echo "
closing all stale loop devices failed. The status is:
"
lo_status
}
control_C()
{
set +x
echo "
got ^C"
unmount_loop_devices
}
build_image()
{
.... script main part here ....
echo "finishing ${image}"
#clean_uptrap
unmount_loop_devices
echo $script done at `date`
}
build_image 2>&1 | tee $logfile 2>&1
add something like
auto eth0:0
iface eth0:0 inet static
address 10.10.0.10
netmask 255.255.255.0
to /etc/network/interfaces for local debug
check if fabscanpi server starts correctly after firstboot script was executed.
What is the login id and password . It is asking in code during software install .
add post install script for meshlabserver
With arduino pro micro i have compile/upload with IDE your firmware (from: https://github.com/mariolukas/FabScanPi-Firmware) and the changes i have made as follow:
a. boards.h:
#ifndef BOARDS_H
#define BOARDS_H
//#define BOARD_UNKNOWN -1
//#define BOARD_FABSCANPI 1
//#define BOARD_CYCLOP 2
//#define BOARD_SANGOINOLOLU 3
//#define BOARD_CNCSHIELD 4
#define BOARD_PIPITS 5
#define MB(board) (MOTHERBOARD==BOARD_##board)
#endif
b. configuration.h
// FabScan - http://hci.rwth-aachen.de/fabscan
//
// Created by Mario Lukas on 04/08/14.
// Copyright 2014 Media Computing Group, RWTH Aachen University. All rights reserved.
//
//#define VERBOSE 0
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
//#define MACHINE_UUID "4dabfe2e-c094-4f04-8bd4-669f24460735"
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
/*
*/
#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_PIPITS
#endif
#ifndef BAUDRATE
#define BAUDRATE 115200
#endif
#define TURN_BLOCKING 1
#define TURN_NON_BLOCKING 0
#define NUMPIXELS 16
#define MAX_FEEDRATE (2000)
#define MIN_FEEDRATE (1000)
#define MAX_BUF 64
#endif
c.pins.h
#ifndef PINS_H
#define PINS_H
#if MB(FABSCANPI)
#include "pins_FABSCANPI.h"
#elif MB(CYCLOP)
#include "pins_CYCLOP.h"
#elif MB(SANGOINOLOLU)
#include "pins_SANGOINOLOLU.h"
#elif MB(CNCSHIELD)
#include "pins_CNCSHIELD.h"
#elif MB(PIPITS)
#include "pins_PIPITS.h"
#endif
#endif
d.pins_PIPITS.h
#ifndef PINS_PIPITS_H
#define PINS_PIPITS_H
#ifndef BOARD_NAME
#define BOARD_NAME "PIPITS"
#endif
/*
So i have try with both latest version of prebuild image (0.94server and 0.93server)
and when i use the commands "sudo echo "M19" > /dev/ttyACM0" or "sudo echo "M19" > /dev/serial/by-id/usb-Arduino_LLC_Arduino_Micro-if00" at terminal (i can use all of the commands M and G) the system works as expected (laser on/off, motor disable/enable, motor running). (PiOS read device as /dev/ttyACM0 and not as /dev/ttyUSB0).
--------------P R O B L E M-------------------------------------------------
BUT the server not running with the following problems from log file (changes made only to etc folder at file default.config.json) :
2021-03-04 09:38:20,098 [521:1996384976] INFO - fabscan.server.FSScanServer: FabScanPi-Server 0.9.3
2021-03-04 09:38:20,106 [521:1996384976] DEBUG - fabscan.scanner.interfaces: Scanner Type is: laserscanner
2021-03-04 09:38:21,948 [521:1996384976] DEBUG - fabscan.scanner.laserscanner.driver.FSSerial: Port in Config found
2021-03-04 09:38:21,953 [521:1996384976] CRITICAL - fabscan: Fatal error: max() arg is an empty sequence
(which seems that connection made but sth is missing)
2021-03-04 09:38:20,098 [521:1996384976] INFO - fabscan.server.FSScanServer: FabScanPi-Server 0.9.3
2021-03-04 09:38:20,106 [521:1996384976] DEBUG - fabscan.scanner.interfaces: Scanner Type is: laserscanner
2021-03-04 09:38:21,948 [521:1996384976] DEBUG - fabscan.scanner.laserscanner.driver.FSSerial: Port in Config found
2021-03-04 09:38:21,953 [521:1996384976] CRITICAL - fabscan: Fatal error: max() arg is an empty sequence
(which seems that connection made but sth is missing)
2021-03-04 09:45:44,474 [685:1995705040] INFO - fabscan.server.FSScanServer: FabScanPi-Server 0.9.3
2021-03-04 09:45:44,478 [685:1995705040] DEBUG - fabscan.scanner.interfaces: Scanner Type is: laserscanner
2021-03-04 09:45:45,450 [685:1995705040] DEBUG - fabscan.scanner.laserscanner.driver.FSSerial: Port in Config found
2021-03-04 09:45:45,452 [685:1995705040] DEBUG - fabscan.scanner.laserscanner.driver.FSSerial: Latest available firmware version is: v.20200624
2021-03-04 09:45:47,016 [685:1995705040] ERROR - fabscan.scanner.laserscanner.driver.FSSerial: Communication error on port /dev/ttyACM0 try other flashing baudrate than 115200. Maybe corrupted bootloader.
2021-03-04 09:45:47,017 [685:1995705040] ERROR - fabscan.scanner.laserscanner.driver.FSSerial: Fatal FabScanPi HAT or compatible connection error: 'NoneType' object has no attribute 'isOpen'
2021-03-04 09:45:47,017 [685:1995705040] INFO - fabscan.server.FSScanServer: FabScan Server Exit. Bye!
(which seems that connection made but a lot of things are wrong, so i beleive this is the wrong approach and i have to used the setup no.1 or no.2 (maybe no.1 because then there is no matter in which port the arduino will be connected) where the server just stuck and not exit).
--------------Q U E S T I O N-------------------------------------------------
What i miss in my configuration and the server not running???
What else i have to add/change for fabscan to read my hardware???
If i success i can give you all of the setup for arduino pro micro to update the setup/config files.
I 'm waiting for your response.
Thnks.
Raspberry Pi3 offers wifi on board. It would be nice to add a preconfiguration for fabscanpi to work as AP.
For low memory prevention, add sapping to the image. Maybe optional, so that it can be deactivated by the user if needed.
To fix this:
sudo apt-get install python-rpi.gpio
Second problem is the GPIO-Pin-routing on Raspberry Pi 3... The onboard bluetooth component is occupying the Hardware-UART (PL011) and the UART routed to GPIO-Pins is the mini-UART (has instable baudrate etc...)
Add the following line to the end of your /boot/config.txt :
dtoverlay=pi3-miniuart-bt
This disables the onboard BT and routes ttyAMA0 to the right GPIO-Pins.
Using Chrome Version 58.0.3029.96 (64-bit), nothing above the grey menu bar shows. It is just blank and also nothing appears during a scan.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.