I am trying to find a way to upload a compiled bin file to Industruino D21G to be able to send updates to the clients which they could upload themselves. So far, no joy.
I have tried two ways so far.
1. Set verbose output, copy the same command used by Arduino IDE (which works fine), which in my test case looks like
C:\Users\Peter\AppData\Local\Arduino15\packages\industruino\tools\bossac\1.7.0-industruino/bossac-0x4000.exe -i -d --port=COM18 -U true -i -e -w -v C:\Users\Peter\AppData\Local\Temp\arduino_build_947395/PVMaster.ino.bin -R
But the only output it produces is "Set binary mode" output and then nothing else happens.
2. Tried installing separate BOSSA release from https://github.com/shumatech/BOSSA/releases
I am running Win7 x64, so I tried x64 version, but that one freezes on selecting the COM port.
Any ideas what could be wrong or what other way I could try?
Hi Tom, that was exactly what was needed!
I succeeded with the following .bat file that takes .bin file as a parameter
echo Upgrade procedure starting.
if %1.==. goto error
::if not exist %binfile% goto error
for /f "usebackq" %%B in (`wmic path Win32_SerialPort Where "Caption LIKE '%%Industruino D21G%%'" Get DeviceID ^| FIND "COM"`) do set comportA=%%B
if %comportA%==NONE goto nodevice
echo Com Port for Arduino device is detected as %comportA%.
echo Reset Arduino into bootloader
mode %comportA%: baud=12 > nul
timeout 2 > nul
for /f "usebackq" %%B in (`wmic path Win32_SerialPort Where "Caption LIKE '%%Industruino D21G%%'" Get DeviceID ^| FIND "COM"`) do set comportB=%%B
if %comportB%==NONE goto nobldevice
echo Com Port for Arduino bootloader device is detected as %comportB%.
echo Starting Uploader...
bossac-0x4000.exe -i -d --port=%comportB% -U true -i -e -w -v %binfile% -R
echo No matching module found, you should connect the module you want to upgrade.
echo Reset into bootloader failed, please try again...
Echo Missing parameter or file, you should provide the full filename of an existing .bin file you want to use.
echo Upgrade done!
Hi, i think the command you took from the Arduino IDE should work, but the D21G has to be put into bootloader mode first. The IDE does this like this: "Forcing reset using 1200bps open/close on port /dev/ttyACM0"
On my Linux laptop i can do this at the command line:
stty -F /dev/ttyACM0 ispeed 1200 ospeed 1200
Sorry i have no idea how to do this on Windows
If you want to test this manually first, you could hit the reset button on the bottom of the baseboard twice, that will also activate the bootloader, then the board is ready to receive the .bin
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!