custom GATT services/characteristics with CodeLess

⚠️
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 https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
9 posts / 0 new
Last post
veranith
Offline
Last seen: 1 year 3 months ago
Joined: 2017-01-10 10:43
custom GATT services/characteristics with CodeLess

Hello

looking at current (beta) status if the CodeLessAT Command Solution, there doesn't seem to be a possibility to either :
- as a CENTRAL / GATT client, to discover GATT serv/chars and then query the PERIPHERAL / GATT server to READ, WRITE, subscribe to NOTIFYs, etc.
- as a PERIPHERAL / GATT server, to define a set of services and characteristics.

Is there something planned in this direction ?

Many thanks

Veranith

Device: 
MT_dialog
Offline
Last seen: 1 year 2 months ago
Staff
Joined: 2015-06-08 11:34
Hi veranith,

Hi veranith,

The codeless project operates over a custom profile (client / peripheral), in order to send data on the other side of the link, there is no functionallity to set your own custom database via AT commands and then have a complementary configuration on a client side for discovering the custom profile. I am not sure i fully get your requirements, if i got this wrong please let me know. 

Thanks MT_dialog

veranith
Offline
Last seen: 1 year 3 months ago
Joined: 2017-01-10 10:43
Hi,

Hi,

Thanks for the reply. I get that the codeless project comes with a predefined profile.
The question is : Can I define another one of my own ?
Say, I have a current version of my product having a certain custom profile implemented, that works with my mobile apps. I want to upgrade my product with a DA14580 without having to build a program with the SDK because I have another MCU in my board to do some other tasks. I don't want to deal with multiple firmwares on my product so using codeless seems to be what I want, except that I need to be able to implement, on the DA14580 with codeless, configured from my main MCU from the UART, my own GATT profile. (e.g. with commands like AT+ADDSERV, AT+ADDCHAR, etc.)

Is this kind of possibility expected to exist in the future ?

Thanks

Veranith

MT_dialog
Offline
Last seen: 1 year 2 months ago
Staff
Joined: 2015-06-08 11:34
Hi veranith,

Hi veranith,

As mentioned above, no you cannot define a custom profile via AT commands, in order to add custom profiles you will have to add the profile via the SDK and build it. For now there are no plans or discussions for implementing what you are mentioning.

Thanks MT_dialog 

krishnanag
Offline
Last seen: 3 years 3 months ago
Joined: 2018-05-27 21:33
Hi,

Hi,
So If I want to build a custom profile using the SDK, then how should I integrate that with this codeless project? And how would I control the data in the characteristics using custom self defined AT commands?

MT_dialog
Offline
Last seen: 1 year 2 months ago
Staff
Joined: 2015-06-08 11:34
Hi krishnanag,
Hi krishnanag,
 
The Codeless project is based on the Custom 1 service of the SDK, you should be able to use the Custom 2 service infastructure in order to house your own custom profile along with the codeless, although the Codeless is quite enough for the 580, and i am not sure if a second service will fit along with the codelss application. Regarding the 2nd question, this is quite generic but if you would like to add extra commands supported on the Codeless then you dont need an extra characteristic, but you will just have to expand the allready existing ones. 
 
Thanks MT_dialog
krishnanag
Offline
Last seen: 3 years 3 months ago
Joined: 2018-05-27 21:33
Thanks a lot.

Thanks a lot.
If I want to write custom AT commands, which can write data to a characteristic, then what should I do.
For example ATrl+hello will write this data ("ATrl+hello") on to a characteristic. If you could tell me which part of the code is achieving this functionality, that would be great.
I looked at the command interpreter.c where I could see different functions being called on receiving different AT commands, but there was nothing for the ATrl command is being processed.
So, if you could point me to the part of code where it is recognised that ATrl is received from UART and then a function is called where the data is written to a characteristic, that would be great.

MT_dialog
Offline
Last seen: 1 year 2 months ago
Staff
Joined: 2015-06-08 11:34
Hi krishnanag,

Hi krishnanag,

The ATr command stands for a remote command, its the "r" on the end is what makes the command to print on the other side of the link, the function that gets the data and examines if the command is to be executed on the local or on the remote peer is the user_uart_cmd_received_callback() function which checks if the received string has an "r" or a "|" which will redirect the command to the peer device.

Thanks MT_Dialog

krishnanag
Offline
Last seen: 3 years 3 months ago
Joined: 2018-05-27 21:33
Yes, got it. Thanks a lot.

Yes, got it. Thanks a lot.