我添加了outlin SPOTAR服务我的项目ed in the app docs and I have verified that my device indeed advertises that service and all its characteristics, however neither of the SUOTA mobile apps nor SmartSnippets detect that it is SUOTA capable. I ran the example using Proximity Reporter and it works fine. I am hoping to get the mobile app code for the two platforms to see how it detects whether the device is SUOTA capable, and how it writes the new firmware. Thanks,
Device:
Hi JBackuk,
Mail sent.
Thanks MT_dialog
I found that I had to change to the following in my app header file:
#define APP_ADV_DATA "\x09\x03\x03\x18\x02\x18\x04\x18\xF5\xFE"
#define APP_ADV_DATA_LEN (8+2)
Turns out the APP_ADV_DATA is a way to advertise your services before you attempt to connect. Still trying to figure out how the APP_ADV_DATA value is determined.
Check out Bluetooth Core 4.0 specification Vol 3 Part C - Generic Access Profile chapter 8 Extended Inquiry Response Data Format.
Basically, it is a length-type-value format containing a list of different kinds of data.
That advertisement data you have can be parsed as follows:
\ x09——长度
\x03 - Type tag for "Complete List of 16-bit Service Class UUIDs"
\x03\x18 - Link Loss Service UUID
\x02\x18 - Immediate Alert Service UUID
\x04\x18 - TX Power Service UUID
以\ xF5 \ xFE -对话框SUOTA服务UUID
Hi JBaczuk,
What do you mean how the APP_ADV_DATA is detrmined ? The APP_ADV_DATA value is set by the user according to the services he is implementing in his device.
Thanks MT_dialog
@MT_DIALOG-- I think what JBaczuk was trying to say, is that he was not certain what the various values in APP_ADV_DATA represented, and was therefore not clear on how he might modify APP_ADV_DATA to include the SUOTA service. Joacimwe did a nice job of laying out what the values represent, and told him where the information might be found.
Here is my take on all this: The BLE 4.0 Spec is fairly complex and, without devoting a HUGE amount of time to reading all the various API docs and such, it is simply NOT POSSIBLE for us budding BLE Developers to somehow "know" where to look, much less "know" what we are looking for. Perhaps there is no way around the steep learning curve, however, Dialog has been very helpful in providing sample source code that allows a user to get up and running fairly quickly. The reference apps are well thought out, they capture very well the general type of application that people might want to use BLE for, in this case, DSPS, which is perfect for converting an old 'wired' application to BLE. Even better, Dialog will provide, upon request, access to the source code for both the iOS and the Android Apps. So now a new BLE developer can potentially expand their legacy 'wired' device into the emerging Internet Of Things. Great stuff. Dialog is not doing this for entirely selfless reasons-- nor should they-- they hope to sell a LOT of BLE chips.
So here's the thing: When enough people have tried to merge a valuable and widely applicable utility like the DSPS, with another equally as valuable utility, like the SUOTA and they have failed. There is clearly a need for more information. The motivation on the part of Dialog should be the same as before-- sell more BLE chips!
So here is some more motivation: I am currently working on this same issue, integrating the DSPS and SUOTA utilities. I have designed a completely functional Android app and a completely wfunctional iOS app, both performing as expected with my device, both ready to go up on the Play Store/App Store. My device is now in the final stage of design (after 4 hardware revisions) and I am ready to go to market with this, my initial order is for 5000 devices. I expect to sell tens of thousands more, based upon the success of the original 'wired' version of my device. As soon as I am able to confidently update the DSPS app using SUOTA, I am then 'future-proofed' and I will begin shipping my device, and buying more BLE chips.
Here is my suggestion: Put together a simple App Note that describes EXACTLY how to integrate the DSPS utility with the SUOTA utility. The amount of time spend doing so, by a knowledgeable person (MT_Dialog) will likely be far LESS than the time spent repeatedly responding to questions in these forums. This App Note should be the basically same as AN-B-029 which idescribes how to modify the template project with sample128. If you can do that, you will sell many, many, MANY more BLE chips that just those that I will be buying, this would allow other people to quickly and easily get their product to market without fear that they will find themselves 'locked into a firmware limitation'.
Best- klim
Hi Klim9513,
Thank you for your comments, and the provided feedback, perhaps this kind of tutorial is quite small for an application note but we are planning to update our FAQ section in the near future in a more wiki kind of structure in order to upload small articles and tutorials for the users. I agree that this should be one of the first articles to be added.
BR MT_dialog