Remote programming of microcontrollers through SSH

Hi there,

while most of the microcontrollers don’t offer native SSH access (yet!), there’s obviously always the possibility to keep them running attached to a Linux machine taking the role of a remote programmer. As people have been asking about this and we have been doing it this way for some time already, we wanted to create an appropriate thread for that topic now. Enjoy.

With kind regards,

As @einsiedlerkrebs and me prefer commandline-driven build and firmware programming environments, we usually add appropriate support for that to the firmware repositories we are maintaining [1,2]. By doing it this way, the ramp-up time to build the firmware and upload it to the device is really low as the task is usually completely automated and can be run through any reasonable shell ¹, even remote.

Obviously, when taking the next step towards MCU programming, your system would require having both machines in place where you would log in to your remote Linux computer as usual but then would program the microcontroller from there by just typing "make && make upload" ² after changing to the corresponding firmware source directory.

Microcontrollers on ready-to-run development-like boards are usually connected through USB these days, so it’s really just plug&play anyways ;]. ³

[1] GitHub - hiveeyes/arduino: Arduino-compatible MCU firmware code for sensor-, telemetry-, and gateway-appliances.
[2] GitHub - hiveeyes/terkin-datalogger: Datalogger for MicroPython and CPython.


¹ Obviously, the Linux environment beyond the “reasonable shell” will have to have the respective development toolkit and compiler toolchain installed. However, we can resort to the Firmware builder if this would not be possible due to runtime constraints, see also Firmware builder usage.
² “Command may be slightly different from actual item.” ;]
³ Saying that, there might definitively be issues from outside conditions to any parts where connectors are involved. While @weef might have something to say about that, please recognize that @einsiedlerkrebs and me are coming from LinkIt Smart 7688 Duo as RFM95 to Wifi-BERadio gateway (LinkIt Smart 7688 Duo) here.

Hey, can you SSH into an Arduino? or any micro controller?

yes you can - with an {arduino|dragino} yun shield like used in Open Hive V1. the yun part runs an openwrt variant that provides ssh access and upload possibilities for sketches to the arduino.

the openwrt firmware of the yun shield provided by dragino company is not updated since 2017.


2 posts were split to a new topic: Arduino / Dragino Yun von @mois aktualisieren