[riot-notifications] [RIOT-OS/RIOT] drivers/at86rf2xx: add support for high data rates (#14046)

benpicco notifications at github.com
Sat May 9 01:31:57 CEST 2020



<!--
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
-->

### Contribution description

AT86RF2xx supports high data rates in O-QPSK mode.
This is a proprietary feature, so data rates > 0 are only supported by other AT86RF2xx devices.

 high_rate 0:   250 kbit/s (IEEE mode)
 high_rate 1:   500 kbit/s
 high_rate 2:  1000 kbit/s (compatible with at86rf215)
 high_rate 3:  2000 kbit/s

### Testing procedure

You can configure the high date rates with `ifconfig`:

```
> ifconfig 7 set high_rate 2
2020-05-09 01:26:00,636 # Iface  7  HWaddr: 71:A1  Channel: 26  Page: 0  NID: 0x23  PHY: O-QPSK 
2020-05-09 01:26:00,639 #            high data rate: 2 
2020-05-09 01:26:00,643 #           Long HWaddr: 5A:06:59:C9:2C:36:7D:78 
2020-05-09 01:26:00,650 #            TX-Power: 0dBm  State: IDLE  max. Retrans.: 3  CSMA Retries: 4 
2020-05-09 01:26:00,657 #           AUTOACK  ACK_REQ  CSMA  L2-PDU:102 MTU:1280  HL:64  RTR  
2020-05-09 01:26:00,659 #           6LO  IPHC  
2020-05-09 01:26:00,662 #           Source address length: 8
2020-05-09 01:26:00,665 #           Link type: wireless
2020-05-09 01:26:00,671 #           inet6 addr: fe80::5806:59c9:2c36:7d78  scope: link  VAL
2020-05-09 01:26:00,674 #           inet6 group: ff02::2
2020-05-09 01:26:00,676 #           inet6 group: ff02::1
2020-05-09 01:26:00,681 #           inet6 group: ff02::1:ff36:7d78
2020-05-09 01:26:00,682 #           
2020-05-09 01:26:00,684 #           Statistics for Layer 2
2020-05-09 01:26:00,687 #             RX packets 11  bytes 473
2020-05-09 01:26:00,693 #             TX packets 16 (Multicast: 16)  bytes 688
2020-05-09 01:26:00,695 #             TX succeeded 16 errors 0
2020-05-09 01:26:00,698 #           Statistics for IPv6
2020-05-09 01:26:00,701 #             RX packets 11  bytes 704
2020-05-09 01:26:00,706 #             TX packets 16 (Multicast: 16)  bytes 1024
2020-05-09 01:26:00,710 #             TX succeeded 16 errors 0
```

You can do the same on a device with the `at86rf215` driver. There this feature is also implemented, but the chip only supports one high data rate mode - any value other than 0 will enable it, so you can also do

```
> ifconfig 8 set high_rate 2
2020-05-09 01:28:20,449 # Iface  8  HWaddr: 01:55  Channel: 26  Page: 0  NID: 0x23  PHY: O-QPSK 
2020-05-09 01:28:20,452 #            high data rate: 1 
2020-05-09 01:28:20,456 #           Long HWaddr: 1A:F9:8F:5F:30:5D:05:8C 
2020-05-09 01:28:20,463 #            TX-Power: 0dBm  State: IDLE  max. Retrans.: 3  CSMA Retries: 4 
2020-05-09 01:28:20,469 #           AUTOACK  ACK_REQ  CSMA  L2-PDU:102 MTU:1280  HL:64  RTR  
2020-05-09 01:28:20,471 #           6LO  IPHC  
2020-05-09 01:28:20,474 #           Source address length: 8
2020-05-09 01:28:20,477 #           Link type: wireless
2020-05-09 01:28:20,482 #           inet6 addr: fe80::18f9:8f5f:305d:58c  scope: link  VAL
2020-05-09 01:28:20,485 #           inet6 group: ff02::2
2020-05-09 01:28:20,488 #           inet6 group: ff02::1
2020-05-09 01:28:20,491 #           inet6 group: ff02::1:ff5d:58c
2020-05-09 01:28:20,492 #           
2020-05-09 01:28:20,495 #           Statistics for Layer 2
2020-05-09 01:28:20,498 #             RX packets 29  bytes 1184
2020-05-09 01:28:20,503 #             TX packets 34 (Multicast: 25)  bytes 1399
2020-05-09 01:28:20,507 #             TX succeeded 34 errors 0
2020-05-09 01:28:20,509 #           Statistics for IPv6
2020-05-09 01:28:20,515 #             RX packets 29  bytes 1748
2020-05-09 01:28:20,517 #             TX packets 34 (Multicast: 25)  bytes 2068
2020-05-09 01:28:20,520 #             TX succeeded 34 errors 0
```

The two nodes can now ping each other, slightly faster than before:

```
2020-05-09 01:29:54,228 #  ping6 fe80::18f9:8f5f:305d:58c -s 64
2020-05-09 01:29:54,249 # 72 bytes from fe80::18f9:8f5f:305d:58c%7: icmp_seq=0 ttl=64 rssi=-49 dBm time=12.264 ms
2020-05-09 01:29:55,250 # 72 bytes from fe80::18f9:8f5f:305d:58c%7: icmp_seq=1 ttl=64 rssi=-49 dBm time=10.998 ms
2020-05-09 01:29:56,252 # 72 bytes from fe80::18f9:8f5f:305d:58c%7: icmp_seq=2 ttl=64 rssi=-50 dBm time=10.979 ms
2020-05-09 01:29:56,253 # 
2020-05-09 01:29:56,257 # --- fe80::18f9:8f5f:305d:58c PING statistics ---
2020-05-09 01:29:56,262 # 3 packets transmitted, 3 packets received, 0% packet loss
2020-05-09 01:29:56,269 # round-trip min/avg/max = 10.979/11.413/12.264 ms
2020-05-09 01:30:00,723 #  ifconfig 7 set high_rate 2
2020-05-09 01:30:00,727 # success: set high rate on interface 7 to 2
2020-05-09 01:30:07,668 #  ping6 fe80::18f9:8f5f:305d:58c -s 64
2020-05-09 01:30:07,683 # 72 bytes from fe80::18f9:8f5f:305d:58c%7: icmp_seq=0 ttl=64 rssi=-53 dBm time=5.580 ms
2020-05-09 01:30:08,685 # 72 bytes from fe80::18f9:8f5f:305d:58c%7: icmp_seq=1 ttl=64 rssi=-45 dBm time=6.207 ms
2020-05-09 01:30:09,687 # 72 bytes from fe80::18f9:8f5f:305d:58c%7: icmp_seq=2 ttl=64 rssi=-43 dBm time=6.515 ms
2020-05-09 01:30:09,688 # 
2020-05-09 01:30:09,692 # --- fe80::18f9:8f5f:305d:58c PING statistics ---
2020-05-09 01:30:09,697 # 3 packets transmitted, 3 packets received, 0% packet loss
```

### Issues/PRs references

<!--
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
-->

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/14046

-- Commit Summary --

  * drivers/at86rf2xx: add support for high data rates

-- File Changes --

    M drivers/Makefile.dep (1)
    M drivers/at86rf2xx/at86rf2xx_getset.c (42)
    M drivers/at86rf2xx/at86rf2xx_netdev.c (27)
    M drivers/include/at86rf2xx.h (33)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/14046.patch
https://github.com/RIOT-OS/RIOT/pull/14046.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/14046
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200508/85ed8384/attachment-0001.htm>


More information about the notifications mailing list