Armadillo-Box WS1/BLE Support
[
Front page
] [
New
|
List of pages
|
Search
|
Recent changes
]
Start:
[[Armadillo]]~
[[Armadillo-Box WS1/BLE Gateway]]~
#contents
* BLE Support [#n6410641]
>
Based upon a Japanese blog ?[[Try the newest bluez on Arm...
~
Bluetooth adapter used here is [[Logitec LBT-UAN04C2BK:ht...
** Customizing Kernel [#r7795aa3]
>
Specify ?vender/Product? by make menuconfig~
(AtmarkTechno) Vendor
(Armadillo-Box WS1) AtmarkTechno Products
~
Make Bluetooth effective by putting check marks on the ce...
Linux Kernel Configuration
[*] Networking support --->
--- Bluetooth subsystem support
<*> RFCOMM protocol support  <-- Mark i...
[*] RFCOMM TTY support   <-- Mark i...
<*> BNEP protocol support <-- Mark it for ...
[*] Multicast filter support <-- Mark it for ...
[*] Protocol filter support <-- Mark it for ...
<*> HIDP protocol support <-- Mark it for ...
Bluetooth device drivers --->
<*> HCI USB driver <-- Mark it for ...
** Configuration of UserLand [#pb63f5f6]
>
At this time, Java is not used. Since Java generally occu...
atmark@atde5:~/atmark-dist$ make menuconfig
Userland Configuration
Miscellaneous Applications --->
[ ] java  <-- Remove check mark
** Cross compile for Bluez [#k79519a0]
>
Build Bluez.~
Down load the source code of Bluez and extract it. (As of...
atmark@atde5:~$ wget https://www.kernel.org/pub/linux/bl...
atmark@atde5:~$ tar Jxf bluez-5.36.tar.xz
~
Install the local packages of libical to ATDES.~
atmark@atde5:~$ wget http://ftp.jp.debian.org/debian/poo...
atmark@atde5:~$ dpkg-cross -v --build --arch armel libi...
atmark@atde5:~$ sudo dpkg -i libical0-armel-cross_0.48-2...
atmark@atde5:~$ wget http://ftp.jp.debian.org/debian/poo...
atmark@atde5:~$ dpkg-cross -v --build --arch armel libi...
atmark@atde5:~$ sudo dpkg -i libical-dev-armel-cross_0.4...
~
Execute configure.~
atmark@atde5:~$ cd bluez-5.36/
atmark@atde5:~/bluez-5.36$ ./configure --build=i686 --ho...
--disable-udev --disable-syste...
~
Execute make.~
atmark@atde5:~/bluez-5.36$ make
~
Execute make install, and install it to ROM image directo...
atmark@atde5:~/bluez-5.36$ make install DESTDIR=/home/at...
~
Remove unnecessary files such as documents.~
atmark@atde5:~/bluez-5.36$ rm -rf /home/atmark/atmark-di...
~
Manually install gatttool, which is not installed by make...
atmark@atde5:~/bluez-5.36$ cp attrib/gatttool /home/atma...
**Installing D-bus [#y1557779]
>
Download D-bus deb package.
atmark@atde5:~/bluez-5.36$ cd
atmark@atde5:~$ wget http://ftp.gnome.org/mirror/cdimage...
~
Extract D-bus deb package in ROM image directory of atmar...
atmark@atde5:~$ rm -rf atmark-dist/romfs/usr/share/doc
atmark@atde5:~$ rm -rf atmark-dist/romfs/usr/share/man
~
Including init-funcions, which D-bus package is depending...
atmark@atde5:~$ wget http://ftp.jp.debian.org/debian/poo...
atmark@atde5:~$ dpkg -x lsb-base_4.1+Debian8+deb7u1_all....
atmark@atde5:~$ rm -rf atmark-dist/romfs/usr/share/doc
~
Add user/group, which execute D-sub daemon.~
~
-Adding user~
atmark@atde5:~$ vi atmark-dist-20151026/vendors/AtmarkTe...
At the end of file, please add line listed below
messagebus:x:101:105::/var/run/dbus:/bin/false
~
-Adding group~
atmark@atde5:~$ vi atmark-dist-20151026/vendors/AtmarkTe...
At the end of file, please add line listed below.
messagebus:x:105:
** Recreating image [#yf1b85a5]
>
Complete the process so far, add BLE to Kernel and UserLa...
atmark@atde5:~$ cd atmark-dist
atmark@atde5:~/atmark-dist$ make romfs
atmark@atde5:~/atmark-dist$ make image
Please make sure that the files, which are located at the...
** Checking operation [#mab100ea]
>
Please rewrite Kernel and UserLand to newly created ones....
hermit> tftpdl 192.168.0.90 192.168.0.164 --blksize=1024...
hermit> tftpdl 192.168.0.90 192.168.0.164 --blksize=1024...
~
Booting the new Kernel and UserLand, insert the USB bluet...
Check that the USB Bluetooth adapter is recognized.~
[root@abws1-0 (ttymxc1) ~]# hciconfig -a
hci0: Type: BR/EDR Bus: USB
BD Address: 00:09:DD:40:C8:E6 ACL MTU: 310:10 ...
UP RUNNING
RX bytes:1389 acl:0 sco:0 events:37 errors:0
TX bytes:382 acl:0 sco:0 commands:37 errors:0
Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'CSR8510 A10'
Class: 0x000000
Service Classes: Unspecified
Device Class: Miscellaneous,
HCI Version: 4.0 (0x6) Revision: 0x22bb
LMP Version: 4.0 (0x6) Subversion: 0x22bb
Manufacturer: Cambridge Silicon Radio (10)
The status of hci0 is automatically set to up.~
(Configurations of dbus start and bluetooth start are NOT...
~
Check the current status of BLE support.~
[root@abws1-0 (ttymxc1) ~]# hciconfig hci0 lestates
Supported link layer states:
YES Non-connectable Advertising State
YES Scannable Advertising State
YES Connectable Advertising State
YES Directed Advertising State
YES Passive Scanning State
YES Active Scanning State
YES Initiating State/Connection State in Master ...
YES Connection State in the Slave Role
YES Non-connectable Advertising State and Passiv...
YES Scannable Advertising State and Passive Scan...
YES Connectable Advertising State and Passive Sc...
YES Directed Advertising State and Passive Scann...
YES Non-connectable Advertising State and Active...
YES Scannable Advertising State and Active Scann...
YES Connectable Advertising State and Active Sca...
YES Directed Advertising State and Active Scanni...
YES Non-connectable Advertising State and Initia...
YES Scannable Advertising State and Initiating S...
YES Non-connectable Advertising State and Master...
YES Scannable Advertising State and Master Role ...
YES Non-connectable Advertising State and Slave ...
YES Scannable Advertising State and Slave Role c...
YES Passive Scanning State and Initiating State ...
YES Active Scanning State and Initiating State c...
YES Passive Scanning State and Master Role combi...
YES Active Scanning State and Master Role combin...
YES Passive Scanning State and Slave Role combin...
YES Active Scanning State and Slave Role combina...
YES Initiating State and Master Role combination...
~
Doing scan around the neighborhood, look for BLE devices,...
[root@abws1-0 (ttymxc1) ~]# hcitool lescan
LE Scan ...
59:FF:59:55:45:CC (unknown)
59:FF:59:55:45:CC (unknown)
D9:9E:B9:CE:47:FD FNSensor
D9:9E:B9:CE:47:FD (unknown)
7D:FD:8D:EC:B2:4E (unknown)
7D:FD:8D:EC:B2:4E (unknown)
59:FF:59:55:45:CC (unknown)
59:FF:59:55:45:CC (unknown)
7D:FD:8D:EC:B2:4E (unknown)
7D:FD:8D:EC:B2:4E (unknown)
EB:49:99:58:22:49 (unknown)
EB:49:99:58:22:49 estimote
7D:FD:8D:EC:B2:4E (unknown)
7D:FD:8D:EC:B2:4E (unknown)
59:FF:59:55:45:CC (unknown)
59:FF:59:55:45:CC (unknown)
C2:A4:23:28:B1:6B FNSensor
C2:A4:23:28:B1:6B (unknown)
D9:9E:B9:CE:47:FD FNSensor
D9:9E:B9:CE:47:FD (unknown)
F4:C9:10:75:CB:91 fnColor
F4:C9:10:75:CB:91 (unknown)
~
Doing scan correctly, obtain the list.~
Using gatttool, connect one of the devices in the list by...
[root@abws1-0 (ttymxc1) ~]# gatttool -i hci0 -b D9:9E:B9...
[D9:9E:B9:CE:47:FD][LE]> connect
Attempting to connect to D9:9E:B9:CE:47:FD
Connection successful
[D9:9E:B9:CE:47:FD][LE]> help
help Show this...
exit Exit inte...
quit Exit inte...
connect [address [address type]] Connect t...
disconnect Disconnec...
primary [UUID] Primary S...
included [start hnd [end hnd]] Find Incl...
characteristics [start hnd [end hnd [UUID]]] Character...
char-desc [start hnd] [end hnd] Character...
char-read-hnd <handle> Character...
char-read-uuid <UUID> [start hnd] [end hnd] Character...
char-write-req <handle> <new value> Character...
char-write-cmd <handle> <new value> Character...
sec-level [low | medium | high] Set secur...
mtu <value> Exchange ...
[D9:9E:B9:CE:47:FD][LE]> primary
attr handle: 0x0001, end grp handle: 0x0007 uuid: 000018...
attr handle: 0x0008, end grp handle: 0x0008 uuid: 000018...
attr handle: 0x0009, end grp handle: 0x000b uuid: 0000bc...
attr handle: 0x000c, end grp handle: 0xffff uuid: bc0000...
[D9:9E:B9:CE:47:FD][LE]>quit
[root@abws1-0 (ttymxc1) ~]#
Then, successfully read the primary service information.~
* Revision History [#xf617bcf]
>
-2015-12-8: This article is initially released.
End:
[[Armadillo]]~
[[Armadillo-Box WS1/BLE Gateway]]~
#contents
* BLE Support [#n6410641]
>
Based upon a Japanese blog ?[[Try the newest bluez on Arm...
~
Bluetooth adapter used here is [[Logitec LBT-UAN04C2BK:ht...
** Customizing Kernel [#r7795aa3]
>
Specify ?vender/Product? by make menuconfig~
(AtmarkTechno) Vendor
(Armadillo-Box WS1) AtmarkTechno Products
~
Make Bluetooth effective by putting check marks on the ce...
Linux Kernel Configuration
[*] Networking support --->
--- Bluetooth subsystem support
<*> RFCOMM protocol support  <-- Mark i...
[*] RFCOMM TTY support   <-- Mark i...
<*> BNEP protocol support <-- Mark it for ...
[*] Multicast filter support <-- Mark it for ...
[*] Protocol filter support <-- Mark it for ...
<*> HIDP protocol support <-- Mark it for ...
Bluetooth device drivers --->
<*> HCI USB driver <-- Mark it for ...
** Configuration of UserLand [#pb63f5f6]
>
At this time, Java is not used. Since Java generally occu...
atmark@atde5:~/atmark-dist$ make menuconfig
Userland Configuration
Miscellaneous Applications --->
[ ] java  <-- Remove check mark
** Cross compile for Bluez [#k79519a0]
>
Build Bluez.~
Down load the source code of Bluez and extract it. (As of...
atmark@atde5:~$ wget https://www.kernel.org/pub/linux/bl...
atmark@atde5:~$ tar Jxf bluez-5.36.tar.xz
~
Install the local packages of libical to ATDES.~
atmark@atde5:~$ wget http://ftp.jp.debian.org/debian/poo...
atmark@atde5:~$ dpkg-cross -v --build --arch armel libi...
atmark@atde5:~$ sudo dpkg -i libical0-armel-cross_0.48-2...
atmark@atde5:~$ wget http://ftp.jp.debian.org/debian/poo...
atmark@atde5:~$ dpkg-cross -v --build --arch armel libi...
atmark@atde5:~$ sudo dpkg -i libical-dev-armel-cross_0.4...
~
Execute configure.~
atmark@atde5:~$ cd bluez-5.36/
atmark@atde5:~/bluez-5.36$ ./configure --build=i686 --ho...
--disable-udev --disable-syste...
~
Execute make.~
atmark@atde5:~/bluez-5.36$ make
~
Execute make install, and install it to ROM image directo...
atmark@atde5:~/bluez-5.36$ make install DESTDIR=/home/at...
~
Remove unnecessary files such as documents.~
atmark@atde5:~/bluez-5.36$ rm -rf /home/atmark/atmark-di...
~
Manually install gatttool, which is not installed by make...
atmark@atde5:~/bluez-5.36$ cp attrib/gatttool /home/atma...
**Installing D-bus [#y1557779]
>
Download D-bus deb package.
atmark@atde5:~/bluez-5.36$ cd
atmark@atde5:~$ wget http://ftp.gnome.org/mirror/cdimage...
~
Extract D-bus deb package in ROM image directory of atmar...
atmark@atde5:~$ rm -rf atmark-dist/romfs/usr/share/doc
atmark@atde5:~$ rm -rf atmark-dist/romfs/usr/share/man
~
Including init-funcions, which D-bus package is depending...
atmark@atde5:~$ wget http://ftp.jp.debian.org/debian/poo...
atmark@atde5:~$ dpkg -x lsb-base_4.1+Debian8+deb7u1_all....
atmark@atde5:~$ rm -rf atmark-dist/romfs/usr/share/doc
~
Add user/group, which execute D-sub daemon.~
~
-Adding user~
atmark@atde5:~$ vi atmark-dist-20151026/vendors/AtmarkTe...
At the end of file, please add line listed below
messagebus:x:101:105::/var/run/dbus:/bin/false
~
-Adding group~
atmark@atde5:~$ vi atmark-dist-20151026/vendors/AtmarkTe...
At the end of file, please add line listed below.
messagebus:x:105:
** Recreating image [#yf1b85a5]
>
Complete the process so far, add BLE to Kernel and UserLa...
atmark@atde5:~$ cd atmark-dist
atmark@atde5:~/atmark-dist$ make romfs
atmark@atde5:~/atmark-dist$ make image
Please make sure that the files, which are located at the...
** Checking operation [#mab100ea]
>
Please rewrite Kernel and UserLand to newly created ones....
hermit> tftpdl 192.168.0.90 192.168.0.164 --blksize=1024...
hermit> tftpdl 192.168.0.90 192.168.0.164 --blksize=1024...
~
Booting the new Kernel and UserLand, insert the USB bluet...
Check that the USB Bluetooth adapter is recognized.~
[root@abws1-0 (ttymxc1) ~]# hciconfig -a
hci0: Type: BR/EDR Bus: USB
BD Address: 00:09:DD:40:C8:E6 ACL MTU: 310:10 ...
UP RUNNING
RX bytes:1389 acl:0 sco:0 events:37 errors:0
TX bytes:382 acl:0 sco:0 commands:37 errors:0
Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'CSR8510 A10'
Class: 0x000000
Service Classes: Unspecified
Device Class: Miscellaneous,
HCI Version: 4.0 (0x6) Revision: 0x22bb
LMP Version: 4.0 (0x6) Subversion: 0x22bb
Manufacturer: Cambridge Silicon Radio (10)
The status of hci0 is automatically set to up.~
(Configurations of dbus start and bluetooth start are NOT...
~
Check the current status of BLE support.~
[root@abws1-0 (ttymxc1) ~]# hciconfig hci0 lestates
Supported link layer states:
YES Non-connectable Advertising State
YES Scannable Advertising State
YES Connectable Advertising State
YES Directed Advertising State
YES Passive Scanning State
YES Active Scanning State
YES Initiating State/Connection State in Master ...
YES Connection State in the Slave Role
YES Non-connectable Advertising State and Passiv...
YES Scannable Advertising State and Passive Scan...
YES Connectable Advertising State and Passive Sc...
YES Directed Advertising State and Passive Scann...
YES Non-connectable Advertising State and Active...
YES Scannable Advertising State and Active Scann...
YES Connectable Advertising State and Active Sca...
YES Directed Advertising State and Active Scanni...
YES Non-connectable Advertising State and Initia...
YES Scannable Advertising State and Initiating S...
YES Non-connectable Advertising State and Master...
YES Scannable Advertising State and Master Role ...
YES Non-connectable Advertising State and Slave ...
YES Scannable Advertising State and Slave Role c...
YES Passive Scanning State and Initiating State ...
YES Active Scanning State and Initiating State c...
YES Passive Scanning State and Master Role combi...
YES Active Scanning State and Master Role combin...
YES Passive Scanning State and Slave Role combin...
YES Active Scanning State and Slave Role combina...
YES Initiating State and Master Role combination...
~
Doing scan around the neighborhood, look for BLE devices,...
[root@abws1-0 (ttymxc1) ~]# hcitool lescan
LE Scan ...
59:FF:59:55:45:CC (unknown)
59:FF:59:55:45:CC (unknown)
D9:9E:B9:CE:47:FD FNSensor
D9:9E:B9:CE:47:FD (unknown)
7D:FD:8D:EC:B2:4E (unknown)
7D:FD:8D:EC:B2:4E (unknown)
59:FF:59:55:45:CC (unknown)
59:FF:59:55:45:CC (unknown)
7D:FD:8D:EC:B2:4E (unknown)
7D:FD:8D:EC:B2:4E (unknown)
EB:49:99:58:22:49 (unknown)
EB:49:99:58:22:49 estimote
7D:FD:8D:EC:B2:4E (unknown)
7D:FD:8D:EC:B2:4E (unknown)
59:FF:59:55:45:CC (unknown)
59:FF:59:55:45:CC (unknown)
C2:A4:23:28:B1:6B FNSensor
C2:A4:23:28:B1:6B (unknown)
D9:9E:B9:CE:47:FD FNSensor
D9:9E:B9:CE:47:FD (unknown)
F4:C9:10:75:CB:91 fnColor
F4:C9:10:75:CB:91 (unknown)
~
Doing scan correctly, obtain the list.~
Using gatttool, connect one of the devices in the list by...
[root@abws1-0 (ttymxc1) ~]# gatttool -i hci0 -b D9:9E:B9...
[D9:9E:B9:CE:47:FD][LE]> connect
Attempting to connect to D9:9E:B9:CE:47:FD
Connection successful
[D9:9E:B9:CE:47:FD][LE]> help
help Show this...
exit Exit inte...
quit Exit inte...
connect [address [address type]] Connect t...
disconnect Disconnec...
primary [UUID] Primary S...
included [start hnd [end hnd]] Find Incl...
characteristics [start hnd [end hnd [UUID]]] Character...
char-desc [start hnd] [end hnd] Character...
char-read-hnd <handle> Character...
char-read-uuid <UUID> [start hnd] [end hnd] Character...
char-write-req <handle> <new value> Character...
char-write-cmd <handle> <new value> Character...
sec-level [low | medium | high] Set secur...
mtu <value> Exchange ...
[D9:9E:B9:CE:47:FD][LE]> primary
attr handle: 0x0001, end grp handle: 0x0007 uuid: 000018...
attr handle: 0x0008, end grp handle: 0x0008 uuid: 000018...
attr handle: 0x0009, end grp handle: 0x000b uuid: 0000bc...
attr handle: 0x000c, end grp handle: 0xffff uuid: bc0000...
[D9:9E:B9:CE:47:FD][LE]>quit
[root@abws1-0 (ttymxc1) ~]#
Then, successfully read the primary service information.~
* Revision History [#xf617bcf]
>
-2015-12-8: This article is initially released.
Page: