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

make term output is inconsistent between boards, ethos and native #12108

Closed
cladmi opened this issue Aug 28, 2019 · 7 comments
Closed

make term output is inconsistent between boards, ethos and native #12108

cladmi opened this issue Aug 28, 2019 · 7 comments
Assignees
Labels
Area: tools Area: Supplementary tools Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@cladmi
Copy link
Contributor

cladmi commented Aug 28, 2019

Description

The behavior of the terminal is inconsistent with native and ethos compared to a normal board.

The output is missing the timestamping, typing an empty line does not repeat the last command as expected and there is no command history.

Steps to reproduce the issue

Execute default example with native, and examples/gnrc_border_router with a samr21-xpro and type a command, an empty line, and try to get back in history.

I typed 'help+enter', 'enter', 'up+enter'.

Expected results

It should have the same behavior as using examples-default with samr21-xpro.

BOARD=samr21-xpro RIOT_CI_BUILD=1 make --no-print-directory -C examples/default/ flash term
BOARD=samr21-xpro RIOT_CI_BUILD=1 make --no-print-directory -C examples/default/ flash term
Building application "default" for "samr21-xpro" with MCU "samd21".

   text    data     bss     dec     hex filename
  40864     508    6048   47420    b93c /home/harter/work/git/RIOT/examples/default/bin/samr21-xpro/default.elf
/home/harter/work/git/RIOT/dist/tools/edbg/edbg  -t atmel_cm0p -b -v -p -f /home/harter/work/git/RIOT/examples/default/bin/samr21-xpro/default.bin
Debugger: ATMEL EDBG CMSIS-DAP ATML2127031800004678 01.1A.00FB (S)
Clock frequency: 16.0 MHz
Target: SAM R21G18 (Rev C)
Programming..................................................................................................................................................................... done.
Verification..................................................................................................................................................................... done.
/home/harter/work/git/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200" 
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2019-08-28 18:07:19,903 - INFO # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
help
2019-08-28 18:07:23,348 - INFO # help
2019-08-28 18:07:23,351 - INFO # Command              Description
2019-08-28 18:07:23,354 - INFO # ---------------------------------------
2019-08-28 18:07:23,357 - INFO # reboot               Reboot the node
2019-08-28 18:07:23,363 - INFO # ps                   Prints information about running threads.
2019-08-28 18:07:23,367 - INFO # random_init          initializes the PRNG
2019-08-28 18:07:23,372 - INFO # random_get           returns 32 bit of pseudo randomness
2019-08-28 18:07:23,377 - INFO # rtc                  control RTC peripheral interface
2019-08-28 18:07:23,381 - INFO # ifconfig             Configure network interfaces
2019-08-28 18:07:23,387 - INFO # txtsnd               Sends a custom string as is over the link layer
2019-08-28 18:07:23,393 - INFO # saul                 interact with sensors and actuators using SAUL
> 
2019-08-28 18:07:24,083 - INFO #  help
2019-08-28 18:07:24,086 - INFO # Command              Description
2019-08-28 18:07:24,090 - INFO # ---------------------------------------
2019-08-28 18:07:24,093 - INFO # reboot               Reboot the node
2019-08-28 18:07:24,099 - INFO # ps                   Prints information about running threads.
2019-08-28 18:07:24,102 - INFO # random_init          initializes the PRNG
2019-08-28 18:07:24,108 - INFO # random_get           returns 32 bit of pseudo randomness
2019-08-28 18:07:24,112 - INFO # rtc                  control RTC peripheral interface
2019-08-28 18:07:24,117 - INFO # ifconfig             Configure network interfaces
2019-08-28 18:07:24,123 - INFO # txtsnd               Sends a custom string as is over the link layer
2019-08-28 18:07:24,129 - INFO # saul                 interact with sensors and actuators using SAUL
> help
2019-08-28 18:07:29,087 - INFO #  help
2019-08-28 18:07:29,089 - INFO # Command              Description
2019-08-28 18:07:29,093 - INFO # ---------------------------------------
2019-08-28 18:07:29,096 - INFO # reboot               Reboot the node
2019-08-28 18:07:29,102 - INFO # ps                   Prints information about running threads.
2019-08-28 18:07:29,106 - INFO # random_init          initializes the PRNG
2019-08-28 18:07:29,111 - INFO # random_get           returns 32 bit of pseudo randomness
2019-08-28 18:07:29,116 - INFO # rtc                  control RTC peripheral interface
2019-08-28 18:07:29,120 - INFO # ifconfig             Configure network interfaces
2019-08-28 18:07:29,126 - INFO # txtsnd               Sends a custom string as is over the link layer
2019-08-28 18:07:29,132 - INFO # saul                 interact with sensors and actuators using SAUL
> 

Actual results

I used 'gnrc_networking' for native as 'default' dumps a lot of packets outputs

BOARD=native RIOT_CI_BUILD=1 make --no-print-directory -C examples/gnrc_networking flash term
./dist/tools/tapsetup/tapsetup 
creating tapbr0
creating tap0
creating tap1
BOARD=native RIOT_CI_BUILD=1 make --no-print-directory -C examples/gnrc_networking flash term
Building application "gnrc_networking" for "native" with MCU "native".

   text    data     bss     dec     hex filename
 241500    1176  102696  345372   5451c /home/harter/work/git/RIOT/examples/gnrc_networking/bin/native/gnrc_networking.elf
true 
/home/harter/work/git/RIOT/examples/gnrc_networking/bin/native/gnrc_networking.elf tap0 
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: buildtest)
RIOT network stack example application
All up, running the shell now
> help
help
Command              Description
---------------------------------------
udp                  send data over UDP and listen on UDP ports
reboot               Reboot the node
ps                   Prints information about running threads.
ping6                Ping via ICMPv6
random_init          initializes the PRNG
random_get           returns 32 bit of pseudo randomness
nib                  Configure neighbor information base
ifconfig             Configure network interfaces
rpl                  rpl configuration tool ('rpl help' for more information)
> 

> ^[[A
shell: command not found: [A
> 
BOARD=samr21-xpro RIOT_CI_BUILD=1 make --no-print-directory -C examples/gnrc_border_router/ flash term
BOARD=samr21-xpro RIOT_CI_BUILD=1 make --no-print-directory -C examples/gnrc_border_router/ flash term
Building application "gnrc_border_router" for "samr21-xpro" with MCU "samd21".

   text    data     bss     dec     hex filename
  82564     516   22576  105656   19cb8 /home/harter/work/git/RIOT/examples/gnrc_border_router/bin/samr21-xpro/gnrc_border_router.elf
/home/harter/work/git/RIOT/dist/tools/edbg/edbg  -t atmel_cm0p -b -v -p -f /home/harter/work/git/RIOT/examples/gnrc_border_router/bin/samr21-xpro/gnrc_border_router.bin
Debugger: ATMEL EDBG CMSIS-DAP ATML2127031800004678 01.1A.00FB (S)
Clock frequency: 16.0 MHz
Target: SAM R21G18 (Rev C)
Programming...............................................................................................................................................................................................................................................................................
......................................................... done.
Verification..............................................................................................................................................................................................................................................................................
.......................................................... done.
make -C ethos
make[2]: Nothing to be done for 'all'.
make -C uhcpd
make[2]: Nothing to be done for 'all'.
sudo sh /home/harter/work/git/RIOT/dist/tools/ethos/start_network.sh /dev/ttyACM0 tap0 2001:db8::/64
net.ipv6.conf.tap0.forwarding = 1
net.ipv6.conf.tap0.accept_ra = 0
----> ethos: sending hello.
----> ethos: activating serial pass through.
----> ethos: hello reply received
gnrc_uhcpc: Using 7 as border interface and 6 as wireless interface.
uhcp_client(): sending REQ...
udp_sendto(): sendto(): Cannot assign requested address
main(): This is RIOT! (Version: buildtest)
RIOT border router example application
All up, running the shell now
> help
help
Command              Description
---------------------------------------
reboot               Reboot the node
ps                   Prints information about running threads.
ping6                Ping via ICMPv6
random_init          initializes the PRNG
random_get           returns 32 bit of pseudo randomness
nib                  Configure neighbor information base
ifconfig             Configure network interfaces
fibroute             Manipulate the FIB (info: 'fibroute [add|del]')
6ctx                 6LoWPAN context configuration tool
> 

> ^[[A
shell: command not found: [A
> 

Versions

Current master, so 2019-07.

@jcarrano jcarrano added Area: tools Area: Supplementary tools Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Aug 28, 2019
@miri64
Copy link
Member

miri64 commented Aug 28, 2019

There was some initial work towards that done in the past: #2751

@miri64
Copy link
Member

miri64 commented Aug 28, 2019

BTW: BOARD=iotlab-m3 IOTLAB_NODE=auto-ssh make -C examples/gnrc_networking term has the same issue.

@cladmi
Copy link
Contributor Author

cladmi commented Aug 28, 2019

BTW: BOARD=iotlab-m3 IOTLAB_NODE=auto-ssh make -C examples/gnrc_networking term has the same issue.

It was implemented with ssh and socat on purpose to behave without the additional pyterm behavior. So it indeed does not work the same way.

@cladmi
Copy link
Contributor Author

cladmi commented Aug 29, 2019

For only the readline behavior, rlwrap could be used as tried in #11099

@miri64 miri64 modified the milestone: Release 2020.07 Jul 5, 2020
@miri64 miri64 self-assigned this Jul 5, 2020
@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 21, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
@maribu
Copy link
Member

maribu commented Sep 23, 2022

Isn't this mostly a duplicate of #11099 ? IMO, we should close one of the two.

@miri64
Copy link
Member

miri64 commented Sep 23, 2022

The tests already use cleanterm (which seems to do the same what #11099 was aiming for). So maybe we can even close both. But in general: if there is a descriptive issue and a PR addressing it, I tend to say they are not duplicates of each other, but the one fixes the other (of course there are exceptions).

@maribu
Copy link
Member

maribu commented Sep 23, 2022

Oh, the [TRACKING] in the PR title let me assume it is actually an issue...

So maybe we can even close both.

Agreed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: tools Area: Supplementary tools Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

5 participants