Skip to content

drivers/at86rf215: Incorrect channel number set for subGHz #15906

@nagrawal63

Description

@nagrawal63

Description

Inside the at86rf215_reset_and_cfg() function, the channel number for subGHz radio is set to CONFIG_AT86RF215_DEFAULTL_SUBGHZ_CHANNEL(5) at the start of at86rf215_reset_and_cfg(dev) function but is later set to zero while initialising the modulation for the radio in _end_configure_OQPSK(dev).

This stops the user from using a channel number since _end_configure_OQPSK(dev) will always set the channel number to 0.

Steps to reproduce the issue

Run the basic gnrc_networking example and execute the command ifconfig on the shell to see the interface configuration.

Hardware used:
Board: nucleo-l476rg
Radio: at86rf215

Expected results

The channel number is set to the number in CONFIG_AT86RF215_DEFAULTL_SUBGHZ_CHANNEL (or a valid number is CONFIG_AT86RF215_DEFAULTL_SUBGHZ_CHANNEL isn't valid)

Actual results

2021-02-01 18:30:26,741 # Iface  6  HWaddr: 71:68  Channel: 0  Page: 2  NID: 0x23  PHY: O-QPSK 
2021-02-01 18:30:26,742 #           
2021-02-01 18:30:26,747 #           Long HWaddr: AA:C4:2A:8E:5E:47:F1:68 
2021-02-01 18:30:26,753 #            TX-Power: 0dBm  State: IDLE  max. Retrans.: 3  CSMA Retries: 4 
2021-02-01 18:30:26,760 #           AUTOACK  ACK_REQ  CSMA  L2-PDU:102  MTU:1280  HL:64  RTR  
2021-02-01 18:30:26,763 #           RTR_ADV  6LO  IPHC  
2021-02-01 18:30:26,766 #           Source address length: 8
2021-02-01 18:30:26,768 #           Link type: wireless
2021-02-01 18:30:26,774 #           inet6 addr: fe80::a8c4:2a8e:5e47:f168  scope: link  VAL
2021-02-01 18:30:26,781 #           inet6 addr: 2001:db8::a8c4:2a8e:5e47:f168  scope: global  TNT[3]
2021-02-01 18:30:26,784 #           inet6 group: ff02::2
2021-02-01 18:30:26,786 #           inet6 group: ff02::1
2021-02-01 18:30:26,790 #           inet6 group: ff02::1:ff47:f168
2021-02-01 18:30:26,791 #           
2021-02-01 18:30:26,794 #           Statistics for Layer 2
2021-02-01 18:30:26,797 #             RX packets 2  bytes 158
2021-02-01 18:30:26,801 #             TX packets 14 (Multicast: 8)  bytes 860
2021-02-01 18:30:26,805 #             TX succeeded 8 errors 6
2021-02-01 18:30:26,807 #           Statistics for IPv6
2021-02-01 18:30:26,810 #             RX packets 1  bytes 144
2021-02-01 18:30:26,816 #             TX packets 14 (Multicast: 8)  bytes 1104
2021-02-01 18:30:26,818 #             TX succeeded 14 errors 0

Versions

Operating System Environment
----------------------------
         Operating System: "Ubuntu" "18.04.5 LTS (Bionic Beaver)"
                   Kernel: Linux 4.15.0-135-generic x86_64 x86_64
             System shell: /bin/dash (probably dash)
             make's shell: /bin/dash (probably dash)

Installed compiler toolchains
-----------------------------
               native gcc: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
        arm-none-eabi-gcc: arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
                  avr-gcc: missing
         mips-mti-elf-gcc: missing
           msp430-elf-gcc: missing
       riscv-none-elf-gcc: missing
  riscv64-unknown-elf-gcc: missing
     riscv-none-embed-gcc: missing
     xtensa-esp32-elf-gcc: missing
   xtensa-esp8266-elf-gcc: missing
                    clang: clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)

Installed compiler libs
-----------------------
     arm-none-eabi-newlib: "3.1.0"
      mips-mti-elf-newlib: missing
        msp430-elf-newlib: missing
    riscv-none-elf-newlib: missing
riscv64-unknown-elf-newlib: missing
  riscv-none-embed-newlib: missing
  xtensa-esp32-elf-newlib: missing
xtensa-esp8266-elf-newlib: missing
                 avr-libc: missing (missing)

Installed development tools
---------------------------
                   ccache: ccache version 3.4.1
                    cmake: cmake version 3.19.1
                 cppcheck: Cppcheck 1.82
                  doxygen: 1.8.13
                      git: git version 2.17.1
                     make: GNU Make 4.1
                  openocd: Open On-Chip Debugger 0.10.0+dev-01089-g3bfe4926 (2020-02-24-15:06)
                   python: Python 2.7.17
                  python2: Python 2.7.17
                  python3: Python 3.6.9
                   flake8: error: /usr/bin/python3: No module named flake8
               coccinelle: missing

Metadata

Metadata

Labels

Area: networkArea: NetworkingType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions