-
-
Notifications
You must be signed in to change notification settings - Fork 110
Installing BSB‐LAN using arduino‐cli
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:
- 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.
- Install
arduino-cliwith the following command:curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh - Move
arduino-clito a directory in the$PATH, e.g.:sudo mv /home/pi/bin/arduino-cli /usr/local/bin/(adjust/home/pi/binaccording to the install location). - Initialize configuration:
arduino-cli config init(config should be created at~/.arduino15/arduino-cli.yaml) - 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 addGODEBUG=http2client=0(including the space at the end) in front of everyarduino-clicommand that has download problems. - Update core index and install board support:
arduino-cli core update-indexfollowed by eitherarduino-cli core install esp32:esp32(for ESP32) orarduino-cli core install arduino:samfor Arduino Due (attention: not available on ARM!) - 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/ttyUSB0andBSB-LAN-master/BSB_LANaccording 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.
Quick links:
BSB-LAN manual | BSB-LAN latest version | BSB-LAN bug report | BSB-LAN discussions