Skip to content
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

xbee: setting PAN ID sometimes fails #10338

Open
miri64 opened this issue Nov 6, 2018 · 7 comments
Open

xbee: setting PAN ID sometimes fails #10338

miri64 opened this issue Nov 6, 2018 · 7 comments
Assignees
Labels
Area: drivers Area: Device drivers Area: network Area: Networking State: don't stale State: Tell state-bot to ignore this issue Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@miri64
Copy link
Member

miri64 commented Nov 6, 2018

Description

While testing arduino-zero+xbee to samr21-xpro communication during the testing phase of 2018.10 I noticed, that sometimes the initialization of the network interface fails. To check what happened I used the DEBUG output and it apears to be an issue in the PAN ID initialization:

[xbee] AT_CMD: +++
[xbee] AT_CMD: ATMM2
[xbee] AT_CMD: ATAP1
[xbee] AT_CMD: ATAC
[xbee] AT_CMD: ATCN
[xbee] AT_CMD: SH
[xbee] AT_CMD: SL
[xbee] AT_CMD: CH�
[xbee] AT_CMD: ID
[xbee] api_at_cmd: response timeout
[xbee] init: error setting PAN ID
gnrc_netif: netdev init failed: -5

(CH also seems to be somewhat errorneous, as it prints a non-ASCII symbol)

I'm not 100% sure, but I think it happens if a reset happens while the device is sending something, but I also saw it directly on the first initialization after flash.

Would be great (or not so great for our stability) if someone can check if that also happens with xbee on other boards than arduino-zero.

Steps to reproduce the issue

Use a board (preferrably to make it easier one without a radio) and attach an xbee shield (e.g. arduino-zero in IoT-LAB. Compile gnrc_networking with the xbee module and flash it to the board and open the terminal. Try to reset several times, sometimes it works quite stable.

Expected results

Always reset to a workable state.

Actual results

Sometimes you will see the gnrc_netif: netdev init failed: -5 message shown above (or if you miss it, you won't be able to use the shell, since it isn't initialized due to the error).

Versions

IoT-LAB's arduino-zero + my local setup:

Operating System Environment
-----------------------------
       Operating System: "Ubuntu" "16.04.5 LTS (Xenial Xerus)"
                 Kernel: Linux 4.4.0-138-generic x86_64 x86_64

Installed compiler toolchains
-----------------------------
             native gcc: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
      arm-none-eabi-gcc: arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2018-q3-update) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]
                avr-gcc: avr-gcc (GCC) 4.9.2
       mips-mti-elf-gcc: mips-mti-elf-gcc (Codescape GNU Tools 2016.05-03 for MIPS MTI Bare Metal) 4.9.2
             msp430-gcc: msp430-gcc (GCC) 4.6.3 20120301 (mspgcc LTS 20120406 unpatched)
   riscv-none-embed-gcc: riscv-none-embed-gcc (GNU MCU Eclipse RISC-V Embedded GCC, 64-bits) 7.2.0
                  clang: clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)

Installed compiler libs
-----------------------
   arm-none-eabi-newlib: "3.0.0"
    mips-mti-elf-newlib: "2.1.0"
riscv-none-embed-newlib: "2.5.0"
               avr-libc: "1.8.0svn" ("20111229")

Installed development tools
---------------------------
                  cmake: cmake version 3.12.0
               cppcheck: Cppcheck 1.72
                doxygen: 1.8.11
                 flake8: 2.5.4 (pep8: 1.7.0, pyflakes: 1.1.0, mccabe: 0.2.1) CPython 3.5.2 on Linux
                    git: git version 2.7.4
                openocd: Open On-Chip Debugger 0.10.0+dev-00207-g4109263 (2017-11-02-16:35)
                 python: Python 2.7.12
                python2: Python 2.7.12
                python3: Python 3.5.2
             coccinelle: spatch version 1.0.4 with Python support and with PCRE support
@miri64 miri64 added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Nov 6, 2018
@miri64 miri64 added Area: network Area: Networking Area: drivers Area: Device drivers labels Nov 6, 2018
@stale
Copy link

stale bot commented Aug 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label Aug 10, 2019
@miri64 miri64 added State: don't stale State: Tell state-bot to ignore this issue and removed State: stale State: The issue / PR has no activity for >185 days labels Aug 10, 2019
@miri64 miri64 added this to the Release 2020.07 milestone Jul 2, 2020
@miri64
Copy link
Member Author

miri64 commented Jul 2, 2020

@fjmolinas do you know if #13224 maybe has fixed that as well?

@fjmolinas
Copy link
Contributor

I'll try to reproduce, was this easy to reproduce at the time?

@fjmolinas
Copy link
Contributor

I still get non ASCII characters sometimes

> [xbee] AT_CMD: +++
[xbee] AT_CMD: ATMM2
[xbee] AT_CMD: ATAP1
[xbee] init: WARNING if using an arduino BOARD + arduino xbee shield with ICSP connector, hardware flow control can't be used since CTS pin is connected to ICSP RESET pin
[xbee] AT_CMD: ATD6 0
[xbee] AT_CMD: ATD7 0
[xbee] AT_CMD: ATAC
[xbee] AT_CMD: ATCN
[xbee] AT_CMD: SH
[xbee] AT_CMD: SL
[xbee] AT_CMD: CH
[xbee] AT_CMD: ID
[xbee] init: Initialization successful
[xbee] AT_CMD: MYD

But I have reseted and flashed multiple times and it succeeds every time.

@fjmolinas
Copy link
Contributor

This is a local test, not over iot-lab.

@miri64
Copy link
Member Author

miri64 commented Jul 3, 2020

Ok, non-ASCII chars I consider not in the scope of this PR, so I consider this fixed.

@miri64 miri64 closed this as completed Jul 3, 2020
@fjmolinas
Copy link
Contributor

I'm re-opening this since I saw it again during release testing, maybe having debugging enabled somehow affected the initial result, but I got gnrc_netif: netdev init failed: -5 message a couple of times when running 04-single-hop-6lowpan-icmp task 07-08 . I'll try to debug this again.

@fjmolinas fjmolinas reopened this Jul 16, 2020
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers Area: network Area: Networking State: don't stale State: Tell state-bot to ignore this issue Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

6 participants