
-
-
Redpine Signals, Inc. Proprietary and Confidential
Page 28
R
R
S
S
9
9
1
1
1
1
3
3
-
-
n
n
-
-
L
L
i
i
n
n
k
k
-
-
M
M
o
o
d
d
u
u
l
l
e
e
-
-
D
D
r
r
i
i
v
v
e
e
r
r
-
-
I
I
n
n
s
s
t
t
a
a
l
l
l
l
a
a
t
t
i
i
o
o
n
n
-
-
G
G
u
u
i
i
d
d
e
e
V
V
e
e
r
r
s
s
i
i
o
o
n
n
3
3
.
.
0
0
RX bytes:478 acl:0 sco:0 events:20 errors:0
TX bytes:331 acl:0 sco:0 commands:19 errors:0
After the device is up, we can Advertise, Scan, Connect with other BLE
devices. The device can be configured using
hcitool
or
hciconfig.
9.3
Advertise Mode:
•
hciconfig -a <hciX> leadv
It will initiate advertising state. Our device will act as a peripheral.
Ex:
hciconfig -a hci0 leadv
•
hciconfig -a <hciX> noleadv
It disables the advertising state.
9.4
Scanning Mode:
•
hcitool -i <hciX> lescan
It will initiate scanning mode. It displays Scan responses and Advertising
information.
Ex:
hcitool -i hci0 lescan
Press Ctrl-C to disable scanning.
9.5
Master Mode Connected State:
To connect with other device .
1. 3
rd
party device should be in advertising mode.
2. Then initiate connection to 3
rd
party.
hcitool -i <hciX>
lecc <3rdparty BD address>
ex:
hcitool -i hci0 lecc C0:FF:EE:C0:FF:EE
9.6
Slave Mode Connected State:
1. Our device should be in advertising state
hciconfig -a <hciX> leadv
Ex: hciconfig -a hci0 leadv
2. Then initiate connection from 3
rd
party