Hi,
I am sending a message here after posting on the Github issues of the repo, as those forums are more active
A major feature of the IOT2020/2040 is to run Arduino programs alongside Linux.
Deploying such programs is done by flashing the example image onto the microSD card and booting, then using the MicroUSB port on the device, selecting the right COM port in the Arduino IDE and using the āUploadā button.
Unfortunately, when using the BalenaOS/ResinOS image (either from the cloud panel or the homepage), the IOT2020 wonāt show up in both the Arduino IDE and Windows Device Manager.
Is Arduino supported? If not, is it a planned feature? We are trying out BalenaOS as a replacement to the base image but Arduino support is a must have.
Cheers!
Hi, the Arduino feature as you have mentioned is not supported. It sounds from your explanation, that it needs a special OS for that to work (as booting from that SD card).
Not entirely sure how that feature would combine with the way balenaOS is set up (in terms of how to get the software on the device, and how to run it), weād need to look into this.
Looking at the tutorial, the IoT2000 might be a Intel Galileo compatible board (or using Galileo inside?), so Iām sure it can be programmed many different ways, and the hardware interfaces should be documented.
Thus, thanks for bringing this to our attention, weāll have to try it out, In the meantime thereās no Arduino programming support planned for IoT200 with balenaOS. I believe it should be possible to provide similar support by running a specially crafted container on the device, but thatās just a hunch. This is the current status, but let you know if we have anything new regarding this!
Hey @edorgeville was looking into this a bit more, and actually it seems much more feasible than Iāve expected ( knock on wood).
looking inside Siemensā example image, it might be possible to replicate that functionality (it looks like only a few tools are involved), and could possibly receive sketches over serial
also it seems like the Arduino IDE creates Linux executables for the IOT2000 (based on this forum post), so it could be checked in and shipped/deployed to devices by the natural balenaCloud way. This is just a hunch, but would make things interesting.
So there might even be more than one way to do this, catering to more interesting workflows.
Would recommend checking things out along this path, and as mentioned, weāll look into this further and let you know if thereās any development!
Wonderful news!
I did notice the elf files in the past, didnāt think that would be an executable.
I will do more digging toward making a Dockerfile running said .elf file.
Thanks a lot!
This was a waaaaay deeper rabbit hole than I thought
I tried to understand the structure of the meta-iot2000 repo but the whole Yocto ecosystem is still a complete mystery to me after a day and a half of reading.
Hey @edorgeville I would not think the solution will be in meta-iot2000, that is the host OS. In my opinion based on the few hours check above, it should all work on the application level, so donāt have to dig into that area at all.
The main thing is I believe:
creating an application that does the same thing as the Siemens example OSās Arduino service, just inside a container, or
check out the files created by the Arduino IDE and check how to ship and run those.
These should be a lot more tractable. No need to go down to the OS level necessarily.
Its based on the Intel x1000. It might be worthwhile checking the old discontinued Intel Galileo dev board for hints on how to go about doing this.
This should be possible via the Arduino IDE. We need to figure out what is running in the SiemensOS that makes the communication with arduino ide happen. I tried to hunt around and I think the magic happens here
There is the launcher script with a systemd service.
Does that line read from /dev/ttyGS0 and then pipe it out to /dev/ttyGS0? Not entire sure what its doing. Reading from Arduino IDE via /dev/ttyGS0 and simultaneously writing to a sketch perhaps?
Maybe this is the way the clloader utility works
Do you see /dev/ttyGS0 in the host/app containers?
From what I understand, this would be the output (?), maybe what youād get from running Serial.print() inside the Arduino program.
I think clloader does run the Arduino program (sketch) too.
Not from the host nor from a container. Hereās the output of ls -la /dev (character limit wouldnāt let me post it here):