wireless upload?

bdbell
Mon Aug 31, 2015 1:26 pm
I would like to integrate the ability to upload sketches via bluetooth for a couple of my projects. I have a BLE4.0 USB dongle and module that works for wireless uploads with Arduino based boards – one i/o connects to the reset pin. I have tested the BLE dongle/module with a basic Arduino circuit to do wireless uploads, and it works well. The Arduino circuit I am using has a 0.1uF cap between BT i/o and reset, and a 10k pullup.

That said…I am not sure what needs to be done in order to get this working with an STM32 device….change to the bootloader, new upload method, additional circuitry? Has anyone done this yet?


victor_pv
Mon Aug 31, 2015 6:15 pm
bdbell wrote:I would like to integrate the ability to upload sketches via bluetooth for a couple of my projects. I have a BLE4.0 USB dongle and module that works for wireless uploads with Arduino based boards – one i/o connects to the reset pin. I have tested the BLE dongle/module with a basic Arduino circuit to do wireless uploads, and it works well. The Arduino circuit I am using has a 0.1uF cap between BT i/o and reset, and a 10k pullup.

That said…I am not sure what needs to be done in order to get this working with an STM32 device….change to the bootloader, new upload method, additional circuitry? Has anyone done this yet?


RogerClark
Mon Aug 31, 2015 9:38 pm
When i was investigating options for the generic booloader, I found that the Leaflabs guys had started to write a bootloader that could be uploaded via Serial.

Their Serial Bootloader is a branch of the Maple bootloader in the Leaflabs github account.

Ive never tried to run it, but it appears to implement the same serial upload protocol as used by the serial bootloader that is built into the hardware of the STM32.

I think your best option would be to modify that bootloader.

There is another option if you have a CC Debugger tool to reflash your BLE module.
Well, I presume you are running. cc254x based BLE board. aka HM10.

If you have one of those, there is some free custom firmware for the HM10 called BlueBasic.
Which would allows you to run a form of modified BASIC on a CC254x based BLE board, and this allows you to control GPIO etc on the CC254x as well as use serial and the BLE comms.

So you could get the BLE module to Pull Boot 0 HIGH, and toggle the Reset pin, then transfer data via serial from the BLE where you somehow send this using stm32flash on the PC.

One problem with using the hardware bootloader is that I think it requires Even Parity on the serial, and I’m not sure whether BlueBasic has any commands to change this.

BTW. you can get a CC Debugger clone on eBay for around $20, but be aware some of them dont come with firmware in the unit, so are useless.


songotag
Tue May 24, 2016 10:30 am
bdbell wrote:I would like to integrate the ability to upload sketches via bluetooth for a couple of my projects. I have a BLE4.0 USB dongle and module that works for wireless uploads with Arduino based boards – one i/o connects to the reset pin. I have tested the BLE dongle/module with a basic Arduino circuit to do wireless uploads, and it works well. The Arduino circuit I am using has a 0.1uF cap between BT i/o and reset, and a 10k pullup.

That said…I am not sure what needs to be done in order to get this working with an STM32 device….change to the bootloader, new upload method, additional circuitry? Has anyone done this yet?


RogerClark
Tue May 24, 2016 2:15 pm
I dont know of anyone who has flashed their STM32F1 using bluetooth

Which bluetooth device are you using?


JohnL
Wed May 25, 2016 2:29 am
Built in STM ROM Uart bootloader requires fairly critical handshake timing and I was not able to use it with wireless RF link.

Basically, you would need flexible handshake timing with uploading host, to allow for wireless latency.


stevech
Wed May 25, 2016 3:14 am
JohnL wrote:Built in STM ROM Uart bootloader requires fairly critical handshake timing and I was not able to use it with wireless RF link.

Basically, you would need flexible handshake timing with uploading host, to allow for wireless latency.


JohnL
Wed May 25, 2016 7:12 am
Used ST PC “Flash Utility” Uart uploader. Baud rate was not the issue as the initial communication was established, RF transceivers operated in Uart transparent mode. Have used same Uart wireless RF transceivers successfully with Cypress PSOC4 Uart bootloader.

http://www.st.com/content/st_com/en/pro … stm32.html

http://www.st.com/content/ccc/resource/ … 264342.pdf

Using RF wireless transceivers, 20mS+ latency was too long waiting for ACK from uploading host and caused timeout (NACK) on STM microcontroller Uart bootloader.


songotag
Wed May 25, 2016 8:09 pm
RogerClark wrote:I dont know of anyone who has flashed their STM32F1 using bluetooth

Which bluetooth device are you using?


ddrown
Wed May 25, 2016 9:56 pm
songotag wrote:bdbell wrote:I would like to integrate the ability to upload sketches via bluetooth for a couple of my projects. I have a BLE4.0 USB dongle and module that works for wireless uploads with Arduino based boards – one i/o connects to the reset pin. I have tested the BLE dongle/module with a basic Arduino circuit to do wireless uploads, and it works well. The Arduino circuit I am using has a 0.1uF cap between BT i/o and reset, and a 10k pullup.

That said…I am not sure what needs to be done in order to get this working with an STM32 device….change to the bootloader, new upload method, additional circuitry? Has anyone done this yet?


mrburnette
Wed May 25, 2016 10:19 pm
Respectfully, sounds like a P.I.T.A. and reminds me of how the OTA works for the ESP8266.

A better wzy, IMO, is how Bluebie manages micronucleus: like a virus.

Ray


bdbell
Thu May 26, 2016 12:00 am
I did try to get this working a few times, with a couple of different Bluetooth modules and firmware but I was never able to make it work. DFRobot have designed a STM32 F103RET6 based Bluetooth board with built in Bluetooth that works for wireless upload – http://www.dfrobot.com/index.php?route= … 0Y279xS2Hs – I have one and it works well. They have created a custom Firmware and the communication to the STM32 is all done through the Bluetooth chip (CC2540). The problem with it is that it works only with a custom version of the Arduino IDE Version 1.5.5 – I have tried to make it work with newer versions with no luck. Because of this I rarely use it. The English Wiki site does not have the schematic, but I know it is on their Chinese web site Wiki – I have a copy of it somewhere if it can’t be found.

mrburnette
Thu May 26, 2016 1:01 am
bdbell wrote:<…>
DFRobot have designed a STM32 F103RET6 based Bluetooth board with built in Bluetooth that works for wireless upload – http://www.dfrobot.com/index.php?route= … 0Y279xS2Hs – I have one and it works well. They have created a custom Firmware and the communication to the STM32 is all done through the Bluetooth chip (CC2540). <…>

RogerClark
Thu May 26, 2016 2:04 am
Your could program an nRF51822 to do what the CC2540 does

The problem with the CC2540 is that you can only program it with IAR – which costs $$$$
the nRF51822 can be developed with gcc and also MBED.

However HM10 (C2541) are around $4 (or less) but nRF51822 modules are twice the price.

You would still need to write your own custom bootloader to interface with the nRF51822

However, How are you going to transmit data over BLE from a PC ?????

I have looked at uploading to the nRF51822 before (for a RedBearLabs module), but only way to do it was via an Android phone

You would probably be better off using a ESP8266 and wifi rather than using BLE.


songotag
Thu May 26, 2016 4:22 pm
RogerClark wrote:

You would probably be better off using a ESP8266 and wifi rather than using BLE.

martinayotte
Thu May 26, 2016 4:37 pm
Yes, ESP8266 could be used as Wifi-Serial bridge, so the MapleMini could receive new firmware “OverTheAir” (OTA).

songotag
Thu May 26, 2016 4:51 pm
martinayotte wrote:Yes, ESP8266 could be used as Wifi-Serial bridge, so the MapleMini could receive new firmware “OverTheAir” (OTA).

martinayotte
Thu May 26, 2016 5:52 pm
Take a look at the ESP-Link firmware : https://github.com/jeelabs/esp-link
Although the STM32 is not directly mentioned, there is a section which talk about ARM in general.
You will probably need to have small modification to allow placing the STM32 in Boot mode using a GPIO.

songotag
Thu May 26, 2016 7:35 pm
martinayotte wrote:Take a look at the ESP-Link firmware : https://github.com/jeelabs/esp-link
Although the STM32 is not directly mentioned, there is a section which talk about ARM in general.
You will probably need to have small modification to allow placing the STM32 in Boot mode using a GPIO.

martinayotte
Thu May 26, 2016 8:27 pm
No, I didn’t have any such needs yet.
But I’m sure user @tve from JeeLab could help if you’re getting into troubles.

racemaniac
Fri May 27, 2016 7:23 am
songotag wrote:martinayotte wrote:Take a look at the ESP-Link firmware : https://github.com/jeelabs/esp-link
Although the STM32 is not directly mentioned, there is a section which talk about ARM in general.
You will probably need to have small modification to allow placing the STM32 in Boot mode using a GPIO.

songotag
Fri May 27, 2016 7:45 am
racemaniac wrote:
It seems you’re not getting the point: it doesn’t exist it, and if you want it, you’ll have to make it yourself :). But people here are giving you pointers on how it could be made, and will help you if you run into problems.

martinayotte
Fri May 27, 2016 12:16 pm
Keep us posted when you will receive your ESP and try out the Esp-Link.

songotag
Fri May 27, 2016 1:35 pm
martinayotte wrote:Keep us posted when you will receive your ESP and try out the Esp-Link.

songotag
Fri Jun 03, 2016 5:03 pm
martinayotte wrote:Keep us posted when you will receive your ESP and try out the Esp-Link.

martinayotte
Fri Jun 03, 2016 5:30 pm
I’ve never try myself, but the above syntax is a bit wrong.
it should something like that :
avrdude -p m328p -c arduino -b 115200 -P net:10.111.111.60:23 -Uflash:w:<tmp-build-path>/yourHexFile.hex

songotag
Fri Jun 03, 2016 5:51 pm
martinayotte wrote:I’ve never try myself, but the above syntax is a bit wrong.
it should something like that :
avrdude -p m328p -c arduino -b 115200 -P net:10.111.111.60:23 -Uflash:w:<tmp-build-path>/yourHexFile.hex

martinayotte
Fri Jun 03, 2016 6:15 pm
It looks like “avrflash” is a Bash script that use Curl, so probably it should work fine on Windows if you have Cygwin installed.

Leave a Reply

Your email address will not be published. Required fields are marked *