Skip to content

Installing BSB‐LAN using arduino‐cli

fredlcore edited this page Sep 19, 2025 · 8 revisions

On some systems, it may be more convenient or even necessary (for example, on ARM architectures such as the Raspberry Pi or on some Synology NAS) to use the command-line-based arduino-cli tool instead of the full-blown Arduino IDE. These are the basic steps to install and compile BSB-LAN on those (Linux-compatible) machines:

  1. Make sure that your OS is a full 64-bit system, as the current ESP32 cores contain pre-compiled 64-bit binaries that won't run on a 32-bit OS. Raspberry Pi OS' download website still defaults to 32-bit as this will run on older Pis as well, so watch out! For a quick instruction on how to set up a Debian chroot environment on a Synology NAS, see here.
  2. Install arduino-cli with the following command: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
  3. Move arduino-cli to a directory in the $PATH, e.g.: sudo mv /home/pi/bin/arduino-cli /usr/local/bin/ (adjust /home/pi/bin according to the install location).
  4. Initialize configuration: arduino-cli config init (config should be created at ~/.arduino15/arduino-cli.yaml)
  5. Increase the timeout to 10 minutes to prevent broken downloads: arduino-cli config set network.connection_timeout 10m. If there are still problems, you may add GODEBUG=http2client=0 (including the space at the end) in front of every arduino-cli command that has download problems.
  6. Update core index and install board support: arduino-cli core update-index followed by either arduino-cli core install esp32:esp32 (for ESP32) or arduino-cli core install arduino:sam for Arduino Due (attention: not available on ARM!)
  7. Then compile and flash using one of these commands:
    Olimex EVB: arduino-cli compile --upload -p /dev/ttyUSB0 --fqbn esp32:esp32:esp32-evb:UploadSpeed=460800 --build-property build.partitions=min_spiffs --build-property upload.maximum_size=1966080 BSB-LAN-master/BSB_LAN
    Olimex POE-ISO: arduino-cli compile --upload -p /dev/ttyUSB0 --fqbn esp32:esp32:esp32-poe-iso:UploadSpeed=460800 --build-property build.partitions=min_spiffs --build-property upload.maximum_size=1966080 BSB-LAN-master/BSB_LAN
    ESP32 NodeMCU: arduino-cli compile --upload -p /dev/ttyUSB0 --fqbn esp32:esp32:esp32:UploadSpeed=460800 --build-property build.partitions=min_spiffs --build-property upload.maximum_size=1966080 BSB-LAN-master/BSB_LAN
    Arduino Due: arduino-cli compile --upload -p /dev/ttyACM0 --fqbn arduino:sam:arduino_due_x_dbg BSB-LAN-master/BSB_LAN
    Attention: Adjust /dev/ttyUSB0 and BSB-LAN-master/BSB_LAN according to your system!

If your system does not support the flash tool (such as esptool_py on Synology NAS without using the chroot workaround), then you can also just compile the binary and upload it via the OTA upload function of BSB-LAN. Add the --build-path ./build option to easily locate your compiled binaries in the build sub-directory of the current path.

Clone this wiki locally