17 posts / 0 new
Last post
Rony
Offline
Last seen:5 years 10 months ago
Master
Joined:2014-05-15 15:02
Sample128

After a lot of struggle with the sources and the documentation we were able to run the sample128 example.
Our android application is able to discover the board but we don't know how to populate app_sample128.c and app_sample128_task.c
to start using the notification of the characteristic.
Can anyone help us on the matter?
Thanks

TR_Dialog
Offline
Last seen:5 months 3 weeks ago
Staff
Joined:2014-06-30 23:52
Hi Rony:

Hi Rony:

Please refer to the following document available under Software tab: UM-B-003: User Manual - Software Development Guide 1.4.pdf

Thanks,

TR_Dialog

Rony
Offline
Last seen:5 years 10 months ago
Master
Joined:2014-05-15 15:02
This is the one we are using.

This is the one we are using.
In chapter 11 we got stuck without understanding how to deal with the notifications of characteristic 2.
What do we have to do in app_sample128.c and app_sample128_task.c to implement it?
The profile of sample128 was provided with the sdk. It is a great tool to start understanding the profile.
为什么应用程序不提供源头e?
Thanks

avlasov1
Offline
Last seen:7 years 8 months ago
Joined:2014-05-15 16:58
Take a look at app_proxr.c

Take a look at app_proxr.c and app_proxr_task.c. Use those to model your application code-you will only need to use certain functions, not all. If you are dealing with timed notifications, it would also help to look at the timer implementation in app_batt.c. If you are using the proximity reporter project, you will need to enable sample128 in app_proxr_proj.c, this is also where you enable the timer.

Rony
Offline
Last seen:5 years 10 months ago
Master
Joined:2014-05-15 15:02
Looked at the prox and

Looked at the prox and battery examples.
1. In the function that sends SAMPLE128_CREATE_DB_REQ I don't understand what I have to do with the data base.
Both the prox and the battery are populating the db but I don't understand what they are doing.
2. Same question for the function that sends the SAMPLE128_ENABLE_REQ. I saw that the battery and the prox are preparing things which I don't understand.
我认为文档丢失了一个链接nd doesn't explain the connection between the application part and the profile.

I am sure someone solved the sampleq129 example. Is it possible to get the sources of app_sample128.c and app_sample128_task.c?
Thanks for the effort

WT_Dialog (not verified)
Hi Rony,

Hi Rony,

There is an example in proximity reporter application in SDK 3.0.4

Please refer to spotar_status_update_req_handler() function as an example of sending a notification through a 128 bit UUID characteristic.

Actually notification transmission method is the same for 16 bit and 128 bit UUIDs. After database creation for GATT servers or database discovery for GATT clients all the procedures are the same because the handling is done through handles and not through UUIDs.

Rony
Offline
Last seen:5 years 10 months ago
Master
Joined:2014-05-15 15:02
Thanks for the advice.

Thanks for the advice.
The software I am using to connect to the device enables the analysis of the ble interface.
It works OK when running the prox reporter, as I can see the battery notifications.
But my problems are with the sample128 example.
Following your advice I made some progress. The situation is as follows:

I am able to connect to the device.
I see 4 services: Generic Access, Generic Attribute, Device Information and the unrecognized (sample128)
When I select the unrecognized service and display the descriptors I see the 2 characteristics
When I try to enable the notification of characteristic 2 I get an error message:
'The attribute requires authorization before it can be read or written'
Seems that I am not enabling the notification feature of characteristic 2.
What am I doing wrong?

MHv_Dialog
Offline
Last seen:8 months 1 week ago
Staff
Joined:2013-12-06 15:10
Hi Rony,

Hi Rony,

A couple of things...

First off, you may have noticed this already, both Android and iOS are lazy as far as making service discoveries. What I mean by that is that they both store the gatt database of a peripheral the first time they connect. But after that first time, you will not see new services etc. show up. The easy way to force a new discovery is to turn Bluetooth off and then back on. This will wipe out the local gatt database for your peripheral device.

Another issue (and this is probably only related to Android, is that Android has a couple of errors in the android Developer BT Smart reference application, causing all sorts of applications to suffer from the same issue.

I will send you an email with a link to the following:

a) An Android app, that does not suffer from the issue mentioned above

b) A sample128 complete project. It adds a third characteristic, but everything else is identical

I hope this will help you out.

Rony
Offline
Last seen:5 years 10 months ago
Master
Joined:2014-05-15 15:02
Great. this is exactly what I

Great. this is exactly what I was looking for.
If possible can you make the 3rd characteristic more than one byte long so I see how it is done?
Thanks
Rony

MHv_Dialog
Offline
Last seen:8 months 1 week ago
Staff
Joined:2013-12-06 15:10
Hi Rony,

Hi Rony,

The third characteristic is 8 bytes long. It was implemented to demonstrate just that ;o)

Rony
Offline
Last seen:5 years 10 months ago
Master
Joined:2014-05-15 15:02
Great.

Great.
Do you need my e-mail address?
Thanks

MHv_Dialog
Offline
Last seen:8 months 1 week ago
Staff
Joined:2013-12-06 15:10
Hi Rony,

Hi Rony,

You should have received my email already. I sent it out on Thursday night PDT to your email address ".net.il". It contains links, so please check your spam folder.

Rony
Offline
Last seen:5 years 10 months ago
Master
Joined:2014-05-15 15:02
I did get on Thursday an

I did get on Thursday an email that included your response and a link back to this forum.
I have experienced some problems lately with my regular e-mail so could you please be so kind and send to my gmail link

Thanks

MHv_Dialog
Offline
Last seen:8 months 1 week ago
Staff
Joined:2013-12-06 15:10
I just sent it the link agin

I just sent it the link agin using you gmail account. I hope you get it this time. After you receive it I recommend that you edit your post to remove your email. You never kbow...

Rony
Offline
Last seen:5 years 10 months ago
Master
Joined:2014-05-15 15:02
I don't understand it.

I don't understand it.
Somehow it is not arriving and I don't even get a notification it has been received.

MHv_Dialog
Offline
Last seen:8 months 1 week ago
Staff
Joined:2013-12-06 15:10
Strange. I resent it once

Strange. I resent it once more. let me know if you get it or i will try to find a different way to get it to you.

Rony
Offline
Last seen:5 years 10 months ago
Master
Joined:2014-05-15 15:02
Just got it. Thanks

Just got it.
Thanks

Topic locked