Author Topic: RFDuino library function to upload a sketch over BLE  (Read 2723 times)

kursatu

  • RFduino Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
RFDuino library function to upload a sketch over BLE
« on: September 04, 2014, 02:36:28 PM »
Hi
I've completed a device prototype and used RFDuino DIP version.
We are evaluating it for the production and one requirement is
to update the sketch via BLE.
Is it possible to add this feature?
It will be up to sketch implementer to call and get the current sketch replaced,  and
then reset from the lib function would start the updated sketch.
If there is some version of as the RFDloader protocol (apparently similar to avrdude) over
BLE, the other side can implement and use this protocol to upload the sketch
I have been using RFDuino for less than a month so my questions
may not be applicable or relevant.

I liked the RFDuino's rapid development capability and and the richness of Arduino sw/hw platform.
It may be possible to implement this using low level Nordic development and RFDuino but probably
to much effort.
If we can't overcome this obstacle, we'll look at other SOC solutions, like those from CSR
 

I've checked the following threads and apparently people
expressed the need for this.
http://forum.rfduino.com/index.php?topic=425.0
http://forum.rfduino.com/index.php?topic=272.0

« Last Edit: September 04, 2014, 05:02:49 PM by kursatu »

Tim

  • RFduino Sr. Member
  • ****
  • Posts: 110
  • Karma: +2/-0
    • View Profile
Re: RFDuino library function to upload a sketch over BLE
« Reply #1 on: September 08, 2014, 07:46:18 AM »
Hello everyone,

Thanks for your post Kursatu.  I'm in a similar situation.  I have a tested prototype of a product that uses RFduion DIP. With acceptable stability, performance, etc., we are now looking at commercial production using the RFD22301.

Our product integrates RFduino with an iOS app that customers download via Apple's App Store. They purchase the hardware part (with embedded RFduino) separately.

For our customers, the best option for updating the Arduino sketch (which will happen from time to time), is that we release a new version of our iOS app that includes the binary of the updated Arduino sketch embedded in it. The user runs our app on their iOS device, connects to an RFduino, and is presented with an option to update the Arduino sketch. After confirmation, our iOS app sends a message containing the updated sketch to the RFduino over BLE and an RFduino library call is made to install the sketch and reset.

Without the ability to do something like the above, we'll need to include a USB shield in our hardware product (i.e. increase costs) and impose a much more difficult procedure on our customers for updating the Arduino sketch.

Can anyone from RFduino comment on any plans to offer OTA sketch updates for RFduino?

Many thanks,

Tim

edorphy

  • RFduino Full Member
  • ***
  • Posts: 86
  • Karma: +0/-0
    • View Profile
Re: RFDuino library function to upload a sketch over BLE
« Reply #2 on: September 18, 2014, 05:19:30 PM »
TI has a device called SensorTag which is based off their CC2541 module. It supports OTA firmware upgrades. There are private characteristics used for upgrading the device.
I don't know if it would be possible to modify flash while the module was running.

Check out Adafruits BlueFruit wireless arduino programming for some inspiration.

In order to accomplish this we would really have to know how the boot loader works.

Tim

  • RFduino Sr. Member
  • ****
  • Posts: 110
  • Karma: +2/-0
    • View Profile
Re: RFDuino library function to upload a sketch over BLE
« Reply #3 on: October 07, 2014, 09:00:38 AM »
Thanks Edorphy ... My sense is unless RFduino offers this support directly, one would need to use the low level tools offered by the BT chip provider.  My understanding is the RFduino uses Nordic's nRF51822. If found this interesting link:

https://www.nordicsemi.com/eng/Products/S110-SoftDevice-v7.0

This describes exactly what I'm looking for and says it's available for nRF51822. I don't know enough to say whether or not this could be utilized on the RFduino platform.  I presume if it could, doing so would require using the Nordic low level tools, along with an IAR Embedded Workbench, CC Debugger, etc.  Mkay has already showed us how to use the Nordic SDK, see here:

http://forum.rfduino.com/index.php?topic=287.0

I'm certainly willing to learn all of this, but it would be comforting to know that it's possible before I invest significant time.

Thanks for any thoughts ...

Tim

 

anything