- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
Please see the follow code that creating 2 services with 128-bit UUID, the iPhone side can only see nothing.
If putting a zero byte between two 128-bit service, it will work better but iPhone can only see the first service.
Please help.
--Cheong
/* GATT database */
const uint8_t gatt_db[] =
{
// Generic Attribute service
PRIMARY_SERVICE_UUID16 (HDLS_GENERIC_ATTRIBUTE, UUID_SERVCLASS_GATT_SERVER),
CHARACTERISTIC_UUID16 (HDLC_GENERIC_ATTRIBUTE_SERVICE_CHANGED,
HDLC_GENERIC_ATTRIBUTE_SERVICE_CHANGED_VALUE,
GATT_UUID_GATT_SRV_CHGD,
LEGATTDB_CHAR_PROP_NOTIFY,
LEGATTDB_PERM_NONE),
// Generic Access service
PRIMARY_SERVICE_UUID16 (HDLS_GENERIC_ACCESS, UUID_SERVCLASS_GAP_SERVER),
CHARACTERISTIC_UUID16 (HDLC_GENERIC_ACCESS_DEVICE_NAME,
HDLC_GENERIC_ACCESS_DEVICE_NAME_VALUE,
GATT_UUID_GAP_DEVICE_NAME,
LEGATTDB_CHAR_PROP_READ,
LEGATTDB_PERM_READABLE),
CHARACTERISTIC_UUID16 (HDLC_GENERIC_ACCESS_APPEARANCE,
HDLC_GENERIC_ACCESS_APPEARANCE_VALUE,
GATT_UUID_GAP_ICON,
LEGATTDB_CHAR_PROP_READ,
LEGATTDB_PERM_READABLE),
// TX Power service
PRIMARY_SERVICE_UUID16 (HDLS_TX_POWER, UUID_SERVCLASS_TX_POWER),
CHARACTERISTIC_UUID16 (HDLC_TX_POWER_LEVEL,
HDLC_TX_POWER_LEVEL_VALUE,
GATT_UUID_TX_POWER_LEVEL,
LEGATTDB_CHAR_PROP_READ,
LEGATTDB_PERM_READABLE),
//service1
PRIMARY_SERVICE_UUID128 (HDLS_SERVICE1, PERIPHERAL_SERVICE1_UUID),
CHARACTERISTIC_UUID128(HDLC_SERVICE1_CHARS1,
HDLC_SERVICE1_CHARS1_VALUE,
PERIPHERAL_SERVICE1_CHARS1_UUID,
LEGATTDB_CHAR_PROP_READ,
LEGATTDB_PERM_READABLE),
0x00 // putting a zero here will work better, but still no service 2, otherwise, both services will not work
//service2
PRIMARY_SERVICE_UUID128 (HDLS_SERVICE2, PERIPHERAL_SERVICE2_UUID),
CHARACTERISTIC_UUID128(HDLC_SERVICE2_CHARS1,
HDLC_SERVICE2_CHARS1_VALUE,
PERIPHERAL_SERVICE2_CHARS1_UUID,
LEGATTDB_CHAR_PROP_READ,
LEGATTDB_PERM_READABLE),
};
- Labels:
-
SDK 3.x
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cheong,
Hi.
There is no zero byte ... I used to have problems with that ...
Please include your gatt_db header file as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Manish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @mkochhal,
Thanks for your response.
#include "wiced.h"
#ifdef __cplusplus
extern "C" {
#endif
#define PERIPHERAL_SERVICE1_UUID 0xAA,0xBB,0x00,0x00,0xDF,0xFB,0x48,0xD2,0xB0,0x60,0xD0,0xF5,0xA7,0x10,0x96,0xE0
#define PERIPHERAL_SERVICE1_CHARS1_UUID 0xAA,0xBB,0x01,0x00,0xDF,0xFB,0x48,0xD2,0xB0,0x60,0xD0,0xF5,0xA7,0x10,0x96,0xE0
#define PERIPHERAL_SERVICE1_CHARS2_UUID 0xAA,0xBB,0x02,0x00,0xDF,0xFB,0x48,0xD2,0xB0,0x60,0xD0,0xF5,0xA7,0x10,0x96,0xE0
#define PERIPHERAL_SERVICE2_UUID 0xAA,0xB1,0x00,0x00,0xDF,0xFB,0x48,0xD2,0xB0,0x60,0xD0,0xF5,0xA7,0x10,0x96,0xE0
#define PERIPHERAL_SERVICE2_CHARS1_UUID 0xAA,0xB1,0x01,0x00,0xDF,0xFB,0x48,0xD2,0xB0,0x60,0xD0,0xF5,0xA7,0x10,0x96,0xE0
enum {
// ***** Primary service 'Generic Attribute'
HDLS_GENERIC_ATTRIBUTE = 0x0100,
HDLC_GENERIC_ATTRIBUTE_SERVICE_CHANGED,
HDLC_GENERIC_ATTRIBUTE_SERVICE_CHANGED_VALUE,
// ***** Primary service 'Generic Access'
HDLS_GENERIC_ACCESS,
HDLC_GENERIC_ACCESS_DEVICE_NAME,
HDLC_GENERIC_ACCESS_DEVICE_NAME_VALUE,
HDLC_GENERIC_ACCESS_APPEARANCE,
HDLC_GENERIC_ACCESS_APPEARANCE_VALUE,
// ***** Primary service 'Link Loss'
HDLS_LINK_LOSS,
HDLC_LINK_LOSS_ALERT_LEVEL,
HDLC_LINK_LOSS_ALERT_LEVEL_VALUE,
// ***** Primary service 'Immediate Alert'
HDLS_IMMEDIATE_ALERT,
HDLC_IMMEDIATE_ALERT_LEVEL,
HDLC_IMMEDIATE_ALERT_LEVEL_VALUE,
// ***** Primary service 'TX Power'
HDLS_TX_POWER,
HDLC_TX_POWER_LEVEL,
HDLC_TX_POWER_LEVEL_VALUE,
// ***** Primary service 'peripheral'Properties
HDLS_SERVICE1,
HDLC_SERVICE1_CHARS1,
HDLC_SERVICE1_CHARS1_VALUE,
HDLC_SERVICE1_CHARS1_CCCD,
HDLC_SERVICE1_CHARS2,
HDLC_SERVICE1_CHARS2_VALUE,
// ***** Primary service 'peripheral'Properties
HDLS_SERVICE2,
HDLC_SERVICE2_CHARS1,
HDLC_SERVICE2_CHARS1_VALUE,
};
extern const uint8_t gatt_db[];
extern const uint16_t gatt_db_size;
#ifdef __cplusplus
}
#endif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cheong, you have a problem because of HDLC_SERVICE1_CHARS1_CCCD ... where is this defined?
Please remove that. Unless you have a characteristic that needs a notification, then only you can try this:
#define __UUID_HIFITABLET_STATUS 0xde, 0xc9, 0xc1, 0x95, 0xb2, 0x3b, 0x75, 0x10, 0x82, 0x73, 0xd2, 0x49, 0x28, 0x3a, 0x97, 0x7e
// ----- Characteristic 'status'
HDLC_HIFITABLET_STATUS, // Characteristic Declaration handle
HDLC_HIFITABLET_STATUS_VALUE, // Characteristic Value handle
HDLD_HIFITABLET_STATUS_CLIENT_CONFIGURATION, // Client Configuration
and you complete this declaration with a definition in the C file:
/* Characteristic 'status' */
//<Name>status</Name>
//<Uuid>xxx </Uuid>
CHARACTERISTIC_UUID128 (HDLC_HIFITABLET_STATUS,
HDLC_HIFITABLET_STATUS_VALUE,
__UUID_HIFITABLET_STATUS,
LEGATTDB_CHAR_PROP_READ | LEGATTDB_CHAR_PROP_NOTIFY,
LEGATTDB_PERM_READABLE),
/* Client Characteristic Configuration Descriptor */
//<Notification>true</Notification>
//<Indication>true</Indication>
CHAR_DESCRIPTOR_UUID16_WRITABLE (HDLD_HIFITABLET_STATUS_CLIENT_CONFIGURATION,
GATT_UUID_CHAR_CLIENT_CONFIG,
LEGATTDB_PERM_READABLE | LEGATTDB_PERM_WRITE_CMD | LEGATTDB_PERM_WRITE_REQ | LEGATTDB_PERM_RELIABLE_WRITE),
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @mkochhal,
I originally designed to have notify property, but just for testing, I removed it as simple as possible to see where is the problem.
Actually, if you just create two services without characteristics, it will not work correctly, only the first service is shown on iPhone.
//service1
PRIMARY_SERVICE_UUID128 (HDLS_SERVICE1, PERIPHERAL_SERVICE1_UUID),
//service2
PRIMARY_SERVICE_UUID128 (HDLS_SERVICE2, PERIPHERAL_SERVICE2_UUID),
--Cheong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have three services ... A peripheral usually has a service for the peripheral and several characteristics (Read/Write/Both or Read/Notify) that the service hosts in its GATT server. I haven't tried multiple services.
In any case, here is my changes to your GATT declarations ... Please take a look and try again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, please make sure you use random UUID generator to uniquely identify services ... there are many online.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, we know that, so we just think it is a bug in their BT stack with multiple 128-bit service. We did use other vendors BLE chips and works just fine with multiple 128-bit service. We are from RedBear and doing BLE for 3 years already.
Hi Broadcom team,
Can anyone take a look at this?
--Cheong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can try tomorrow to add two more services and see if I can see them on Light Blue. I dont think advertising multiple services is a big deal, because in essence we do advertise GATT and GAP and then we add our own for the peripheral (i.e. 128 bit though).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I also have similar issue. I tried this but no help.. Is there any other modifications also required?
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
Now I understand that if you have one adopted serviced(16 bit UUID) between two custom services(128 bit UUID), then we will be able to discover the custom and adopted services in IOS application.
Is there any other standard method?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
I just wanted to give you an update, we are aware about this issue and have escalated this to the core developers so we should be getting an answer shortly. Thank you for your patience!
Also, if you are experiencing any connection issues from iOS/Android with the 3.7.0 SDK you should change the settings to the following. You will see that our default ble_hello_sensor app and ble_proximity_reporter has these modifications and it should solve connection problems.
- The Bluetooth component loaded has been changed to: libraries/drivers/bluetooth/low_energy
Previously it was loaded from libraries/drivers/bluetooth_le
- wiced_bt_cfg.c has been changed (See ble_proximity_reporter and ble_hello_sensor example).
You should add 2 parameters to wiced_bt_cfg_settings
.max_number_of_buffer_pools = WICED_BT_CFG_NUM_BUF_POOLS,
.addr_resolution_db_size = 3,
This should solve the error
00:00:01.028392 GKI_exception(): Task State Table
00:00:01.032392 GKI_exception 65527 getbuf: Size is too big
Thanks,
Jaeyoung
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
We have found a fix for this issue where defining consecutive 128bit uuid services will result in an error. The solution will be included in our next release which is scheduled for the end of September. Thank you for your patience.
Thanks,
Jaeyoung
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may download the new SDK, WICED Studio 4.0, which includes this fix from the following link.
WICED Studio 4.0 has been released....
Thanks,
Jaeyoung