I have developed OTA for my stm32 controller. The UART1 Tx, Rx pins are connected to the Tx, Rx pins of DA14531 MOD. I have made all the hardware connections good. Now i have connected to the BLE module through Smart Console android application which is available in the play store. I have initiated the Binary mode by sending AT+BINREQACK command. After turning on to binary mode i have selected a hex file to flash to my controller ( The BLE should receive the data in hex file over air and it should transmit to STM32 through UART pins.)
I have set chunk size to 30, time interval of 1second and baud rate of 57600bps on the Smart console application.
While seeing the received data from BLE to STM32, I have noticed two things as below.1) The received data is in ASCII format.2) The BLE is sending 6 to 12 bytes (sometimes STM32 receiving 6 and sometimes 12 bytes.
3) Receiving of same data for 2 times (eg: receiving of same 6 byte data even it is not present in hex file)I have verified the internal logic which i have written for receiving and verifying packets, by sending data through real term application( its working efficiently).I request you to say a application which send the hex file as hex values. If not then please help me to overcome the repeating of same data and receiving of data where the chunk is 6 to 12 bytes.My file size is around 250KB and i made the my own format (Header, LOP, TOP, data, checksum) and prepared as chunks, where each chunk size is 30 bytes.
Hi Yogi,Thank you for posting your question online.I will need some time to check on this and I will get back to you.In the meantime, please refer on our older example on how we have implemented Over the Air update on STM32 via DA14531.1. Example description — STM32 SUOTA via DA14531
It is utilizing the SUOTA service which is also available on the CodeLess SDK. However, you will need modifications in order to achieve this. Best Regards,OV_Renesas
Thank you for your reply. I have gone through the example program and installed SUOTA application. after successful connection to BLE module I got an option at bottom of application like update device.Is this option being for updating the firmware of BLE module or it will send the data in the file to STM32?Please clarify my question below.I have selected 250KB hex file, chunck size-30 and time interval is 1000ms in smart renesas application. Will this transmit 30 bytes for every 1000ms? ( Say yes or no)
If your answer is yes, its not happening in my application. Help me
Hi Yogi,Thank you for posting your question online.
yogi said:I have selected 250KB hex file, chunck size-30 and time interval is 1000ms in smart renesas application. Will this transmit 30 bytes for every 1000ms? ( Say yes or no)
Yes, it will transmit 30 bytes with a connection interval of 1000ms. Within a connection interval it is possible to sent multiple packets. Please refer here: 22. SUOTA Overview — DA145XX Tutorial SDK Getting startedAs you can see on section 23. SUOTA Demonstration, we usually use chunks of 240+ bytes which are close the max supported MTU of 251. We usually decrease the chunk size if the environment is crowded and you cannot have a good connection signal.Best Regards,OV_Renesas
I'm not using the SUOTA application and that application is useful for transmitting and receiving of data through SPI or I2C but not with UART.I'm using smart console application. In this application it is possible to transmit and receive data from UART. But the problem I'm facing with this application are below:1) Even though I have put the chunk size to 30, The BLE is transmitting every 6 bytes to STM32 and it's not continuous. sometimes it is sending 12 bytes and sometimes 4 bytes. I need to overcome this problem.2) I have made connections to my STM32 to BLE(DA14531) through UART (tx, rx) pins and this communication is fixed. I'm not yet interested to use another communication like SPI or I2C.If there is any other application which connects to DA14531 and transmit & receive data through UART from STM32. please give me the link of the application and also send the application user manual.I'm flashing the hex file, please notify me if there is any application which send the file data in Hex format rather than ASCII format. (is this available yes or no).If possible, please provide me the contact information of your technical support team (who are flexible to speak and understand English language). So that my issue will be solved with in less time.
Hi Yogi,Thank you for the reply.
yogi said:I'm not using the SUOTA application and that application is useful for transmitting and receiving of data through SPI or I2C but not with UART.I'm using smart console application. In this application it is possible to transmit and receive data from UART. But the problem I'm facing with this application are below:
On the example I shared before we are utilizing UART to transmit the FW into the STM32.
yogi said:1) Even though I have put the chunk size to 30, The BLE is transmitting every 6 bytes to STM32 and it's not continuous. sometimes it is sending 12 bytes and sometimes 4 bytes. I need to overcome this problem.
You are utilizing the CodeLess SDK into Binary mode.Please refer on the DA145xx CodeLess SW Release Notes v6.380.20.66The CodeLess SDK has a limitation on packet exchange per connection interval.If you want to use the DA14531MOD only for sending the FW image, then you should consider the SPS SDK.It is the same as Binary mode on CodeLess SDK without any limitations but it does not include any AT commands.Please refer on UM-B-088: DA1453x/DA1458x Serial Port Service Reference Application
yogi said:I'm flashing the hex file, please notify me if there is any application which send the file data in Hex format rather than ASCII format. (is this available yes or no).
I am checking on this and I will get back to you as soon as possible.Best Regards,OV_Renesas
Thank you for your response. I have gone through the references that you have said.I have gone through the SUOTA android application and connected to the BLE. I have selected the hex file to be transmitted. In the parameter settings block size: -240 image bank oldest, bank1, bank2 and coming to the memory type SPI and I2C. There is no UART option here and it seems like the data in the file i have chosen will be first stored in blanks and then gets transmitted through SPI or I2C. Even though if i click on upload file it's showing an error stating internal memory is full (not enough space).I have also referred to the SPS in DA14531. it seems interesting but I want to clarify you about my requirements. the below are my requirements:
1) I need to send hex file (if there is any application which sends data as hex its better). If there is no such application which transmits file in hex format suggest a application which send file in ASCII format and also meets below requirements:
2) It should send each chunk without any missing of data where the chunk size is constant.
3) I should also require user time interval setup to send the chunks.If there exist any suitable technology and application please provide me the manuals, examples for transmit and receive through UART from STM32.As this process going for days... I request you to provide me the contact number so that the issue clears my tomorrow.
I request a reply for belowI have gone through the SUOTA android application and connected to the BLE. I have selected the hex file to be transmitted. In the parameter settings block size: -240 image bank oldest, bank1, bank2 and coming to the memory type SPI and I2C. There is no UART option here and it seems like the data in the file i have chosen will be first stored in blanks and then gets transmitted through SPI or I2C. Even though if i click on upload file it's showing an error stating internal memory is full (not enough space).I have also referred to the SPS in DA14531. it seems interesting but I want to clarify you about my requirements. the below are my requirements:
Hi Yogi,
OV is OOO till 24th April, I will keep on supporting you here.
As I go through the Q&As, I have a question, do you need DA14531 works as BLE peripheral or Central role? Or just the FW upgrades device for Host MCU?
If you just using DA14531 as a wireless FW upgrading for Host MCU. the SPS SDK will cover all the concerns you pointed out.
BR,
JH_Renesas
This demo that OV shared with you 1. Example description — STM32 SUOTA via DA14531 does transmit the STM32 FW through UART, the I2C or SPI selection in the APP will not take effect just left it as it is.
If you followed step by step, the STM32 FW will be updated by DA14531 Through UART.
If you do not need the SUOTA app but just using the GATT service, please find the SPS SDK for data pumping between DA14531 and STM32. but you need to handle the STM32 Side FW OTA logics(as you mentioned you have done this part)