I’ve finally managed to upload a scketch to a mBot in Linux using Bluetooth, Arduino IDE
https://store.arduino.cc/arduino-uno-rev3
In this page, under Documentation and then Communication it clearly states that the upload must happen immediately after a reset (there must be a grace period when the board accepts new code).
The USB serial triggers a reset via DTR, and you can easily see this because each time the Serial Monitor is opened, the programs restarts and output from the begin.
The Bluetooth serial port /dev/rfcomm0, on the other hand does not trigger a reset, (the output increments from previous), and the board is not in accepting mode.
The way to make it work is (as the page suggests) to trigger a reset and immediately press upload.
It could either mean that DTR Bluetooth does not trigger a reset, or that Arduino IDE is not able to trigger a reset via Bluetooth.
So, is it at all possible to upload a sketch via Bluetooth using any os, any IDE, makeblock, mblock 3 5 etc, anything without a manual reset?
I would be curious to know how they can do it, as it would be a fantastic feature to add to Arduino IDE, and https://ide.makeblock.com/ btw.
Andrea