Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload gateway firmware via USB #489

Open
jpink opened this issue Jan 19, 2019 · 1 comment
Open

Upload gateway firmware via USB #489

jpink opened this issue Jan 19, 2019 · 1 comment
Assignees

Comments

@jpink
Copy link

jpink commented Jan 19, 2019

Hi,

I have many thin client PCs in my LAN with Arduinos connected on them via USB. Arduinos are "hard" to detach get it to my laptop, do firmware update with Arduino IDE (even small config change) and put it back to its place.

It would be great if I can update my gateway firmware also via UI like the node firmware. Documentation says that node must have MYSBootloader or DualOptiboot-bootloader. USB-serial upload doesn't need those the default Arduino bootloader is ok.

I have tested Arduino Makefile to upload Arduino .ino-files to USB connected Arduino on my thin client (Debian, i686, 128 MB RAM) via SSH connection. The process is quite simple:

  1. apt install arduino-mk as root or use sudo.
  2. adduser <username> dialup group to have permissions to use serial ports or use root.
  3. Create directory for firmware: `mkdir sketchbook && cd sketchbook'
  4. Copy sketch to that folder.
  5. Create directory for libraries mkdir libraries and copy them to it.
  6. Create build file nano Makefile. Following example uses root user:
ARDUINO_DIR = /usr/share/arduino
ARDUINO_PORT = /dev/ttyUSB0
USER_LIB_PATH = /root/sketchbook/libraries
BOARD_TAG = uno
include /usr/share/arduino/Arduino.mk
  1. Then run make upload clean and Arduino is uploaded.

One thing to note is that function "interface" must be defined in the .ino-file heading before function body. Arduino IDE does that (precompiling), but Arduino-Makefile isn't.

@jkandasa jkandasa self-assigned this Jan 27, 2019
@jkandasa
Copy link
Member

@jpink Thanks for the great idea! I do an investigation with MyController and let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants