-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nimble/netif: add support for BT5 PHY modes #16860
nimble/netif: add support for BT5 PHY modes #16860
Conversation
cpu/nrf52/Makefile.features
Outdated
# On top of the default 1Mbit PHY mode, all nrf52 support the 2MBit PHY mode, | ||
# and the 52840 does further support the coded PHYs | ||
FEATURES_PROVIDED += ble_phy_2mbit | ||
ifneq (,$(filter nrf52840% nrf52811%,$(CPU_MODEL))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nrf52811 supports it but nrf52810 does not?
I would expect nrf52832 to be the 'odd one' in this family, but I didn't look at the data sheet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far I copied this statement from (an apparently older version of) boards/common/nrf52/Makefile.dep
.
Will re-check and verify which of the family members actually support the coded PHY...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nrf52811 supports it but nrf52810 does not?
finally checked, and yes, that is the case: https://infocenter.nordicsemi.com/topic/struct_nrf52/struct/nrf52.html
Do you think we can target this one for the release @haukepetersen? |
Since this PR adds the option for multiple advertisement instances its going to be likely that multiple are running at the same tim (I'm doing so at least). So I added a makefile included before Makefile.include with this function: |
Found some issues with posted makefile, but fixed it in another commit, I can post the updated version if there is intereset. |
/** | ||
* @brief Parameter set used to configure accepting connections (advertising) | ||
*/ | ||
typedef struct { | ||
uint8_t flags; /**< flags */ | ||
uint32_t adv_itvl_ms; /**< advertising interval [ms] */ | ||
uint8_t primary_phy; /**< primary PHY mode */ | ||
uint8_t secondary_phy; /**< secondary PHY mode */ | ||
int8_t tx_power; /**< specify TX power to be used */ | ||
uint8_t channel_map; /**< specify custom channel map */ | ||
uint32_t timeout_ms; /**< stop accepting after this time [ms] */ | ||
uint8_t own_addr_type; /**< specify our own address type to use */ | ||
} nimble_netif_accept_cfg_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be a good idea to make this a generic "adv_params" abstraction, that way other modules can use it as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you are at it, please also sort the struct by size of types to avoid padding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fjmolinas IMHO it does not make sense to make this into a generic adv_params
struct. When using nimble_netif
, some of the advertising parameters (e.g. not-scannable, directed/non-directed, etc) are statically fixed and resolved internally by nimble_netif
. Exposing these in this API would be counter-productive...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi: sizeof(nimble_netif_accept_cfg_t) = 20
but with
typedef struct {
uint32_t timeout_ms; /**< stop accepting after this time [ms] */
uint32_t adv_itvl_ms; /**< advertising interval [ms] */
uint8_t primary_phy; /**< primary PHY mode */
uint8_t secondary_phy; /**< secondary PHY mode */
uint8_t flags; /**< flags */
int8_t tx_power; /**< specify TX power to be used */
uint8_t channel_map; /**< specify custom channel map */
uint8_t own_addr_type; /**< specify our own address type to use */
} nimble_netif_accept_cfg_t;
sizeof(nimble_netif_accept_cfg_t) = 16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exposing these in this API would be counter-productive...
I don't necessarily agree, what will happen is that other users will define the same kind of abstractions when we could only use one, where nimble_netif
could force the parameters it needs to force.
Eg.: in my branch I already have something like this for auto_adv
:
* @brief Flags for enabling legacy advertisement and high-duty cycle mode
* when accepting incoming connections
*/
#define NIMBLE_AUTOADV_FLAG_LEGACY (1 << 0) /* use legacy advertising mode */
#define NIMBLE_AUTOADV_FLAG_HD_MODE (1 << 1) /* use high duty cycle mode, only */
/* ignored if no direct advertising */
#define NIMBLE_AUTOADV_FLAG_CONNECTABLE (1 << 2) /* if connectable advertisement */
#define NIMBLE_AUTOADV_FLAG_SCANNABLE (1 << 3) /* if scannable advertisement */
#define NIMBLE_AUTOADV_FLAG_ANONYMOUS (1 << 4) /* if anonymous advertisement */
/* ignore if no 'nimble_adv_ex' */
#define NIMBLE_AUTOADV_FLAG_SCAN_REQ_NOTIF (1 << 5) /* enable scan-request notification */
/* ignore if no 'nimble_adv_ex' */
/**
* @brief Parameter set used to configure accepting connections (advertising)
*/
typedef struct {
uint32_t adv_itvl_ms; /**< advertising interval [ms] */
int32_t adv_duration_ms; /**< advertising interval [ms] */
uint8_t flags; /**< advertising flags */
uint8_t phy; /**< PHY mode */
int8_t tx_power; /**< specify TX power to be used */
uint8_t channel_map; /**< specify custom channel map */
uint8_t own_addr_type; /**< specify our own address type to use */
uint8_t filter_policy; /**< Advertising Filter policy */
} nimble_autoadv_cfg_t;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is something you would not necessarily be against, then I can pursue it in a follow-up, but the data-strcuture is soe alike that it would be a shame to duplicate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still against exposing those additional parameters in this API here: keeping APIs precisely tailored to their use IMHO yields many more advantages than forcing unifed config structs! But we can of course see if using the more generic config struct internally in the nimble_netif
implementation could be applicable at some point. But for now I really do not liike in joining these structs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we can of course see if using the more generic config struct internally in the nimble_netif implementation could be applicable at some point. But for now I really do not liike in joining these structs.
Ok lets move forward, I'll test tomorrow.
35aaed7
to
d936d55
Compare
pusehd a new intermediate state that i) pulls in the latest changes from #16843 and ii) adaptes autoconn, statconn, and rpble to make the PHY mode configurable and adapt to nimble_netif API changes. |
#16843 has been merged, so there is nothing holding back this PR anymore. I am currently running some verification experiments in the iotlab to test the added PHY modes in conjunction with |
32ec392
to
8613490
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing, I only market tests with erros, namely autoconn
and statconn
test failed when extended_advterisement was enabled.
examples/gnrc_networking full control
2021-12-14 17:04:46,814 # main(): This is RIOT! (Version: 2022.01-devel-1242-g36bd3-pr-16860)
2021-12-14 17:04:46,814 # RIOT network stack example application
2021-12-14 17:04:46,814 # All up, running the shell now
> ble scan
2021-12-14 17:05:12,824 # ble scan
2021-12-14 17:05:12,826 # scanning (for 500ms) ...
2021-12-14 17:05:13,327 # done
2021-12-14 17:05:13,337 # [ 0] 79:11:6F:48:B0:B2 (random) [SCAN_IND] phy:1M-1M "undefined", adv_msg_cnt: 1, adv_int: 0us, last_rssi: -77
2021-12-14 17:05:13,346 # [ 1] EC:25:BC:59:48:68 (random) [IND] phy:1M-1M "toto", adv_msg_cnt: 6, adv_int: 66752us, last_rssi: -62
2021-12-14 17:05:13,357 # [ 2] 60:2C:4A:CE:B5:A9 (random) [SCAN_IND] phy:1M-1M "undefined", adv_msg_cnt: 2, adv_int: 128438us, last_rssi: -71
2021-12-14 17:05:13,367 # [ 3] 66:50:9E:96:12:7B (random) [IND] phy:1M-1M "undefined", adv_msg_cnt: 2, adv_int: 136876us, last_rssi: -80
2021-12-14 17:05:13,376 # [ 4] 44:6E:54:D4:AB:53 (random) [IND] phy:1M-1M "undefined", adv_msg_cnt: 1, adv_int: 0us, last_rssi: -85
ble connect EC:25:BC:59:48:68
2021-12-14 17:05:23,554 # ble connect EC:25:BC:59:48:68
2021-12-14 17:05:23,557 # Successfully connected 123
> 2021-12-14 17:05:23,716 # event: handle 0 -> CONNECTED as MASTER (EC:25:BC:59:48:68)
ifconfig
2021-12-14 17:05:28,376 # ifconfig
2021-12-14 17:05:28,379 # Iface 8 HWaddr: CA:5E:99:AE:11:63
2021-12-14 17:05:28,384 # L2-PDU:1280 MTU:1280 HL:64 RTR
2021-12-14 17:05:28,386 # 6LO IPHC
2021-12-14 17:05:28,389 # Source address length: 6
2021-12-14 17:05:28,392 # Link type: wireless
2021-12-14 17:05:28,398 # inet6 addr: fe80::ca5e:99ff:feae:1163 scope: link VAL
2021-12-14 17:05:28,401 # inet6 group: ff02::2
2021-12-14 17:05:28,403 # inet6 group: ff02::1
2021-12-14 17:05:28,407 # inet6 group: ff02::1:ffae:1163
2021-12-14 17:05:28,410 # inet6 group: ff02::1a
2021-12-14 17:05:28,411 #
2021-12-14 17:05:28,414 # Statistics for Layer 2
2021-12-14 17:05:28,417 # RX packets 0 bytes 0
2021-12-14 17:05:28,421 # TX packets 0 (Multicast: 0) bytes 27960
2021-12-14 17:05:28,425 # TX succeeded 0 errors 0
2021-12-14 17:05:28,427 # Statistics for IPv6
2021-12-14 17:05:28,430 # RX packets 0 bytes 0
2021-12-14 17:05:28,435 # TX packets 6 (Multicast: 6) bytes 330
2021-12-14 17:05:28,438 # TX succeeded 6 errors 0
2021-12-14 17:05:28,438 #
> ping6 fe80::ec25:bcff:fe59:4868
2021-12-14 17:05:36,810 # ping6 fe80::ec25:bcff:fe59:4868
2021-12-14 17:05:36,918 # 12 bytes from fe80::ec25:bcff:fe59:4868%8: icmp_seq=0 ttl=64 time=99.482 ms
2021-12-14 17:05:37,968 # 12 bytes from fe80::ec25:bcff:fe59:4868%8: icmp_seq=1 ttl=64 time=136.739 ms
2021-12-14 17:05:38,943 # 12 bytes from fe80::ec25:bcff:fe59:4868%8: icmp_seq=2 ttl=64 time=100.244 ms
2021-12-14 17:05:38,943 #
2021-12-14 17:05:38,947 # --- fe80::ec25:bcff:fe59:4868 PING statistics ---
2021-12-14 17:05:38,952 # 3 packets transmitted, 3 packets received, 0% packet loss
2021-12-14 17:05:38,957 # round-trip min/avg/max = 99.482/112.155/136.739 ms
> help
2021-12-14 17:05:42,096 # help
2021-12-14 17:05:42,099 # Command Description
2021-12-14 17:05:42,102 # ---------------------------------------
2021-12-14 17:05:42,108 # udp send data over UDP and listen on UDP ports
2021-12-14 17:05:42,111 # reboot Reboot the node
2021-12-14 17:05:42,116 # version Prints current RIOT_VERSION
2021-12-14 17:05:42,121 # pm interact with layered PM subsystem
2021-12-14 17:05:42,126 # ps Prints information about running threads.
2021-12-14 17:05:42,129 # ping6 Ping via ICMPv6
2021-12-14 17:05:42,133 # ping Alias for ping6
2021-12-14 17:05:42,138 # nib Configure neighbor information base
2021-12-14 17:05:42,142 # ifconfig Configure network interfaces
2021-12-14 17:05:42,149 # rpl rpl configuration tool ('rpl help' for more information)
2021-12-14 17:05:42,154 # 6ctx 6LoWPAN context configuration tool
2021-12-14 17:05:42,159 # ble Manage BLE connections for NimBLE
> reboot
2021-12-14 17:06:34,800 # reboot
2021-12-14 17:06:35,059 # NETOPT_RX_END_IRQ not implemented by driver
2021-12-14 17:06:35,062 # NETOPT_TX_END_IRQ not implemented by driver
2021-12-14 17:06:35,069 # main(): This is RIOT! (Version: 2022.01-devel-1242-g36bd3-pr-16860)
2021-12-14 17:06:35,073 # RIOT network stack example application
2021-12-14 17:06:35,075 # All up, running the shell now
> ble scan
2021-12-14 17:07:25,352 # ble scan
2021-12-14 17:07:25,354 # scanning (for 500ms) ...
bl2021-12-14 17:07:25,856 # done
2021-12-14 17:07:25,865 # [ 0] 60:2C:4A:CE:B5:A9 (random) [SCAN_IND] phy:1M-1M "undefined", adv_msg_cnt: 2, adv_int: 131311us, last_rssi: -71
2021-12-14 17:07:25,875 # [ 1] EC:25:BC:59:48:68 (random) [IND] phy:1M-1M "toto", adv_msg_cnt: 6, adv_int: 66534us, last_rssi: -62
2021-12-14 17:07:25,885 # [ 2] 79:11:6F:48:B0:B2 (random) [SCAN_IND] phy:1M-1M "undefined", adv_msg_cnt: 2, adv_int: 189996us, last_rssi: -76
2021-12-14 17:07:25,895 # [ 3] 58:22:79:98:3A:A3 (random) [IND] phy:1M-1M "undefined", adv_msg_cnt: 3, adv_int: 121948us, last_rssi: -73
> e connect EC:25:BC:59:48:68
2021-12-14 17:07:31,378 # ble connect EC:25:BC:59:48:68
2021-12-14 17:07:31,381 # Successfully connected 123
> 2021-12-14 17:07:31,473 # event: handle 0 -> CONNECTED as MASTER (EC:25:BC:59:48:68)
ping6 fe80::ec25:bcff:fe59:4868
2021-12-14 17:07:34,482 # ping6 fe80::ec25:bcff:fe59:4868
2021-12-14 17:07:34,625 # 12 bytes from fe80::ec25:bcff:fe59:4868%8: icmp_seq=0 ttl=64 time=133.795 ms
2021-12-14 17:07:35,600 # 12 bytes from fe80::ec25:bcff:fe59:4868%8: icmp_seq=1 ttl=64 time=96.813 ms
2021-12-14 17:07:36,650 # 12 bytes from fe80::ec25:bcff:fe59:4868%8: icmp_seq=2 ttl=64 time=133.775 ms
2021-12-14 17:07:36,650 #
2021-12-14 17:07:36,654 # --- fe80::ec25:bcff:fe59:4868 PING statistics ---
2021-12-14 17:07:36,659 # 3 packets transmitted, 3 packets received, 0% packet loss
2021-12-14 17:07:36,664 # round-trip min/avg/max = 96.813/121.461/133.795 ms
2021-12-14 17:02:30,652 # main(): This is RIOT! (Version: 2022.01-devel-1242-g36bd3-pr-16860)
2021-12-14 17:02:30,653 # RIOT network stack example application
2021-12-14 17:02:30,653 # All up, running the shell now
> ble adv
2021-12-14 17:04:43,768 # ble adv
2021-12-14 17:04:43,772 # usage: ble adv <help|stop|addr|name> [timeout]
2021-12-14 17:04:43,775 # timeout in ms, 0 for no timeout
> BLE ADV
2021-12-14 17:04:46,680 # BLE ADV
2021-12-14 17:04:46,682 # shell: command not found: BLE
> ble adv toto
2021-12-14 17:04:49,616 # ble adv toto
2021-12-14 17:04:49,620 # success: advertising this node as 'toto'
> ble adv toto 1000
2021-12-14 17:05:08,337 # ble adv toto 1000
2021-12-14 17:05:08,340 # err: advertising already in progress
2021-12-14 17:05:23,641 # event: handle 0 -> CONNECTED as SLAVE (CA:5E:99:AE:11:63)
ifconfig
2021-12-14 17:05:30,552 # ifconfig
2021-12-14 17:05:30,556 # Iface 8 HWaddr: EC:25:BC:59:48:68
2021-12-14 17:05:30,560 # L2-PDU:1280 MTU:1280 HL:64 RTR
2021-12-14 17:05:30,562 # 6LO IPHC
2021-12-14 17:05:30,565 # Source address length: 6
2021-12-14 17:05:30,568 # Link type: wireless
2021-12-14 17:05:30,574 # inet6 addr: fe80::ec25:bcff:fe59:4868 scope: link VAL
2021-12-14 17:05:30,576 # inet6 group: ff02::2
2021-12-14 17:05:30,579 # inet6 group: ff02::1
2021-12-14 17:05:30,583 # inet6 group: ff02::1:ff59:4868
2021-12-14 17:05:30,586 # inet6 group: ff02::1a
2021-12-14 17:05:30,586 #
2021-12-14 17:05:30,589 # Statistics for Layer 2
2021-12-14 17:05:30,592 # RX packets 0 bytes 0
2021-12-14 17:05:30,597 # TX packets 0 (Multicast: 0) bytes 41960
2021-12-14 17:05:30,600 # TX succeeded 0 errors 0
2021-12-14 17:05:30,603 # Statistics for IPv6
2021-12-14 17:05:30,606 # RX packets 0 bytes 0
2021-12-14 17:05:30,611 # TX packets 10 (Multicast: 10) bytes 554
2021-12-14 17:05:30,614 # TX succeeded 10 errors 0
2021-12-14 17:05:30,614 #
> reboo2021-12-14 17:06:36,237 # event: handle 0 -> CONNECTION ABORT (CA:5E:99:AE:11:63)
t
2021-12-14 17:06:36,456 # reboot
2021-12-14 17:06:36,715 # NETOPT_RX_END_IRQ not implemented by driver
2021-12-14 17:06:36,719 # NETOPT_TX_END_IRQ not implemented by driver
2021-12-14 17:06:36,726 # main(): This is RIOT! (Version: 2022.01-devel-1242-g36bd3-pr-16860)
2021-12-14 17:06:36,729 # RIOT network stack example application
2021-12-14 17:06:36,732 # All up, running the shell now
help
2021-12-14 17:06:39,400 # help
2021-12-14 17:06:39,403 # Command Description
2021-12-14 17:06:39,406 # ---------------------------------------
2021-12-14 17:06:39,412 # udp send data over UDP and listen on UDP ports
2021-12-14 17:06:39,415 # reboot Reboot the node
2021-12-14 17:06:39,419 # version Prints current RIOT_VERSION
2021-12-14 17:06:39,424 # pm interact with layered PM subsystem
2021-12-14 17:06:39,430 # ps Prints information about running threads.
2021-12-14 17:06:39,433 # ping6 Ping via ICMPv6
2021-12-14 17:06:39,436 # ping Alias for ping6
2021-12-14 17:06:39,441 # nib Configure neighbor information base
2021-12-14 17:06:39,446 # ifconfig Configure network interfaces
2021-12-14 17:06:39,452 # rpl rpl configuration tool ('rpl help' for more information)
2021-12-14 17:06:39,457 # 6ctx 6LoWPAN context configuration tool
2021-12-14 17:06:39,462 # ble Manage BLE connections for NimBLE
> ble adv_ext
2021-12-14 17:06:43,793 # ble adv_ext
2021-12-14 17:06:43,798 # usage: ble adv_ext <help|stop|addr|name> [timeout] [phy mode]
2021-12-14 17:06:43,802 # timeout in ms, 0 for no timeout
2021-12-14 17:06:43,804 # phy mode: [1M|2M|CODED]
> ble adv_ext toto 0 2M
2021-12-14 17:06:55,161 # ble adv_ext toto 0 2M
2021-12-14 17:06:55,164 # err: PHY mode not supported
2021-12-14 17:06:55,164 #
> ble adv_ext toto 0 1M
2021-12-14 17:06:58,578 # ble adv_ext toto 0 1M
2021-12-14 17:06:58,581 # success: advertising this node as 'toto'
examples/gnrc_networking full control, both using ext_adv only one with 2M and coded phy
Not seen overscan
2021-12-14 17:12:45,524 # main(): This is RIOT! (Version: 2022.01-devel-1242-g36bd3-pr-16860)
2021-12-14 17:12:45,525 # RIOT network stack example application
2021-12-14 17:12:45,525 # All up, running the shell now
> 2021-12-14 17:12:45,526 # help
2021-12-14 17:12:45,526 # Command Description
2021-12-14 17:12:45,529 # ---------------------------------------
2021-12-14 17:12:45,535 # udp send data over UDP and listen on UDP ports
2021-12-14 17:12:45,538 # reboot Reboot the node
2021-12-14 17:12:45,542 # version Prints current RIOT_VERSION
2021-12-14 17:12:45,547 # pm interact with layered PM subsystem
2021-12-14 17:12:45,553 # ps Prints information about running threads.
2021-12-14 17:12:45,556 # ping6 Ping via ICMPv6
2021-12-14 17:12:45,559 # ping Alias for ping6
2021-12-14 17:12:45,564 # nib Configure neighbor information base
2021-12-14 17:12:45,569 # ifconfig Configure network interfaces
2021-12-14 17:12:45,576 # rpl rpl configuration tool ('rpl help' for more information)
2021-12-14 17:12:45,581 # 6ctx 6LoWPAN context configuration tool
2021-12-14 17:12:45,585 # ble Manage BLE connections for NimBLE
> ble scan
2021-12-14 17:12:47,096 # ble scan
2021-12-14 17:12:47,098 # scanning (for 500ms) ...
2021-12-14 17:12:47,599 # done
2021-12-14 17:12:47,609 # [ 0] C4:C3:0E:14:E1:7B (random) [NONCONN_IND] phy:1M-1M "undefined", adv_msg_cnt: 1, adv_int: 0us, last_rssi: -80
2021-12-14 17:12:47,619 # [ 1] 60:2C:4A:CE:B5:A9 (random) [SCAN_IND] phy:1M-1M "undefined", adv_msg_cnt: 2, adv_int: 132579us, last_rssi: -70
2021-12-14 17:12:47,629 # [ 2] 5B:EB:81:F1:87:F6 (random) [SCAN_IND] phy:1M-1M "undefined", adv_msg_cnt: 2, adv_int: 186338us, last_rssi: -76
> ble scan
2021-12-14 17:14:33,306 # ble adv_ext toto 0 2M
2021-12-14 17:14:33,310 # success: advertising this node as 'toto'
ble adv_ext toto 0 coded
examples/gnrc_networking full control, both ext_adv
2021-12-14 17:17:01,793 # ble scan
2021-12-14 17:17:01,795 # scanning (for 500ms) ...
bl2021-12-14 17:17:02,296 # done
2021-12-14 17:17:02,305 # [ 0] 5B:EB:81:F1:87:F6 (random) [SCAN_IND] phy:1M-1M "undefined", adv_msg_cnt: 1, adv_int: 0us, last_rssi: -80
2021-12-14 17:17:02,315 # [ 1] CA:5E:99:AE:11:63 (random) [EXT-CONN] phy:1M-2M "toto", adv_msg_cnt: 6, adv_int: 80027us, last_rssi: -61
2021-12-14 17:17:02,325 # [ 2] 49:31:50:2F:01:0F (random) [IND] phy:1M-1M "undefined", adv_msg_cnt: 1, adv_int: 0us, last_rssi: -69
2021-12-14 17:17:02,334 # [ 3] 66:3F:33:2C:0D:C4 (random) [SCAN_IND] phy:1M-1M "undefined", adv_msg_cnt: 1, adv_int: 0us, last_rssi: -67
2021-12-14 17:17:02,344 # [ 4] 50:65:EC:0A:9A:05 (random) [IND] phy:1M-1M "undefined", adv_msg_cnt: 1, adv_int: 0us, last_rssi: -78
2021-12-14 17:17:02,353 # [ 5] 6F:16:22:60:49:BA (random) [IND] phy:1M-1M "undefined", adv_msg_cnt: 1, adv_int: 0us, last_rssi: -83
> e connect CA:5E:99:AE:11:63
2021-12-14 17:17:07,722 # ble connect CA:5E:99:AE:11:63
2021-12-14 17:17:07,725 # Successfully connected 123
> 2021-12-14 17:17:07,869 # event: handle 0 -> CONNECTED as MASTER (CA:5E:99:AE:11:63)
ping6 fe80::ca5e:99ff:feae:1163
2021-12-14 17:17:10,546 # ping6 fe80::ca5e:99ff:feae:1163
2021-12-14 17:17:10,646 # 12 bytes from fe80::ca5e:99ff:feae:1163%8: icmp_seq=0 ttl=64 time=92.602 ms
2021-12-14 17:17:11,696 # 12 bytes from fe80::ca5e:99ff:feae:1163%8: icmp_seq=1 ttl=64 time=138.848 ms
2021-12-14 17:17:12,671 # 12 bytes from fe80::ca5e:99ff:feae:1163%8: icmp_seq=2 ttl=64 time=110.174 ms
2021-12-14 17:17:12,671 #
2021-12-14 17:17:12,676 # --- fe80::ca5e:99ff:feae:1163 PING statistics ---
2021-12-14 17:17:12,681 # 3 packets transmitted, 3 packets received, 0% packet loss
2021-12-14 17:17:12,685 # round-trip min/avg/max = 92.602/113.874/138.848 ms
> ping6 fe80::ca5e:99ff:feae:1163
2021-12-14 17:17:14,570 # ping6 fe80::ca5e:99ff:feae:1163
2021-12-14 17:17:14,696 # 12 bytes from fe80::ca5e:99ff:feae:1163%8: icmp_seq=0 ttl=64 time=118.426 ms
2021-12-14 17:17:15,821 # 12 bytes from fe80::ca5e:99ff:feae:1163%8: icmp_seq=1 ttl=64 time=240.024 ms
2021-12-14 17:17:16,721 # 12 bytes from fe80::ca5e:99ff:feae:1163%8: icmp_seq=2 ttl=64 time=137.268 ms
2021-12-14 17:17:16,721 #
2021-12-14 17:17:16,725 # --- fe80::ca5e:99ff:feae:1163 PING statistics ---
2021-12-14 17:17:16,730 # 3 packets transmitted, 3 packets received, 0% packet loss
2021-12-14 17:17:16,735 # round-trip min/avg/max = 118.426/165.239/240.024 ms
> ble disconnect
2021-12-14 17:17:23,465 # ble disconnect
2021-12-14 17:17:23,470 # unable to parse the command. Use 'ble help' for more help
> ble
2021-12-14 17:17:25,440 # ble
2021-12-14 17:17:25,447 # usage: ble [help|info|adv|adv_ext|adv_dir|scan|connect|close|update|chanmap]
> ble close
2021-12-14 17:17:27,856 # ble close
2021-12-14 17:17:27,860 # usage: ble close [help|list|<conn #>]
> ble close conn 0
2021-12-14 17:17:31,145 # ble close conn 0
2021-12-14 17:17:31,149 # success: connection tear down initiated
> 2021-12-14 17:17:31,193 # event: handle 0 -> CONNECTION CLOSED (CA:5E:99:AE:11:63)
scan
2021-12-14 17:17:41,761 # scan
2021-12-14 17:17:41,763 # shell: command not found: scan
> ble scan
2021-12-14 17:17:43,896 # ble scan
2021-12-14 17:17:43,898 # scanning (for 500ms) ...
2021-12-14 17:17:44,400 # done
2021-12-14 17:17:44,408 # [ 0] 61:0C:B1:44:80:28 (random) [IND] phy:1M-1M "undefined", adv_msg_cnt: 1, adv_int: 0us, last_rssi: -86
2021-12-14 17:17:44,418 # [ 1] CA:5E:99:AE:11:63 (random) [IND] phy:1M-1M "toto", adv_msg_cnt: 6, adv_int: 67048us, last_rssi: -62
2021-12-14 17:17:44,428 # [ 2] 5B:EB:81:F1:87:F6 (random) [SCAN_IND] phy:1M-1M "undefined", adv_msg_cnt: 2, adv_int: 188406us, last_rssi: -80
2021-12-14 17:17:44,438 # [ 3] 6F:16:22:60:49:BA (random) [IND] phy:1M-1M "undefined", adv_msg_cnt: 1, adv_int: 0us, last_rssi: -81
2021-12-14 17:17:44,448 # [ 4] 66:3F:33:2C:0D:C4 (random) [SCAN_IND] phy:1M-1M "undefined", adv_msg_cnt: 2, adv_int: 128211us, last_rssi: -67
> ble connect CA:5E:99:AE:11:63
2021-12-14 17:17:51,458 # ble connect CA:5E:99:AE:11:63
2021-12-14 17:17:51,461 # Successfully connected 123
> 2021-12-14 17:17:51,607 # event: handle 0 -> CONNECTED as MASTER (CA:5E:99:AE:11:63)
ping6 fe80::ca5e:99ff:feae:1163
2021-12-14 17:17:56,426 # ping6 fe80::ca5e:99ff:feae:1163
2021-12-14 17:17:56,559 # 12 bytes from fe80::ca5e:99ff:feae:1163%8: icmp_seq=0 ttl=64 time=125.568 ms
2021-12-14 17:17:57,534 # 12 bytes from fe80::ca5e:99ff:feae:1163%8: icmp_seq=1 ttl=64 time=97.757 ms
2021-12-14 17:17:58,584 # 12 bytes from fe80::ca5e:99ff:feae:1163%8: icmp_seq=2 ttl=64 time=144.666 ms
2021-12-14 17:17:58,584 #
2021-12-14 17:17:58,589 # --- fe80::ca5e:99ff:feae:1163 PING statistics ---
2021-12-14 17:17:58,594 # 3 packets transmitted, 3 packets received, 0% packet loss
2021-12-14 17:17:58,598 # round-trip min/avg/max = 97.757/122.663/144.666 ms
2021-12-14 17:16:59,194 # ble adv_ext toto 0 2M
2021-12-14 17:16:59,198 # success: advertising this node as 'toto'
> 2021-12-14 17:17:07,794 # event: handle 0 -> CONNECTED as SLAVE (EC:25:BC:59:48:68)
2021-12-14 17:17:31,193 # event: handle 0 -> CONNECTION ABORT (EC:25:BC:59:48:68)
ble adv toto 0
2021-12-14 17:17:39,705 # ble adv toto 0
2021-12-14 17:17:39,709 # success: advertising this node as 'toto'
> 2021-12-14 17:17:51,533 # event: handle 0 -> CONNECTED as SLAVE (EC:25:BC:59:48:68)
tests/nimble_netif_ext manual
2021-12-14 17:20:45,586 # ble adv_ext toto 1000 2M
2021-12-14 17:20:45,590 # success: advertising this node as 'toto'
> 2021-12-14 17:20:46,546 # event: handle 0 -> ACCEPT STOP (00:00:00:00:00:00)
ble adv_ext toto 10000 2M
2021-12-14 17:20:51,330 # ble adv_ext toto 10000 2M
2021-12-14 17:20:51,334 # success: advertising this node as 'toto'
> 2021-12-14 17:20:58,981 # event: handle 0 -> CONNECTED as SLAVE (EC:25:BC:59:48:68)
2021-12-14 17:20:53,968 # ble scan
2021-12-14 17:20:53,971 # scanning (for 500ms) ...
2021-12-14 17:20:54,472 # done
2021-12-14 17:20:54,481 # [ 0] 5B:EB:81:F1:87:F6 (random) [SCAN_IND] phy:1M-1M "undefined", adv_msg_cnt: 2, adv_int: 98998us, last_rssi: -80
2021-12-14 17:20:54,491 # [ 1] CA:5E:99:AE:11:63 (random) [EXT-CONN] phy:1M-2M "toto", adv_msg_cnt: 5, adv_int: 78974us, last_rssi: -55
2021-12-14 17:20:54,502 # [ 2] 66:3F:33:2C:0D:C4 (random) [SCAN_IND] phy:1M-1M "undefined", adv_msg_cnt: 2, adv_int: 127830us, last_rssi: -68
> ble connect CA:5E:99:AE:11:63
2021-12-14 17:20:58,899 # ble connect CA:5E:99:AE:11:63
2021-12-14 17:20:58,901 # Successfully connected 123
> 2021-12-14 17:20:59,056 # event: handle 0 -> CONNECTED as MASTER (CA:5E:99:AE:11:63)
ping6 fe80::ca5e:99ff:feae:1163
2021-12-14 17:21:03,666 # ping6 fe80::ca5e:99ff:feae:1163
2021-12-14 17:21:03,783 # 12 bytes from fe80::ca5e:99ff:feae:1163%6: icmp_seq=0 ttl=64 time=109.086 ms
2021-12-14 17:21:04,758 # 12 bytes from fe80::ca5e:99ff:feae:1163%6: icmp_seq=1 ttl=64 time=80.871 ms
2021-12-14 17:21:05,808 # 12 bytes from fe80::ca5e:99ff:feae:1163%6: icmp_seq=2 ttl=64 time=127.608 ms
2021-12-14 17:21:05,808 #
2021-12-14 17:21:05,812 # --- fe80::ca5e:99ff:feae:1163 PING statistics ---
2021-12-14 17:21:05,817 # 3 packets transmitted, 3 packets received, 0% packet loss
2021-12-14 17:21:05,822 # round-trip min/avg/max = 80.871/105.855/127.608 ms
tests/nimble_rpble_gnrc regression testl
2021-12-14 17:24:38,725 # main(): This is RIOT! (Version: 2022.01-devel-1242-g36bd3-pr-16860)
2021-12-14 17:24:38,728 # RPL-over-BLE Example Application
> ifconfig 6 add 2001:affe::1
2021-12-14 17:24:42,969 # ifconfig 6 add 2001:affe::1
2021-12-14 17:24:42,974 # success: added 2001:affe::1/64 to interface 6
> rpl root 123 2001:affe::1
2021-12-14 17:24:46,858 # rpl root 123 2001:affe::1
2021-12-14 17:24:46,861 # successfully added a new RPL DODAG
> 2021-12-14 17:24:50,350 # [ble_event] child added (EC:25:BC:59:48:68)
2021-12-14 17:24:50,443 # [ble_event] parent selected (CA:5E:99:AE:11:63)
ping6 2001:affe::1
2021-12-14 17:25:13,242 # ping6 2001:affe::1
2021-12-14 17:25:13,384 # 12 bytes from 2001:affe::1: icmp_seq=0 ttl=64 time=136.047 ms
2021-12-14 17:25:14,401 # 12 bytes from 2001:affe::1: icmp_seq=1 ttl=64 time=149.852 ms
2021-12-14 17:25:15,419 # 12 bytes from 2001:affe::1: icmp_seq=2 ttl=64 time=163.505 ms
2021-12-14 17:25:15,419 #
2021-12-14 17:25:15,422 # --- 2001:affe::1 PING statistics ---
2021-12-14 17:25:15,427 # 3 packets transmitted, 3 packets received, 0% packet loss
2021-12-14 17:25:15,432 # round-trip min/avg/max = 136.047/149.801/163.505 ms
tests/nimble_rpble_gnrc nimble_rpble_ext
2021-12-14 17:29:43,650 # main(): This is RIOT! (Version: 2022.01-devel-1242-g36bd3-pr-16860)
2021-12-14 17:29:43,651 # RPL-over-BLE Example Application
ifconfig 6 add 2001:affe::1
2021-12-14 17:30:51,898 # ifconfig 6 add 2001:affe::1
2021-12-14 17:30:51,903 # success: added 2001:affe::1/64 to interface 6
> rpl root 123 2001:affe::1
2021-12-14 17:30:55,194 # rpl root 123 2001:affe::1
2021-12-14 17:30:55,198 # successfully added a new RPL DODAG
> ble info
2021-12-14 17:31:07,761 # ble info
2021-12-14 17:31:07,766 # Own Address: CA:5E:99:AE:11:63 -> [FE80::CA5E:99FF:FEAE:1163]
2021-12-14 17:31:07,769 # Supported PHY modes: 1M 2M
2021-12-14 17:31:07,770 # Free slots: 2/3
2021-12-14 17:31:07,772 # Advertising: yes
2021-12-14 17:31:07,773 # Connections: 0
2021-12-14 17:31:07,774 # Slots:
2021-12-14 17:31:07,776 # [ 0] state: 0x0100 - advertising
2021-12-14 17:31:07,779 # [ 1] state: 0x8000 - unused
2021-12-14 17:31:07,782 # [ 2] state: 0x8000 - unused
2021-12-14 17:31:07,782 #
> 2021-12-14 17:31:08,908 # [ble_event] child added (EC:25:BC:59:48:68)
2021-12-14 17:29:43,686 # main(): This is RIOT! (Version: 2022.01-devel-1242-g36bd3-pr-16860)
2021-12-14 17:29:43,687 # RPL-over-BLE Example Application
> 2021-12-14 17:31:09,008 # [ble_event] parent selected (CA:5E:99:AE:11:63)
ble info
2021-12-14 17:31:10,953 # ble info
2021-12-14 17:31:10,958 # Own Address: EC:25:BC:59:48:68 -> [FE80::EC25:BCFF:FE59:4868]
2021-12-14 17:31:10,960 # Supported PHY modes: 1M 2M
2021-12-14 17:31:10,962 # Free slots: 1/3
2021-12-14 17:31:10,963 # Advertising: yes
2021-12-14 17:31:10,965 # Connections: 1
2021-12-14 17:31:10,971 # [ 0] CA:5E:99:AE:11:63 [FE80::CA5E:99FF:FEAE:1163] (M,100ms,1650ms,0,1M)
2021-12-14 17:31:10,976 # (role, conn itvl, superv. timeout, slave latency, PHY)
2021-12-14 17:31:10,977 # Slots:
2021-12-14 17:31:10,981 # [ 0] state: 0x0011 - GAP-master L2CAP-client
2021-12-14 17:31:10,984 # [ 1] state: 0x0100 - advertising
2021-12-14 17:31:10,986 # [ 2] state: 0x8000 - unused
2021-12-14 17:31:10,987 #
ping6 2001:affe::1
2021-12-14 17:33:47,674 # ping6 2001:affe::1
2021-12-14 17:33:47,801 # 12 bytes from 2001:affe::1: icmp_seq=0 ttl=64 time=121.600 ms
2021-12-14 17:33:48,801 # 12 bytes from 2001:affe::1: icmp_seq=1 ttl=64 time=118.436 ms
2021-12-14 17:33:49,801 # 12 bytes from 2001:affe::1: icmp_seq=2 ttl=64 time=115.125 ms
2021-12-14 17:33:49,801 #
2021-12-14 17:33:49,804 # --- 2001:affe::1 PING statistics ---
2021-12-14 17:33:49,809 # 3 packets transmitted, 3 packets received, 0% packet loss
2021-12-14 17:33:49,814 # round-trip min/avg/max = 115.125/118.387/121.600 ms
tests/nimble_statconn_gnrc regression test
2021-12-14 17:38:17,714 # ble info
2021-12-14 17:38:17,719 # Own Address: CA:5E:99:AE:11:63 -> [FE80::CA5E:99FF:FEAE:1163]
2021-12-14 17:38:17,722 # Supported PHY modes: 1M
2021-12-14 17:38:17,723 # Free slots: 3/3
2021-12-14 17:38:17,724 # Advertising: no
2021-12-14 17:38:17,726 # Connections: 0
2021-12-14 17:38:17,726 # Slots:
2021-12-14 17:38:17,729 # [ 0] state: 0x8000 - unused
2021-12-14 17:38:17,731 # [ 1] state: 0x8000 - unused
2021-12-14 17:38:17,734 # [ 2] state: 0x8000 - unused
2021-12-14 17:38:17,734 #
statconn adds EC:25:BC:59:48:68
2021-12-14 17:38:38,907 # statconn adds EC:25:BC:59:48:68
2021-12-14 17:38:38,911 # success: connecting to peer as master
> 2021-12-14 17:38:39,011 # [ble] CONNECTED master (0|EC:25:BC:59:48:68)
ble info
2021-12-14 17:38:41,665 # ble info
2021-12-14 17:38:41,670 # Own Address: CA:5E:99:AE:11:63 -> [FE80::CA5E:99FF:FEAE:1163]
2021-12-14 17:38:41,673 # Supported PHY modes: 1M
2021-12-14 17:38:41,674 # Free slots: 2/3
2021-12-14 17:38:41,676 # Advertising: no
2021-12-14 17:38:41,677 # Connections: 1
2021-12-14 17:38:41,683 # [ 0] EC:25:BC:59:48:68 [FE80::EC25:BCFF:FE59:4868] (M,75ms,2500ms,0,1M)
2021-12-14 17:38:41,689 # (role, conn itvl, superv. timeout, slave latency, PHY)
2021-12-14 17:38:41,689 # Slots:
2021-12-14 17:38:41,693 # [ 0] state: 0x0011 - GAP-master L2CAP-client
2021-12-14 17:38:41,696 # [ 1] state: 0x8000 - unused
2021-12-14 17:38:41,698 # [ 2] state: 0x8000 - unused
2021-12-14 17:38:41,698 #
> statconn addm CA:5E:99:AE:11:63
2021-12-14 17:38:29,371 # statconn addm CA:5E:99:AE:11:63
2021-12-14 17:38:29,374 # success: connecting to peer as slave
> 2021-12-14 17:38:38,937 # [ble] CONNECTED slave (0|CA:5E:99:AE:11:63)
ble info
2021-12-14 17:38:43,777 # ble info
2021-12-14 17:38:43,782 # Own Address: EC:25:BC:59:48:68 -> [FE80::EC25:BCFF:FE59:4868]
2021-12-14 17:38:43,784 # Supported PHY modes: 1M
2021-12-14 17:38:43,786 # Free slots: 2/3
2021-12-14 17:38:43,787 # Advertising: no
2021-12-14 17:38:43,789 # Connections: 1
2021-12-14 17:38:43,795 # [ 0] CA:5E:99:AE:11:63 [FE80::CA5E:99FF:FEAE:1163] (S,75ms,2500ms,0,1M)
2021-12-14 17:38:43,800 # (role, conn itvl, superv. timeout, slave latency, PHY)
2021-12-14 17:38:43,801 # Slots:
2021-12-14 17:38:43,805 # [ 0] state: 0x0022 - GAP-slave L2CAP-server
2021-12-14 17:38:43,807 # [ 1] state: 0x8000 - unused
2021-12-14 17:38:43,810 # [ 2] state: 0x8000 - unused
2021-12-14 17:38:43,810 #
> ping6 FE80::CA5E:99FF:FEAE:1163
2021-12-14 17:39:05,228 # ping6 FE80::CA5E:99FF:FEAE:1163
2021-12-14 17:39:05,338 # 12 bytes from fe80::ca5e:99ff:feae:1163%6: icmp_seq=0 ttl=64 time=103.509 ms
2021-12-14 17:39:06,388 # 12 bytes from fe80::ca5e:99ff:feae:1163%6: icmp_seq=1 ttl=64 time=149.927 ms
2021-12-14 17:39:07,363 # 12 bytes from fe80::ca5e:99ff:feae:1163%6: icmp_seq=2 ttl=64 time=121.734 ms
2021-12-14 17:39:07,364 #
2021-12-14 17:39:07,368 # --- FE80::CA5E:99FF:FEAE:1163 PING statistics ---
2021-12-14 17:39:07,373 # 3 packets transmitted, 3 packets received, 0% packet loss
2021-12-14 17:39:07,377 # round-trip min/avg/max = 103.509/125.056/149.927 ms
tests/nimble_statconn_gnrc ext adv ERROR
they are stuck in the connecting state2021-12-14 17:40:40,412 # main(): This is RIOT! (Version: 2022.01-devel-1242-g36bd3-pr-16860)
2021-12-14 17:40:40,413 # IPv6-over-BLE with statconn BLE connection manager
2021-12-14 17:40:40,413 # All up, running the shell now
statconn adds EC:25:BC:59:48:68
2021-12-14 17:41:08,811 # statconn adds EC:25:BC:59:48:68
2021-12-14 17:41:08,815 # success: connecting to peer as master
> ble info
2021-12-14 17:41:15,009 # ble info
2021-12-14 17:41:15,014 # Own Address: CA:5E:99:AE:11:63 -> [FE80::CA5E:99FF:FEAE:1163]
2021-12-14 17:41:15,017 # Supported PHY modes: 1M 2M
2021-12-14 17:41:15,018 # Free slots: 2/3
2021-12-14 17:41:15,020 # Advertising: no
2021-12-14 17:41:15,021 # Connections: 0
2021-12-14 17:41:15,022 # Slots:
2021-12-14 17:41:15,024 # [ 0] state: 0x4000 - connecting
2021-12-14 17:41:15,027 # [ 1] state: 0x8000 - unused
2021-12-14 17:41:15,029 # [ 2] state: 0x8000 - unused
2021-12-14 17:41:15,030 #
2021-12-14 17:41:00,593 # main(): This is RIOT! (Version: 2022.01-devel-1242-g36bd3-pr-16860)
2021-12-14 17:41:00,594 # IPv6-over-BLE with statconn BLE connection manager
2021-12-14 17:41:00,595 # All up, running the shell now
statconn addm CA:5E:99:AE:11:63
2021-12-14 17:41:09,499 # statconn addm CA:5E:99:AE:11:63
2021-12-14 17:41:09,503 # success: connecting to peer as slave
> ble info
2021-12-14 17:41:17,409 # ble info
2021-12-14 17:41:17,415 # Own Address: EC:25:BC:59:48:68 -> [FE80::EC25:BCFF:FE59:4868]
2021-12-14 17:41:17,417 # Supported PHY modes: 1M 2M
2021-12-14 17:41:17,419 # Free slots: 2/3
2021-12-14 17:41:17,420 # Advertising: yes
2021-12-14 17:41:17,421 # Connections: 0
2021-12-14 17:41:17,422 # Slots:
2021-12-14 17:41:17,425 # [ 0] state: 0x0100 - advertising
2021-12-14 17:41:17,427 # [ 1] state: 0x8000 - unused
2021-12-14 17:41:17,430 # [ 2] state: 0x8000 - unused
2021-12-14 17:41:17,430 #
tests/nimble_autoconn_gnrc ext adv ERROR
they are stuck in the advertising state2021-12-14 17:59:35,638 # Own Address: CA:5E:99:AE:11:63 -> [FE80::CA5E:99FF:FEAE:1163]
2021-12-14 17:59:35,641 # Supported PHY modes: 1M 2M
2021-12-14 17:59:35,642 # Free slots: 2/3
2021-12-14 17:59:35,644 # Advertising: yes
2021-12-14 17:59:35,645 # Connections: 0
2021-12-14 17:59:35,646 # Slots:
2021-12-14 17:59:35,649 # [ 0] state: 0x0100 - advertising
2021-12-14 17:59:35,651 # [ 1] state: 0x8000 - unused
2021-12-14 17:59:35,654 # [ 2] state: 0x8000 - unused
2021-12-14 17:59:35,654 #
2021-12-14 17:55:27,558 # Own Address: EC:25:BC:59:48:68 -> [FE80::EC25:BCFF:FE59:4868]
2021-12-14 17:55:27,560 # Supported PHY modes: 1M 2M
2021-12-14 17:55:27,562 # Free slots: 3/3
2021-12-14 17:55:27,563 # Advertising: no
2021-12-14 17:55:27,565 # Connections: 0
2021-12-14 17:55:27,565 # Slots:
2021-12-14 17:55:27,568 # [ 0] state: 0x8000 - unused
2021-12-14 17:55:27,570 # [ 1] state: 0x8000 - unused
2021-12-14 17:55:27,573 # [ 2] state: 0x8000 - unused
2021-12-14 17:55:27,573 #
tests/nimble_autoconn_gnrc regression
> 2021-12-14 18:01:01,449 # ble info
2021-12-14 18:01:01,454 # Own Address: EC:25:BC:59:48:68 -> [FE80::EC25:BCFF:FE59:4868]
2021-12-14 18:01:01,456 # Supported PHY modes: 1M
2021-12-14 18:01:01,458 # Free slots: 1/3
2021-12-14 18:01:01,459 # Advertising: yes
2021-12-14 18:01:01,461 # Connections: 1
2021-12-14 18:01:01,467 # [ 0] CA:5E:99:AE:11:63 [FE80::CA5E:99FF:FEAE:1163] (S,75ms,2500ms,0,1M)
2021-12-14 18:01:01,472 # (role, conn itvl, superv. timeout, slave latency, PHY)
2021-12-14 18:01:01,473 # Slots:
2021-12-14 18:01:01,477 # [ 0] state: 0x0022 - GAP-slave L2CAP-server
2021-12-14 18:01:01,480 # [ 1] state: 0x0100 - advertising
2021-12-14 18:01:01,482 # [ 2] state: 0x8000 - unused
2021-12-14 18:01:01,482 #
> ifconfig
2021-12-14 18:01:05,233 # ifconfig
2021-12-14 18:01:05,236 # Iface 6 HWaddr: EC:25:BC:59:48:68
2021-12-14 18:01:05,241 # L2-PDU:1280 MTU:1280 HL:64 RTR
2021-12-14 18:01:05,243 # 6LO IPHC
2021-12-14 18:01:05,246 # Source address length: 6
2021-12-14 18:01:05,248 # Link type: wireless
2021-12-14 18:01:05,254 # inet6 addr: fe80::ec25:bcff:fe59:4868 scope: link VAL
2021-12-14 18:01:05,257 # inet6 group: ff02::2
2021-12-14 18:01:05,260 # inet6 group: ff02::1
2021-12-14 18:01:05,263 # inet6 group: ff02::1:ff59:4868
2021-12-14 18:01:05,266 # inet6 group: ff02::1a
2021-12-14 18:01:05,267 #
> 2021-12-14 18:01:02,497 # ble info
2021-12-14 18:01:02,502 # Own Address: CA:5E:99:AE:11:63 -> [FE80::CA5E:99FF:FEAE:1163]
2021-12-14 18:01:02,504 # Supported PHY modes: 1M
2021-12-14 18:01:02,506 # Free slots: 1/3
2021-12-14 18:01:02,507 # Advertising: yes
2021-12-14 18:01:02,509 # Connections: 1
2021-12-14 18:01:02,515 # [ 0] EC:25:BC:59:48:68 [FE80::EC25:BCFF:FE59:4868] (M,75ms,2500ms,0,1M)
2021-12-14 18:01:02,520 # (role, conn itvl, superv. timeout, slave latency, PHY)
2021-12-14 18:01:02,521 # Slots:
2021-12-14 18:01:02,525 # [ 0] state: 0x0011 - GAP-master L2CAP-client
2021-12-14 18:01:02,528 # [ 1] state: 0x0100 - advertising
2021-12-14 18:01:02,530 # [ 2] state: 0x8000 - unused
2021-12-14 18:01:02,530 #
> ping6 fe80::ec25:bcff:fe59:4868
2021-12-14 18:01:09,635 # ping6 fe80::ec25:bcff:fe59:4868
2021-12-14 18:01:09,783 # 12 bytes from fe80::ec25:bcff:fe59:4868%6: icmp_seq=0 ttl=64 time=139.519 ms
2021-12-14 18:01:10,758 # 12 bytes from fe80::ec25:bcff:fe59:4868%6: icmp_seq=1 ttl=64 time=103.107 ms
2021-12-14 18:01:11,808 # 12 bytes from fe80::ec25:bcff:fe59:4868%6: icmp_seq=2 ttl=64 time=140.817 ms
2021-12-14 18:01:11,808 #
2021-12-14 18:01:11,812 # --- fe80::ec25:bcff:fe59:4868 PING statistics ---
2021-12-14 18:01:11,818 # 3 packets transmitted, 3 packets received, 0% packet loss
2021-12-14 18:01:11,822 # round-trip min/avg/max = 103.107/127.814/140.817 ms
If you find the issue and fix it, feel free to squash and trigger the ci, everything else LGTM |
@haukepetersen if you find time to take a look today it would be awesome! I'm off on vacation for the next month after today :) Otherwise, if you fixe it, and squash all my change requests have been addressed so don't hesitate to pinf someone like @kaspar030 for a quick ACK and merge :) |
Sorry for the delay, was mostly ill for the first weeks of the new year...
(same for the 1M mode)
2M mode (
@fjmolinas would you mind to check one more time on your end? I really wonder what could have happened that we get different results for the same code tree... |
Re-tested and all seems ok, what I think happened is that I didn't realize there was a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK! Please squash! right away the remaining nitpicks
tests/nimble_netif_ext/Makefile
Outdated
FEATURES_OPTIONAL += ble_phy_2mbit | ||
FEATURES_OPTIONAL += ble_phy_coded | ||
|
||
TEST_ON_CI_WHITELIST += nrf52dk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still pending
sys/shell/commands/sc_nimble_netif.c
Outdated
uint8_t phy_rx, phy_tx; | ||
res = ble_gap_read_le_phy(conn->gaphandle, &phy_tx, &phy_rx); | ||
if (res != 0) { | ||
phy_rx = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This as well is pending.
36bd34b
to
f57e813
Compare
Fixed minor issues that were still open and squashed. |
Do you want to run some tests again or this is ready to go @haukepetersen? Merge as you see better! |
Did a quick test since last push:
Lets go! |
Awesome to have this @haukepetersen thanks! |
Contribution description
This PR adds support for the additional BLE PHY modes that were introduced with Bluetooth 5, the 2Mbit mode as well as the Coded (long range) PHY mode.
To use these modes, extended advertisements are required by the Bluetooth standard. Once this mode is enabled in NimBLE, NimBLE switches to a different set of GAP API calls for scanning and connecting. To keep the
nimble_netif
API independent form these underlying API switches, two NImBLE-independent configuration structs used by thenimble_netif_connect()
andnimble_netif_accept()
are introduced. This waynimble_netif
can transparently used with or without enabling extended advertising mode (MYNEWT_VAL_BLE_EXT_ADV
).These small API changes to those 2 functions have the further advantage, that the API can be extended in the future without breaking it, again :-)
This PR is rebased on a bunch of fixes and foremost on the extended
nimble_scanner
PR, as the entirety of these changes is useful for testing and they all play together...Testing procedure
Run e.g.
gnrc_networking
on two boards with IP over BLE support. Use the build-in shell commands (ble adv
,ble_adv_ext
,ble_adv_dir
) to advertise in different modes, while using theble scan
shell command to verify the selected modes. Also establish connections between the nodes using different PHY modes, e.g.ble connect nodename 1000 CODED
NOTE: the Coded (long-range) PHY mode is not supported by the
nrf52832
line of CPUs...Issues/PRs references
rebased on top of
#16838, #16839, #16843, and #16859-> #16838, #16839, #16859 have been merged.EDIT: all dependencies have been merged.