slight modification to codeless profile

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
krishnanag
Offline
Last seen:2 years 3 months ago
加入:2018-05-27 21:33
slight modification to codeless profile

Hi,
I am using the codeless AT command project to communicate with a smartphone.
So, I notice that there is a custom service that is enabled by codeless, which has 3 characteristics. One of this characteristics stores the data of whatever we send serially with prefix ATrl.
I am using this characteristic in the mobile app, and reading the data stored in this, so this way I am transferring data from able device to mobile. The smartphone here is GATT client.
The problem is that this characteristic does not have a NOTIFY property. So, it will not be possible to notify the smartphone whenever the data in this characteristic is updated. So I wanted to now whether I can make some changes to the codeless project, and add the NOTIFY property to this characteristic.

Also, in the code, I couldn't find the part of the code which writes the data on to characteristic when it receives ATrl through UART.

Thanks

Device:
MT_dialog
Offline
Last seen:2 months 2 weeks ago
工作人员
加入:2015-06-08 11:34
Hi Krishnanag,
Hi Krishnanag,
无代码的项目只有弗洛w control characteristic has a notify property, the other two characteristics have only a read and a write (inbound and outbound data), the use case is that when you send a command from the terminal (the ATr_PRINT or the PIPE command) the device will update the characteristic's value in its database with the data send from the terminal and a notification will be send to the central in order for the central to be aware that data has been updated and execute a read command. So you will have to enable the notifications from the central side and whenever the central receives a notification it should send a read command to the peripheral. If you would like to update the characteristic with the notify property, you are able to do so, by changing the properties of the characteristic from PERM(WR,ENABLE) | PERM(RD,ENABLE), to PERM(WR,ENABLE) | PERM(RD,ENABLE) | PERM(NTF, ENABLE). This will enable the notification on the characteristic, but you will need extra implementation in order to overide the initial functionallity of the Codeless.
Thanks MT_Dialog
krishnanag
Offline
Last seen:2 years 3 months ago
加入:2018-05-27 21:33
Thanks a lot.

Thanks a lot.
So tell me if I have understood this right.
The codeless project has a service, which has three characteristics, 2 with only read and write property and a third with a notify property. So, what I can do is if I enable notification for the third characteristic on the central, whenever I receive a notification, I must read the data from the 2nd characteristic( the one in which new data was written into.).

MT_dialog
Offline
Last seen:2 months 2 weeks ago
工作人员
加入:2015-06-08 11:34
Hi krishnanag,

Hi krishnanag,

Exactly.

Thanks MT_Dialog