This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BMD-200 and Atmega328p OTA upgrade

Hi there,

I've been searching around this forum for a while and still haven't gotten any reliable answer. I'm trying to develop a OTA firmware upgrade solution for the ATMega328p (or any other uC for that matter) and I've come across the BMD-200 module, which uses the nRF51822 SoC. Now, I'm fairly certain I can get it to work by recognizing the initial characters sent by the bootloader (0x30 0x20) in order to reset the atmega and begin the ota upgrade, but it seems odd that no one else is talking about it in the forums or anywhere on the internet.

I did find this link: https://github.com/NordicPlayground/ble-optiboot , which is a modified bootloader to use the BLE OTA upgrade, but it was for the nRF8001. Would it also work with the nRF51822 ? The BT module shouldn't matter but i'd like to be safe before purchasing development kits and started working on this.

Best regards,

Luís

Parents
  • Hi Einar,

    You can theoretically use the optiboot bootloader. I was just asking to know if anyone had tried to do this with a BT 4.x module. There are lots of people who have done upgrade OTA with BT 2.x modules, mainly the HC-05 variants, but never with any BT 4.x module. That's why I was asking around here if someone had done such a thing before.

    The main problem is the ability to reset the atmega when the characters arrive, but that can be fixed through programming right ? Or when you start the bridge between UART and BT you can no longer inspect the data comming from either side?

    Best regards,

    Luís

  • The main problem is the ability to reset the atmega when the characters arrive

    Is it?

    Why is that a problem? This would be a fundamental part of any bootloader - irrespective of what transport is used.

    when you start the bridge between UART and BT you can no longer inspect the data comming from either side?

    I have no idea what you mean by that!

     is correct: the AVR bootloader part of this really has nothing to do with nRF - the AVR neither knows nor  cares what is "driving" it.

    If you have no experience with AVR (or any other) bootloaders, then you should certainly spend time to understand & get that working on its own without BT before adding that complication!

    And that is beyond the scope of this forum.

    EDIT

    AIUI, OptiBoot is (essentially) what Arduino uses - so there is no shortage of support for that!

    EDIT 2

    https://arduino.stackexchange.com/questions/757/what-alternatives-are-there-to-the-optiboot-bootloader

Reply Children
  • Yes. The problem is the ability to reset the ATMega when the characters arrive. I didn't say it wasn't a fundamental part of any bootloader - I'm saying that I want to know if I can access the characters comming from the BT side, check if they're the 0x30 0x20, which is the initial communication of the optiboot bootloader. That's what I meant when I asked if you're able to inspect the data.

    Again, I don't argue with the fact that the bootloader has nothing to do with the nRF.

    What I am asking and is on the scope of this forum are two things:

    1) Has anyone tried this with any success ? If so, would you mind sharing your experience?

    2) If not, at least tell me if, when you want to make a bridge between the BT and the UART in the BMD-200, if you still have access to the data comming from both sides. In other BLE devices, you simply turn on the bridge and that's it, you'll never have access to what's comming from the BT interface nor the UART interface, making it impossible to add a condition that states "oh, if you receive 0x30 and 0x20, please make the GPIO LOW for 200ms".hence resetting the ATMega.

    Again, not looking for bootloaders, only information.

    Best regards,

    Luís

Related