Hi, Dialog
I have some problems about the OTA, as follows:
1. Do you have solved the APP stable issue with Android 5.0 ? i have checked your document and find that your app only stable with Android 4.4.4.
2. Is there anything can be deleted from proximity reporter project with the SDK5.0 download from this website ? what's the minimum size of SDK5.0 after compiled ?
I have compile it, and find that total size more than 30KB. This project only contain 4 profiles: BASS/DISS/SPOTA/PROXR.
or if i have to spare 4KB space for other code, can we use the SDK5.0 to finish our OTA project ?
==================================================================================
Keil5.0 compile info:
linking...
项目规模:代码= 22708 RO-data = 3140 RW-data=128 ZI-data=8008
FromELF: creating hex file...
".\out_580\prox_reporter_580.axf" - 0 Error(s), 1 Warning(s).
Hi zuma,
1. The indication in the SUOTA documentation is not valid anymore, the SUOTA application should be stable in most android versions.
2. I dont quite get the question, the total size of any application is indicated by keil, at the end of the building process keil will report the program size in Code, RO, RW and ZI data. the total size of your binary doesn't include the ZI data.
Thanks MT_dialog
Hi,
To the same question above, the OTA addition to any project uses significant space. Is there a way to limit this. As a matter of fact I can not have OTA now in my application for the sheer size of it.
Hi,
I need to implement OTA to an application. Was able to include the SPOTAR.h without any error. But i am not able to detect it with either your android or IOS app. The Advertising data has to be custom (like the beacon data) and would not be as according to what is in (see below) user_config.h @ proximity_reporter example (Proximity_reporter sample works fine)
#define USER_ADVERTISE_DATA "\x09"\ADV_TYPE_COMPLETE_LIST_16BIT_SERVICE_IDS\ADV_UUID_LINK_LOSS_SERVICE\ADV_UUID_IMMEDIATE_ALERT_SERVICE\ADV_UUID_TX_POWER_SERVICE\ADV_UUID_SPOTAR_SERVICE/*
What is expected as ad data for the suota apps?. We only advertise connectable & undirected packets after pressing a button in the circuit and the Suota app has to detect the stream then.
What is the specification? (I followed Training 06 tutorial and is only helpful for the sample proximity_reporter)
Regards,
Gayan
Hi gayan_gamage,
There is no standard way to minimize the size of the SUOTA profile, in general we optimise our projects in order not to include unnecessary code since there is a limitation from the OTP and keil. An alternative on this, would be to optimize your application code or (in case you dont use OTP and you use an SPI flash in order to boot which i suppose that you do since you want to use SUOTA) you can have an empty project in your device which will implement only SUOTA additionally to your main project. By modifying the secondary bootloader and read a reserved space in the SPI, which will indicate from which image you want to boot, you can switch between a SUOTA mode and your project.
In order for the SUOTA application to see your device you will have to place in the advertising string the ADV_UUID_SPOTAR_SERVICE (0xF5, 0xFE). If your device is succesfully advertising and has those two bytes in the advertising string, then you should be able to see the device on your phone. Check with a generic application that you can track your advertising string (like Blue Loupe) and that your advertising string has those bytes i ve mentioned.
Thanks MT_dialog
Hi,
Thanks for the help. This information should be part of the application notes... I got the advertising string to contain the above string and now the service is detected. But when I select the firmware and try to upload (initialization seems ok: have a look at the attached images) the app gets disconnected. Did a debug and was not able to really understand what causes that.
Having thought there might be some other issues with my application code, I just used the ble_app_barebone and created another project that advertise the above service , added spotar.h . Again detectable, SPI pin looks OK, I get the same disconnection (see attached). The disconnect happens after the update procedure started and no data is uploaded
The funny thing is that the prox_reporter works without any issue. What is going on here? (I see that the prox_reporter uses #include "proxr.h" : but I dont need that). Hardware is PAN1740 beacon
Regards,
Gayan
Hi gayan_gamage,
你必须把spotar.c spotar_task.c我n the project. Check the sdk_profiles folder and add the previously mentioned files. Also since you are using the barebone example you also have to check the user_modules_config.h file and check the EXCLUDE_DLG_SPOTAR definition, if its a 1 set it to 0, otherwise the SUOTA application part implemented by dialog will be overridden,
Thanks MT_dialog
Hi,
My program has a custom header that I need to read to fill up the config . I have stored this at 0x1EOOO while the two program images are stored at 0x8000 & 0x13000 (See command below : mkimage multi spi secondary_bootloader.bin fw_1.img 0x8000 fw_2.img 0x13000 0x1F000 cfg 0x1E000 multi_part.bin)
The config is loaded from the SPI through a custom c file ( see attached). I have compared two applications one with config loading through SPI initially and one without that (hard coded in the app code). The former results in the disconnection behavior in OTA, where as the latter works fine.
So it seems the disconnection happens may be due to this additional data about the config header in flash or SPI port opening/init issue the second time. Pls help
regards,
Gayan
Hi, it seems that the disconnect happens when the config is initially read from flash (through SPI) through the above attached file and then trying to do OTA (Verified that the additional header data in flash is not the cause of it, if it is not read at the start to load the config). At the beginning the SPI is enabled, initialized and read. Then goes to power down mode. So I am not sure why the disconnection happens at OTA for a similar call.
The initial memory read seems successful as the config loads properly as well
Hi gayan_gamage,
I suppose that the problem lies when shutting down the flash after reading the data from the configuration file. Since your use the spi_flash_power_down(), the suota application doesn't powers up the flash, you will have to explictly set your flash to exit sleep by using the spi_flash_release_from_power_down() in the on_spotar_status_change. In case that this doesn't help, i would recommend checking the app_read_image_headers() function in order to check if somehow the product header is corrupted when the spi data read occurs or if anything of the custom header that you use doesn't comply with the custom header.
Thanks MT_dialog