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

slipdev: provide stdio multiplexing over SLIP #10480

Merged
merged 7 commits into from
Mar 6, 2020

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Nov 27, 2018

Contribution description

This introduces SLIPMUX like stdio multiplexing to slipdev. It can be used in conjunction with sliptty from #10477.

Testing procedure

Test border router application with USEMODULE += slipdev_stdio instead of stdio_ethos with both sliptty and tunslip. Both still should work. Also apply the testing procedures from #10477.

Also try to use tunslip with just slipdev (without slipdev_stdio). It should still work as well (just without stdio).

Issues/PRs references

Requires #10477 for interaction with Linux machine

@miri64 miri64 added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking Area: drivers Area: Device drivers labels Nov 27, 2018
@RIOT-OS RIOT-OS deleted a comment Nov 28, 2018
@jnohlgard
Copy link
Member

Tested gnrc_border_router together with #10477, and it seems to be working well. There is a problem when the Linux host has no global IPv6 address configured which messes up the return routing, see #10477 (comment)

@miri64
Copy link
Member Author

miri64 commented Jan 24, 2019

Rebased to current master.

@miri64
Copy link
Member Author

miri64 commented Jun 6, 2019

Rebased to current master.

@stale
Copy link

stale bot commented Dec 8, 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 Dec 8, 2019
@miri64 miri64 removed the State: stale State: The issue / PR has no activity for >185 days label Dec 8, 2019
@miri64
Copy link
Member Author

miri64 commented Feb 25, 2020

Rebased to current master. I think it still needs adaptation for the current stdio model.

@miri64
Copy link
Member Author

miri64 commented Feb 25, 2020

Adapted to current master

@benpicco
Copy link
Contributor

benpicco commented Mar 3, 2020

You can also remove examples/gcoap/slipdev_params.h and tests/slip/slipdev_params.h

@benpicco
Copy link
Contributor

benpicco commented Mar 5, 2020

With SLIP_BAUDRATE=2000000 stdin suffers

ifconfig
ifcfig
shell: command not found: ifcfig
> ifconfig
ifcfig
shell: command not found: ifcfig
> ifcoonnfig
ifcnnfig
shell: command not found: ifcnnfig
> ifcooonfig
ifconfig
Iface  7 
          MTU:65535  HL:64  RTR  
          RTR_ADV  
          Link type: wired
          inet6 addr: fe80::2  scope: link  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ff00:2
          
Iface  6  HWaddr: 71:A1  Channel: 26  Page: 0  NID: 0x23
          Long HWaddr: 5A:06:59:C9:2C:36:7D:78 
           TX-Power: 0dBm  State: IDLE  max. Retrans.: 3  CSMA Retries: 4 
          AUTOACK  ACK_REQ  CSMA  L2-PDU:102 MTU:1280  HL:64  RTR  
          RTR_ADV  6LO  IPHC  
          Source address length: 8
          Link type: wireless
          inet6 addr: fe80::5806:59c9:2c36:7d78  scope: link  VAL
          inet6 addr: 2001:db8::5806:59c9:2c36:7d78  scope: global  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ff36:7d78

but IP operation (e.g. ping -f) remains stable.

@miri64
Copy link
Member Author

miri64 commented Mar 5, 2020

The input fd is handled last by the sliptty tool. That might be the reason for the priorisation.

@miri64
Copy link
Member Author

miri64 commented Mar 5, 2020

Note to self fd6c880 is titled wrong.

@miri64
Copy link
Member Author

miri64 commented Mar 5, 2020

The input fd is handled last by the sliptty tool. That might be the reason for the priorisation.

Oh wait, did you mean there is loss without any load?

@miri64
Copy link
Member Author

miri64 commented Mar 5, 2020

If yes, does the same happen for stdio_uart?

@miri64
Copy link
Member Author

miri64 commented Mar 5, 2020

Interesting observation (not sure it has anything to do with this): all letters of ifconfig start with a 0x6 nibble (the signifyer for an IPv6 packet):

In [5]: [hex(ord(a)) for a in "ifconfig"]                                                                                                                                                                                             
Out[5]: ['0x69', '0x66', '0x63', '0x6f', '0x6e', '0x66', '0x69', '0x67']

@benpicco
Copy link
Contributor

benpicco commented Mar 5, 2020

If yes, does the same happen for stdio_uart?

Yes, also happens in gnrc_networking with CFLAGS += -DSTDIO_UART_BAUDRATE=2000000, so this is unrelated.

@benpicco
Copy link
Contributor

benpicco commented Mar 5, 2020

Please squash!

@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 5, 2020
@miri64
Copy link
Member Author

miri64 commented Mar 6, 2020

Squashed

@miri64
Copy link
Member Author

miri64 commented Mar 6, 2020

Fixed travis errors and squashed.

@miri64
Copy link
Member Author

miri64 commented Mar 6, 2020

And fixed compile time errors.

@miri64 miri64 merged commit 16937d0 into RIOT-OS:master Mar 6, 2020
@miri64 miri64 deleted the slipdev/feat/stdio branch March 6, 2020 08:30
@miri64
Copy link
Member Author

miri64 commented Mar 6, 2020

(maybe we should add the same hack we use for start_network.sh for SLIP as we have for ethos, to add a global address to the loopback interface sweat_smile)

See #13572.

@leandrolanzieri leandrolanzieri added this to the Release 2020.04 milestone Mar 13, 2020
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 CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants