client to sensor example

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

I've looked at the hello_client example and used it to communicate with the hello_sensor. It works great.

However the communication goes one way:

/*

* 7. Push a button on the hello_sensor to deliver notification through

*    hello_client device up to the client.

*/

I would like to send a notification from the hello_client to hello_sensor. I tried modifying the sample code provided, but did not succeed yet. If you could provide an example on how to do this it would be very helpful. Thanks.

0 Likes
1 Solution
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

Clients don't send notifications to a server. Clients only send read/write requests and commands. The hello_client sample already does this using bleprofile_sendWriteReq(). See bleprofile_sendWriteReq, bleprofile_sendWriteCmd and other bleprofile_sendRead* functions in bleprofile.h

View solution in original post

2 Replies
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

Clients don't send notifications to a server. Clients only send read/write requests and commands. The hello_client sample already does this using bleprofile_sendWriteReq(). See bleprofile_sendWriteReq, bleprofile_sendWriteCmd and other bleprofile_sendRead* functions in bleprofile.h

Anonymous
Not applicable

great this helps. Thanks!

uncommenting:

bleprofile_sendWriteReq(HANDLE_HELLO_SENSOR_CONFIGURATION, (UINT8 *)&u8, 1);

got me started

0 Likes