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

Firmware update of BLE via LTE

Hi Community!

I'm working on product development for a client/customer. The product will be a small embedded system with an LTE chip (nRF9160) and a BLE chip (nrf52840). (We are using the nrf9160 DK for development.) When the product is ready and hits the market, we will need to be able to push firmware updates via the Internet to the product. I'm aware of the fact that there is an OTA firmware update method for the nrf9160 chip, but the problem is, how to update the BLE chip.

I know that a DFU process needs a DFU target and a DFU controller. I have implemented a DFU target before, namely UART DFU on an nrf52840 chip. As for the controller, I used nrfutil on a PC. However, in the product that I'm developing now, this is not a feasible solution since the firmware update has to be pushed via the Internet. 

I have two potential solutions in mind, but I don't know how to implement them with the tools that Nordic provides. Here are the two possible ways:

1) Send the new firmware as data via the Internet to the nrf9160's flash. Then, let the nrf9160 be the DFU controller and send the firmware via UART to the nrf52840 target chip. As far as I understand, this solution would need a DFU controller on the nrf9160 chip. I haven't been able to find one, so I decided to try solution nr 2.

2) In a normal use case for nrfutil, we can write the command:

nrfutil dfu serial -pkg FWupdate.zip -p COM5 -b 115200

This command would normally open com port 5 and send the data through it, where on the other end, the UART DFU target would receive it, see the illustration below:

Normal use case for nRF Util

This use case, however, will not work for our product, because we need to send the data through the Internet, which is not an option with nrfutil. In theory, we could work around this by creating a dummy PC app whose task would only be to provide a virtual com port towards nrfutil, while channeling the received data further via LTE. When the nrf9160 chip receives the data via LTE, then it immediately sends it via UART to the DFU target that is the nrf52840. See the illustration below:

nRF Util goal usage

We believe in this solution, but to test it, we needed to simplify this setup, like below:

Testing nRF Util Internet use case

As shown in the picture, we eliminated the Internet connection because first, we needed to test that nrfutil is able to communicate through a virtual com port. Unfortunately, the test was not successful. When we observed the communication through a terminal, we received "junk" characters from nrfutil, similarly to what you would see when the baud rate of the communicating devices is different. Also, the amount of exchanged data was much less than what you would expect when firmware is being sent.

My questions are the following:

1) Does this workaround sound like a good possible solution to the problem of "How to update the nrf52840 chip when the firmware must be distributed via LTE?"

2) ...If yes, what could be the reason that in our test, nrfutil failed to send the correct data through the virtual com port?

3)...If not, is there any other way at all? (We have considered implementing the BLE DFU instead of the UART DFU on the target device, but that is not a possible use case)

4) Is there a solution for the first described possible solution?

I believe that what we are trying to implement in our product is not a unique use case. There must be a way to develop it! If you know how others solved it, please make me smarter!

Related