acassis commented on a change in pull request #1655:
URL: https://github.com/apache/incubator-nuttx/pull/1655#discussion_r478550597
##########
File path: boards/sim/sim/sim/README.txt
##########
@@ -544,6 +544,17 @@ bluetooth
apps/wireless/bluetooth/btsak and the NULL Bluetooth device at
drivers/wireless/bluetooth/bt_null.c
+ There is also support on a Linux Host for attaching the bluetooth hardware
+ from the host to the NuttX bluetoooth stack via the HCI Socket interface
+ over the User Channel. This is enabled in the bthcisock configuration.
+ In order to use this you must give the nuttx elf additional capabilities:
+
+ sudo setcap 'cap_net_raw,cap_net_admin=eip' ./nuttx
Review comment:
```suggestion
sudo setcap 'cap_net_raw,cap_net_admin=eip' ./nuttx
```
$ sudo setcap 'cap_net_raw,cap_net_admin=eip' ./nuttx
$ ./nuttx
NuttShell (NSH) NuttX-9.1.0
nsh> bt bnep0 scan start -d
nsh> bt bnep0 scan stop
nsh> bt bnep0 scan get
Scan result:
1. addr: 4f:0f:8f:dd:3b:a3 type: 1
rssi: -74
response type: 2
advertiser data: 03 03 9f fe 17 16 9f fe 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
2. addr: 4f:0f:8f:dd:3b:a3 type: 1
rssi: -74
response type: 4
advertiser data: 09 ff e0 00 56 f6 ca 68 26 96
3. addr: 71:ad:8c:45:b1:f7 type: 1
rssi: -62
response type: 0
advertiser data: 02 01 1a 0a ff 4c 00 10 05 03 1c 78 c4 7b
4. addr: 71:ad:8c:45:b1:f7 type: 1
rssi: -62
response type: 4
advertiser data: 5. addr: c8:ff:77:be:b8:a0 type: 0
rssi: -83
response type: 0
advertiser data: 02 01 06 11 06 a4 d0 87 a7 b4 d1 79 89 2d 45 37
1c 10 00 d1 2d
nsh>
##########
File path: boards/sim/sim/sim/README.txt
##########
@@ -544,6 +544,17 @@ bluetooth
apps/wireless/bluetooth/btsak and the NULL Bluetooth device at
drivers/wireless/bluetooth/bt_null.c
+ There is also support on a Linux Host for attaching the bluetooth hardware
+ from the host to the NuttX bluetoooth stack via the HCI Socket interface
+ over the User Channel. This is enabled in the bthcisock configuration.
+ In order to use this you must give the nuttx elf additional capabilities:
+
+ sudo setcap 'cap_net_raw,cap_net_admin=eip' ./nuttx
+
+ You can then monitor the HCI traffic on the host with wireshark or btmon
+
+ sudo btmon
Review comment:
$ sudo btmon
= Close Index: 60:57:18:EE:03:FD
[hci0] 4.204320
@ MGMT Event: Index Removed (0x0005) plen 0
{0x0002} [hci0] 4.204520
@ MGMT Event: Index Removed (0x0005) plen 0
{0x0001} [hci0] 4.204520
= Open Index: 60:57:18:EE:03:FD
[hci0] 4.204551
= Index Info: 60:57:18:EE:03:FD (Intel Corp.)
[hci0] 4.204553
@ RAW Close: nuttx
{0x0003} 4.204557
@ USER Open: nuttx (privileged) version 2.22
{0x0003} [hci0] 4.204560
< HCI Command: Reset (0x03|0x0003) plen 0
#5 [hci0] 4.204602
= bluetoothd: Endpoint unregistered: sender=:1.74
path=/MediaEndpoint/A2DPSink/sbc 4.207973
= bluetoothd: Endpoint unregistered: sender=:1.74
path=/MediaEndpoint/A2DPSource/sbc 4.208031
> HCI Event: Command Complete (0x0e) plen 4
#6 [hci0] 4.218155
Reset (0x03|0x0003) ncmd 2
Status: Success (0x00)
< HCI Command: Read Local Supported Features (0x04|0x0003) plen 0
#7 [hci0] 4.224783
> HCI Event: Command Complete (0x0e) plen 12
#8 [hci0] 4.225184
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]