Beacon question at KW40

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Beacon question at KW40

1,884 Views
jasonchiang
NXP Employee
NXP Employee

Hello,

I have one question when running kw40 beacon application. The  details as below.

1. download beacon application to kw40 FRDM board from

C:\Freescale\KW40Z_Connectivity_Software_1.0.1\ConnSw\examples\bluetooth\beacon\frdmkw40z\bare_metal\build\iar

2. kw40 beacon can connect to Kinetis BLE
Toolbox on smart phone without any problem

3. However kw40 beacon can NOT connect to
CSR 4.0 dongle, why ?????

4. the other beacon can connect to CSR 4.0
dongle without any problem

Please see the logs captured from linux side

the example shows CSR 4.0 dongle connect to the other beacon device but cannot connect to kw40 EVB

[CSR 4.0 dongle is connected to linux]

root@OpenWrt:/# hcitool lescan [at this moment, both kw40 and the other beacon device are power on]

LE Scan ...

00:04:9F:00:00:0E (unknown) [found kw40]

00:04:9F:00:00:0E (unknown)

8D:CD:C3:AC:22:D3 (unknown)

8D:CD:C3:AC:22:D3 ByterealDA [found the other beacon device which is name ByterealDA]

8D:CD:C3:AC:22:D3 (unknown)

8D:CD:C3:AC:22:D3 ByterealDA

00:04:9F:00:00:0E (unknown)

00:04:9F:00:00:0E (unknown)

8D:CD:C3:AC:22:D3 (unknown)

8D:CD:C3:AC:22:D3 ByterealDA

00:04:9F:00:00:0E (unknown)

8D:CD:C3:AC:22:D3 (unknown)

8D:CD:C3:AC:22:D3 ByterealDA

^Croot@OpenWrt:/#

root@OpenWrt:/# hcitool lescan [power off kw40, so only found ByterealDA]

LE Scan ...

8D:CD:C3:AC:22:D3 (unknown)

8D:CD:C3:AC:22:D3 ByterealDA

8D:CD:C3:AC:22:D3 (unknown)

8D:CD:C3:AC:22:D3 (unknown)

8D:CD:C3:AC:22:D3 ByterealDA

^Croot@OpenWrt:/#

root@OpenWrt:/# gatttool -b
8D:CD:C3:AC:22:D3 --interactive

[8D:CD:C3:AC:22:D3][LE]> connect

Attempting to connect to 8D:CD:C3:AC:22:D3 [connect to ByterealDA successfully]

Connection successful

[8D:CD:C3:AC:22:D3][LE]> char-desc
0x0028 0x0028

handle: 0x0028, uuid:
00002901-0000-1000-8000-00805f9b34fb [got ByterealDA uuid]

[8D:CD:C3:AC:22:D3][LE]>

(gatttool:3290): GLib-WARNING **: Invalid
file descriptor.

root@OpenWrt:/#

root@OpenWrt:/# hcitool lescan [power off ByterealDA and power on kw40]

LE Scan ...

00:04:9F:00:00:0E (unknown) [found kw40]

00:04:9F:00:00:0E (unknown)

00:04:9F:00:00:0E (unknown)

00:04:9F:00:00:0E (unknown)

^Croot@OpenWrt:/#

root@OpenWrt:/# gatttool -b
00:04:9F:00:00:0E --interactive

[00:04:9F:00:00:0E][LE]> connect

Attempting to connect to 00:04:9F:00:00:0E [tried to connect to kw40 but fails]

Error: connect error:
Transport endpoint is not connected (107)

[00:04:9F:00:00:0E][LE]> [ 538.560571] usb 3-1: USB disconnect, device number 2

Is there anything need to pay attention ?

Attached picture for your reference.

Labels (1)
2 Replies

1,166 Views
alexandruandree
NXP Employee
NXP Employee

Hi,

All beacon applications use a NON-CONNECTABLE advertising. That means they will never accept connections.

The ByteRealDa exposes data by being in a connection through a GATT service. That is not the philosophy of a Bluetooth Low Energy beacon.

What you will need is a package on Linux that decodes advertising data while scanning. hcitool lescan is not powerful enough.

1,166 Views
miguel_reyes
NXP Employee
NXP Employee

Hello jasonchiang​,

There are different beacons in the market. The most popular ones are iBeacon and AltBeacon, however, there are others proprietary beacons. For the NXP Beacon demo, it uses a proprietary NXP Beacon, hence, it will be only discovered using Kinetis BLE Toolbox. Probably, the application you are using to discover beacon only support iBeacon or AltBeacon.

At the end, the main difference is the structure of the ADV packets that will be sent over the air. For more details, I recommend to read the next posts:

What is a BLE Beacon?

Implementing Bluetooth® LE Beacons on the KW40Z Wireless Microcontroller

So, if you want to discover beacons generated from the FRDM-KW40Z, you need to change the format of the ADV packets built in the beacon application. Please, read the above post to see how you can easily implement this using NXP BLE stack.

:smileyhappy: