Skip to content

Firmware - Setup


It is necessary to use a Raspberry Pi with at least 1GB of RAM to run the firmware. So far, the firmware has been tested on Raspberry Pi 3B+ and 4B variants, but it might work on other versions.

The easiest way is to download the latest Raspbian image and flash your micro SD card as described here.

Alternatively you can set up the firmware manually by following this guide.

Flashing the SD Card using the Raspberry Pi Imager

I have pre-compiled a working Raspbian Image (2022-07-08), that can be downloaded from Google Drive (1.5GB) (working flawlessly on Raspberry Pi 3b+ and 4)

Download and flash the Raspbian Image to your Micro SD Card using the Raspberry Pi Imager

Manually installing and setting up your Raspberry Pi

The firmware and following installation guide is optimized for Raspbian Bullseye with Desktop environment, but can also be used headless (Note, that the desktop version comes with some libraries that you will otherwise need to install manually).


sudo raspi-config

--> performance options --> GPU --> change to 256 Increase GPU memory, which helps processing the captured photos

--> localization settings --> wlan country --> your country Change the WLAN settings, so that device works in your area

Save and reboot now (or later ;)

Folder structure

Create directories

mkdir /home/pi/OpenScan/ /home/pi/OpenScan/scans /home/pi/OpenScan/files /home/pi/OpenScan/settings /home/pi/OpenScan/tmp /home/pi/OpenScan/updates

WLAN settings

Open the settings file

sudo nano /etc/network/interfaces

And add to the end:

auto wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Create a shared network drive, so that you can easily access the Raspberry Pi's filesystem. It enables you to upload custom datasets to the OpenScanCloud through the browser interface. Simply copy a zip file containing your photos to the ../OpenScan/scans directory.

Install the package

sudo apt-get install samba samba-common-bin

Open the configuration file

sudo nano /etc/samba/smb.conf

And change the following lines:

read only = no
create mask = 0775
directory mask = 0775

Add the following line, if you are using Windows:

wins support = yes

And add to the end of the file:

comment=Raspberry Pi Share
only guest=no
create mask=0777
directory mask=0777

Set a password for user pi (by default I use password raspberry)

sudo smbpasswd -a pi

And add rights:

sudo chmod -R 777 /home/pi/OpenScan


Necessary to controll DSLR cameras connected by USB cable.

sudo apt install libgphoto2-dev gphoto2
sudo pip3 install -v gphoto2


Download and install:

bash <(curl -sL

--> confirm with yes and yes :)

Open node-red daemon file:

sudo nano /lib/systemd/system/nodered.service

add to the section [Unit] flask.service

and change the following lines under [Service] to run nodered as root:

User = root
#Group = pi

Initialize node-red:

sudo node-red admin init

  • settings file: /root/.node-red/settings.js
  • Security: No
  • Project: No
  • Flows File Settings: Enter
  • Passphrase: Enter
  • Theme: default
  • Text editor: default
  • External Modules: Yes

Open node-red settings file:

sudo nano /root/.node-red/settings.js

And find, uncomment and change the following parameters:

userDir: '/home/pi/OpenScan/settings/.node-red/',

uiPort: process.env.PORT || 80,

httpAdminRoot: '/editor',

httpStatic: '/home/pi/OpenScan/',

ui: { path: "" },

functionGlobalContext: { // enables and pre-populates the variable

Enable nodered daemon and restart the device:

sudo systemctl enable nodered.service
sudo reboot -h

Open the node-red settings directory:

cd /home/pi/OpenScan/settings/.node-red/

And run the following command to install some additional palettes to node-red

sudo npm i node-red-dashboard && sudo npm i node-red-contrib-python3-function && sudo npm i node-red-node-ui-table


Libcamera - to run Arducam IMX519 (and other non-Raspberry-Pi camera moduls)

See for more details

Download all necessary files

wget -O && chmod +x

sudo apt update

./ -p libcamera_dev

./ -p libcamera_apps

./ -p imx519_kernel_driver

Download OpenScan Firmware

Custom node red flows (browser interface):

sudo wget -O /home/pi/OpenScan/settings/.node-red/flows.json

Some Python functions used by the firmware:

sudo wget -O /usr/lib/python3/dist-packages/

A local server providing several functions (flask):

sudo wget -O /home/pi/OpenScan/files/

Custom config.txt file, which is needed to use different camera moduls (especially IMX519):

sudo wget -O /boot/config.txt

Arducam's camera focus script for the IMX519 sensor:

sudo wget -O /usr/lib/python3/dist-packages/

And the OpenScan Logo to have a nice background:

sudo wget -O /home/pi/OpenScan/files/logo.jpg

Enable Flask local server:

create and open the service file: sudo nano /lib/systemd/system/flask.service

with the following content:

Description=photo service
#ExecStartPre=/bin/sleep 5
ExecStart=/usr/bin/python3 /home/pi/OpenScan/files/

Enable and start the service:

sudo systemctl daemon-reload && sudo systemctl enable flask.service && sudo systemctl start flask.service


add to /boot/config.txt to disable display which causes some issues --> WHY???