Running BLE GATT using btstack on PAN1326B(CC2564B)

146 views
Skip to first unread message

Ismail H. KOSE

unread,
Feb 4, 2017, 4:01:14 AM2/4/17
to btstack-dev
I have a trouble with Bluetooth Stack that i ported to an ARM Cortex M4F micro controller. 

I generated init script using initscripts-TIInit_6.7.16_bt_spec_4.1.bts initscripts-TIInit_6.7.16_ble_add-on.bts files and added to btstack. All initialization looks good. The device is discoverable and i can connect using an Android App.

The problem is that connecting to device doesnt trigger any event and i dont see any HCI packet transmission. But, it connect to device.

I also tried ancs_client_demo.c example, it also connects but i dont see any hci event while connecting. It's same.

Please see the attached terminal output files for ancs_client_demo_terminal example and also my applications log file. I enabled all logs and HCI packet dump as well.


Any useful comment is appreciated.

This is my settings in btstack_config.h.

// Port related features
#define HAVE_EMBEDDED_TIME_MS
#define HAVE_INIT_SCRIPT
#define HAVE_MALLOC

// BTstack features that can be enabled
#define ENABLE_BLE
#define ENABLE_LE_PERIPHERAL
#define ENABLE_LE_CENTRAL
#define ENABLE_CLASSIC

#define ENABLE_LOG_INFO
#define ENABLE_LOG_ERROR
#define ENABLE_LOG_DEBUG
#define ENABLE_LOG_INTO_HCI_DUMP
//#define ENABLE_EHCILL

// BTstack configuration. buffers, sizes, ...
#define HCI_ACL_PAYLOAD_SIZE 52
//#define HCI_ACL_PAYLOAD_SIZE 1021
#define MAX_SPP_CONNECTIONS 1
#define MAX_NR_GATT_CLIENTS 0
#define MAX_NR_GATT_SUBCLIENTS 0
#define MAX_NR_HCI_CONNECTIONS MAX_SPP_CONNECTIONS
#define MAX_NR_L2CAP_SERVICES  2
#define MAX_NR_L2CAP_CHANNELS  (1+MAX_SPP_CONNECTIONS)
#define MAX_NR_RFCOMM_MULTIPLEXERS MAX_SPP_CONNECTIONS
#define MAX_NR_RFCOMM_SERVICES 1
#define MAX_NR_RFCOMM_CHANNELS MAX_SPP_CONNECTIONS
#define MAX_NR_BTSTACK_LINK_KEY_DB_MEMORY_ENTRIES  2
#define MAX_NR_BNEP_SERVICES 0
#define MAX_NR_BNEP_CHANNELS 0
#define MAX_NR_HFP_CONNECTIONS 0
#define MAX_NR_WHITELIST_ENTRIES 1
#define MAX_NR_SM_LOOKUP_ENTRIES 3
#define MAX_NR_SERVICE_RECORD_ITEMS 1

Thanks
Ismail


ancs_client_demo_terminal_log.txt
init_log.txt

Matthias Ringwald

unread,
Feb 6, 2017, 5:33:36 PM2/6/17
to btsta...@googlegroups.com
Hi Ismail

I've looked at the log files and the common pattern is that they "just stop" after the stack has bootet up.
My first guess would be that eHCILL is enabled and the Bluetooth chip just got into sleep mode.
However, you've disabled EHCILL in the btstack_config and the command in the log seems to disable it as well.
Could you manually remove this from the init script manually for a quick try?

0x01, 0x0c, 0xfd, 0x09, 0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x64, 0x00, 

If that doesn't help, please check the UART manually (e.g. with a logic analyzer) to see if there is data that doesn't show up in the log - and never reaches the stack.

In the ANCS Connection example (with name init_log.tx) , you get an error from the Bluetooth chipset: Command Disallowed. This usually comes if you ask it to do something, but it's busy with something else.
However, the create connection is sent after the scanning was disabled, so there's no reason to not create a connection.

Best
 Matthias

--
You received this message because you are subscribed to the Google Groups "btstack-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to btstack-dev...@googlegroups.com.
To post to this group, send email to btsta...@googlegroups.com.
Visit this group at https://groups.google.com/group/btstack-dev.
For more options, visit https://groups.google.com/d/optout.
<ancs_client_demo_terminal_log.txt><init_log.txt>

Reply all
Reply to author
Forward
0 new messages