Skip to content

xbee: port to gnrc_netif2#7898

Merged
miri64 merged 3 commits intoRIOT-OS:gnrc_netif2_integration/masterfrom
miri64:gnrc_netif2/feat/xbee
Nov 14, 2017
Merged

xbee: port to gnrc_netif2#7898
miri64 merged 3 commits intoRIOT-OS:gnrc_netif2_integration/masterfrom
miri64:gnrc_netif2/feat/xbee

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Oct 28, 2017

Ports xbee glue-code to gnrc_netif2

This PR is part of the network layer remodelling effort:
PR dependencies

@miri64 miri64 added GNRC Area: network Area: Networking Type: new feature The issue requests / The PR implemements a new feature for RIOT labels Oct 28, 2017
@miri64 miri64 requested a review from haukepetersen October 28, 2017 14:35
@miri64 miri64 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Nov 11, 2017
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 13, 2017

@aabadie, @haukepetersen currently not has the time to test this. Since I know that you also have some xbee shields: Can you test please?

@miri64 miri64 changed the base branch from master to gnrc_netif2_integration/master November 13, 2017 15:04
@miri64 miri64 force-pushed the gnrc_netif2/feat/xbee branch from b0a54ff to 9e1a5ee Compare November 13, 2017 15:06
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 13, 2017

Rebased to current #7925.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 14, 2017

Another day a another rebase.

@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Nov 14, 2017

Will test this morning

@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Nov 14, 2017

Tried to build the tests/driver_xbee and got a build failure:

sys/net/gnrc/link_layer/netdev/gnrc_netdev.c:128:5: error: implicit declaration of function 'gnrc_netif_add' [-Werror=implicit-function-declaration]
     gnrc_netif_add(thread_getpid());
     ^~~~~~~~~~~~~~

Tried to build the examples/gnrc_networking application (very optimistic) and got a kernel panic (with and without Xbee module loaded, so might not be related):

2017-11-14 10:48:11,451 - INFO # 0x4233
2017-11-14 10:48:11,453 - INFO # *** RIOT kernel panic:
2017-11-14 10:48:11,455 - INFO # FAILED ASSERTION.
2017-11-14 10:48:11,455 - INFO # 
2017-11-14 10:48:11,463 - INFO # 	pid | name                 | state    Q | pri | stack  ( used) | base addr  | current     
2017-11-14 10:48:11,471 - INFO # 	  - | isr_stack            | -        - |   - |    512 (  140) | 0x20000000 | 0x200001b8
2017-11-14 10:48:11,480 - INFO # 	  1 | idle                 | pending  Q |  15 |    256 (  152) | 0x20000584 | 0x200005ec 
2017-11-14 10:48:11,488 - INFO # 	  2 | main                 | bl mutex _ |   7 |   1536 (  264) | 0x20000684 | 0x20000b84 
2017-11-14 10:48:11,496 - INFO # 	  3 | pktdump              | bl rx    _ |   6 |   1536 (  244) | 0x20003560 | 0x20003a6c 
2017-11-14 10:48:11,505 - INFO # 	  4 | 6lo                  | bl rx    _ |   3 |   1024 (  304) | 0x20004174 | 0x20004444 
2017-11-14 10:48:11,513 - INFO # 	  5 | ipv6                 | bl rx    _ |   4 |   1024 (  276) | 0x200014d8 | 0x200017c4 
2017-11-14 10:48:11,521 - INFO # 	  6 | udp                  | bl rx    _ |   5 |   1024 (  280) | 0x200047bc | 0x20004aa4 
2017-11-14 10:48:11,530 - INFO # 	  7 | xbee                 | running  Q |   2 |   1024 (  624) | 0x20000d68 | 0x20000ffc 
2017-11-14 10:48:11,538 - INFO # 	  8 | RPL                  | bl rx    _ |   5 |   1024 (  204) | 0x20003bc8 | 0x20003efc 
2017-11-14 10:48:11,544 - INFO # 	    | SUM                  |            |     |   8960 ( 2488)
2017-11-14 10:48:11,545 - INFO # 
2017-11-14 10:48:11,545 - INFO # *** halted.
2017-11-14 10:48:11,545 - INFO # 

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 14, 2017

Fixed tests/driver_xbee. Can you build examples/gnrc_networking with -DDEBUG_ASSERT_VERBOSE set in CFLAGS and report which line is failing, please?

USEMODULE += xbee
USEMODULE += gnrc_netif
USEMODULE += gnrc_txtsnd
USEMODULE += gnrc_netdev
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it builds but ends up after in a kernel panic:

2017-11-14 10:52:17,684 - INFO # 0x3b83
2017-11-14 10:52:17,686 - INFO # *** RIOT kernel panic:
2017-11-14 10:52:17,687 - INFO # FAILED ASSERTION.
2017-11-14 10:52:17,688 - INFO # 
2017-11-14 10:52:17,688 - INFO # *** halted.
2017-11-14 10:52:17,689 - INFO #

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is not a kernel panic, but again a failed assertion. It would be really helpful if you would compile with CFLAGS=-DDEBUG_ASSERT_VERBOSE, because that would give you file and line of the failed assertion ;-)

Copy link
Copy Markdown
Contributor

@aabadie aabadie Nov 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have this:

sys/net/gnrc/netif2/gnrc_netif2.c:1075 => 0xbbd
2017-11-14 11:00:41,442 - INFO # *** RIOT kernel panic:
2017-11-14 11:00:41,443 - INFO # FAILED ASSERTION.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for both driver_xbee and gnrc_networking applications

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Got my hands on an XBee now, will see if I can find the issue

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 14, 2017

@aabadie last commit should fix it. Tested with tests/drivers_xbee on nucleo144-f746 vs examples/default on samr21-xpro in various configurations (different channels, PAN IDs, address lengths etc.).

@miri64 miri64 force-pushed the gnrc_netif2/feat/xbee branch from c4d1057 to 7d94d5d Compare November 14, 2017 11:01
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 14, 2017

Rebased.

Copy link
Copy Markdown
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with arduino-zero, works. The Murdock error seems unrelated.

ACK

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 14, 2017

The Murdock error seems unrelated.

Yes, that should be fixed with #7414 and #7462 (@aabadie do you maybe have time to review that or the ability to poke @kYc0o about that?).

@miri64 miri64 merged commit 30f9cac into RIOT-OS:gnrc_netif2_integration/master Nov 14, 2017
@miri64 miri64 deleted the gnrc_netif2/feat/xbee branch November 14, 2017 12:52
@aabadie aabadie added this to the Release 2018.01 milestone Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants