Hi Łukasz,
There still seems to be a discrepancy between the, BTW nice, tutorial and what
I have.
I've tried the set-scan-opts ignore_legacy=1 but returned me rc=2 (I haven't
looked in the code yet).
These are my settings (for what it is useful):
I'm using Linux Mint 19 / latest updates (I had some issues with Mint 18.x),
moved to a real PC instead of a Virtual PC (VMWare) to run Linux.
I'm having a Nordic nRF5284PDK and a nRF5284DK. The last one I'm using for the
RTT.
I used the newt target amend btshell syscfg=.... to generate the
targets/btshell/syscfg.yml file
$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/lto-wrapper
Target: arm-none-eabi
Configured with:
/build/gcc-arm-none-eabi-2DWmz3/gcc-arm-none-eabi-7-2018q2/src/gcc/configure
--target=arm-none-eabi
--prefix=/build/gcc-arm-none-eabi-2DWmz3/gcc-arm-none-eabi-7-2018q2/install-native
--libexecdir=/build/gcc-arm-none-eabi-2DWmz3/gcc-arm-none-eabi-7-2018q2/install-native/lib
--infodir=/build/gcc-arm-none-eabi-2DWmz3/gcc-arm-none-eabi-7-2018q2/install-native/share/doc/gcc-arm-none-eabi/info
--mandir=/build/gcc-arm-none-eabi-2DWmz3/gcc-arm-none-eabi-7-2018q2/install-native/share/doc/gcc-arm-none-eabi/man
--htmldir=/build/gcc-arm-none-eabi-2DWmz3/gcc-arm-none-eabi-7-2018q2/install-native/share/doc/gcc-arm-none-eabi/html
--pdfdir=/build/gcc-arm-none-eabi-2DWmz3/gcc-arm-none-eabi-7-2018q2/install-native/share/doc/gcc-arm-none-eabi/pdf
--enable-languages=c,c++ --enable-plugins --disable-decimal-float
--disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath
--disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared
--disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib
--with-headers=yes --with-python-dir=share/gcc-arm-none-eabi
--with-sysroot=/build/gcc-arm-none-eabi-2DWmz3/gcc-arm-none-eabi-7-2018q2/install-native/arm-none-eabi
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
--with-pkgversion='GNU Tools for Arm Embedded Processors 7-2018-q3-update'
--with-multilib-list=rmprofile
Thread model: single
gcc version 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]
(GNU Tools for Arm Embedded Processors 7-2018-q3-update)
$ newt target show
targets/btshell
app=@apache-mynewt-core/apps/btshell
bsp=@apache-mynewt-core/hw/bsp/nrf52840pdk
build_profile=optimized
syscfg=BLE_EXT_ADV=1:BLE_EXT_ADV_MAX_SIZE=700:BLE_MONITOR_RTT=1
targets/my_blinky_sim
app=apps/blinky
bsp=@apache-mynewt-core/hw/bsp/native
build_profile=debug
targets/nrf52_boot
app=@apache-mynewt-core/apps/boot
bsp=@apache-mynewt-core/hw/bsp/nrf52840pdk
build_profile=optimized
$ cat targets/btshell/syscfg.yml
syscfg.vals:
BLE_EXT_ADV: "1"
BLE_EXT_ADV_MAX_SIZE: "700"
BLE_MONITOR_RTT: "1"
$ rtt2pty -b btmonitor
Using jlinkarm found at /opt/SEGGER/JLink/libjlinkarm.so
Connected to:
J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
S/N: 683623237
Searching for RTT control block...
Failed to find matching up-buffer
$ rtt2pty
Using jlinkarm found at /opt/SEGGER/JLink/libjlinkarm.so
Connected to:
J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
S/N: 683623237
Searching for RTT control block...
Using up-buffer #0 (size=1024)
PTY name is /dev/pts/4
$ btmon --tty=/dev/pts/4
Bluetooth monitor ver 5.48
--- /dev/pts/4 opened ---
TI Scanner
[20] : <Rx> - 05:04:17.591
-Type : 0x04 (Event)
-EventCode : 0x00FF (HCI_LE_ExtEvent)
-Data Length : 0x53 (83) bytes(s)
Event : 0x0613 (1555) (GAP_AdvertiserScannerEvent)
Status : 0x00 (0) (SUCCESS)
EventId : 0x00400000 (4194304) (
GAP_EVT_ADV_REPORT)
AdvRptEventType: 0x01 (1) (AE_Undir_Conn_or_Data_Complete)
AddressType : 0x00 (0) (ADDRTYPE_PUBLIC)
Address : 66:55:44:33:22:11
PrimaryPHY : 0x01 (1) (SCANNED_PHY_1M)
SecondaryPHY : 0x01 (1) (SCANNED_PHY_1M)
AdvSid : 0x0A (10)
TxPower : 0x7F (127)
RSSI : 0xCB (203)
DirectAddrType : 0xFF (255) (ADDRTYPE_NONE)
DirectAddr : 00:00:00:00:00:00
PeriodicAdvInt : 0x0000 (0)
DataLength : 0x0034 (52)
Data : 19:09:48:65:6C:6C:6F:2C:20:49:27:6D:20:61:64:76:
65:72:74:69:73:69:6E:67:20:31:19:09:48:65:6C:6C:
6F:2C:20:49:27:6D:20:61:64:76:65:72:74:69:73:69:
6E:67:20:32
Dump(Rx):
0000:04 FF 53 13 06 00 00 00 40 00 01 00 11 22 33 44 ..S.....@...."3D
0010:55 66 01 01 0A 7F CB FF 00 00 00 00 00 00 00 00 Uf..............
0020:34 00 19 09 48 65 6C 6C 6F 2C 20 49 27 6D 20 61 4...Hello, I'm a
0030:64 76 65 72 74 69 73 69 6E 67 20 31 19 09 48 65 dvertising 1..He
0040:6C 6C 6F 2C 20 49 27 6D 20 61 64 76 65 72 74 69 llo, I'm adverti
0050:73 69 6E 67 20 32 sing 2
--------------------------------------------------------------------
Nordic (from the putty window):
551229 Extended adv: 'conn' complete rssi=-52 txpower=127, pphy=1, sphy=1,
sid=10, addr_type=0 addr=66:55:44:33:22:11
551232 length_data=52
data=0x19:0x09:0x48:0x65:0x6c:0x6c:0x6f:0x2c:0x20:0x49:0x27:0x6d:0x20:0x61:0x64:0x76:0x65:0x72:0x74:0x69:0x73:0x69:0x6e:0x67:0x20:0x31:0x19:0x09:0x48:0x65:0x6c:0x6c:0x6f:0x2c:0x20:0x49:0x27:0x6d:0x20:0x61:0x64:0x76:0x65:0x72:0x74:0x69:0x73:0x69:0x6e:0x67:0x20:0x32
fields:
551240 name(complete)=Hello, I'm advertising 2
Thanks & Kind regards,
Marc
________________________________
From: Łukasz Rymanowski <[email protected]>
Sent: Tuesday, October 9, 2018 1:28 PM
To: [email protected]
Subject: Re: NimBLE Extended Scan
Hi Marc,
On Tue, 9 Oct 2018 at 09:59, Marc BT <[email protected]> wrote:
>
> Hi Łukasz,
>
> Thanks for quick reply and a quick update.
>
> I followed the guideline ...got a bit confused on the logging of the rtt2pty
> tool:
> ../tools-rtt2pty/rtt2pty -b btmonitor
> Using jlinkarm found at /opt/SEGGER/JLink/libjlinkarm.so
> Connected to:
> J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
> S/N: 683623237
> Searching for RTT control block...
> Failed to find matching up-buffer
>
That would mean BLE_MONITOR_RTT: 1 is not set as in the tutorial.
Could you please double check, rebuild, flash and try one more time?
> Running it without the -b btmonitor I could get a pty port.
>
> Monitoring showed some logging, not like the one from the codecoup btmon link
> but a starting point.
>
> 021819 Extended adv: 'conn' incomplete rssi=-60 txpower=127, pphy=1, sphy=1,
> sid=10, addr_type=0 addr=66:55:44:33:22:11
> 021822 length_data=229
> data=0x19:0x09:0x48:0x65:0x6c:0x6c:0x6f:0x2c:0x20:0x49:0x27:0x6d:0x20:0x61:0x64:0x76:0x65:0x72:0x74:0x69:0x7
> ....
> 021853 Extended adv: 'conn' complete rssi=-60 txpower=127, pphy=1, sphy=1,
> sid=10, addr_type=0 addr=66:55:44:33:22:11
> 021856 length_data=15
> data=0x69:0x6e:0x67:0x20:0x39:0x19:0x09:0x48:0x65:0x6c:0x6c:0x6f:0x2c:0x20:0x49
> fields:
> 021859
> 021859 Extended adv: 'conn' incomplete rssi=-53 txpower=127, pphy=1, sphy=1,
> sid=10, addr_type=0 addr=66:55:44:33:22:11
> 021862 length_data=229
> data=0x19:0x09:0x48:0x65:0x6c:0x6c:0x6f:0x2c:0x20:0x49:0x27:0x6d:0x20:0x61:0x64:0x76:0x65:0x72:0x74:0x69:0x7
> ....
> ....
> 021861 received advertisement; event_type=4 rssi=-82 addr_type=1
> addr=f1:80:b4:61:d2:c6 length_data=29
> data=0x02:0x0a:0x04:0x19:0x09:0x45:0x78:0x70:0x65:0x72:0x74:0x26:0x4d:0x69:0x6c:0x6b:0x5f:0x46:0x31:0x38:0x30:0x42:0x34:0x36:0x31:0x44:0x32:0x43:0x35
> fields:
> 021868 name(complete)=Expert&Milk_F180B461D2C5
> 021869 tx_pwr_lvl=4
>
> Time to start further debugging
>
Note that printing lot of data on the console might break your
scanning, especially long chaining.
Have a look at command `set-scan-opts` which can help you to limit
number of bytes to print out.
Also there is an option to filter out legacy advertising.
> Thank,
> Marc
Best
Łukasz
>
> >Hello Marc,
> >
> >There is no additional configuration needed as long as you are using 1M PHY.
> >Would be good to get some logs and best would be to have btmon logs:
> >https://www.codecoup.pl/blog/support-for-btmon-in-mynewt/
> >
> >Best
> >Łukasz
> >>On Mon, 8 Oct 2018 at 12:29, Marc BT <[email protected]> wrote:
> >>
> >> Hello all,
> >>
> >> I'm trying to configure two Nordic nRF52840-DK boards, one as advertiser
> >> (Extended Advertise),
> the other as scanner (Extended Scan).
> >>
> >> Compile settings (newt target amend ....):
> >>
> >> * BLE_EXT_ADV = 1
> >> * BLE_EXT_ADV_MAX_SIZE = 700
> >>
> >> I've used a TI kit to verify the existence of Extended Advertising.
> >>
> >> The board configured as Extended Advertiser works, the advertising
> >> packets can be seen
> on the TI board.
> >> The board configured as Extended Scanner doesn't return any advertising
> >> events.
> >>
> >> The HCI commands to setup the Extended Scan don't return any status error.
> >>
> >> Am I missing some compile switches ?
> >>
> >> Kind regards,
> >> Marc
>
> ________________________________
> From: Marc BT
> Sent: Monday, October 8, 2018 12:13 PM
> To: [email protected]
> Subject: NimBLE Extended Scan
>
> Hello all,
>
> I'm trying to configure two Nordic nRF52840-DK boards, one as advertiser
> (Extended Advertise), the other as scanner (Extended Scan).
>
> Compile settings (newt target amend ....):
>
> * BLE_EXT_ADV = 1
> * BLE_EXT_ADV_MAX_SIZE = 700
>
> I've used a TI kit to verify the existence of Extended Advertising.
>
> The board configured as Extended Advertiser works, the advertising packets
> can be seen on the TI board.
> The board configured as Extended Scanner doesn't return any advertising
> events.
>
> The HCI commands to setup the Extended Scan don't return any status error.
>
> Am I missing some compile switches ?
>
> Kind regards,
> Marc