Skip to content

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

@cladmi

Description

@cladmi

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.

Metadata

Metadata

Assignees

Labels

Area: toolsArea: Supplementary toolsType: 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