Mynewt Slinky Serial Comms Having Trouble

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mikehoyt
 
Posts: 14
Joined: Fri Nov 27, 2015 1:13 pm

Mynewt Slinky Serial Comms Having Trouble

Post by mikehoyt »

Hi, I've built and flashed the Slinky project. serial comms seems to have a problem. I'm just trying to get minicom to work. This is all on Ubuntu 22.04:

command:

Code: Select all

sudo minicom -D /dev/ttyUSB0
result:

Code: Select all

Welcome to minicom 2.8

OPTIONS: I18n 
Port /dev/ttyUSB0, 16:48:52

Press CTRL-A Z for help on special keys

000001 [ts=7812us, mod=6 level=4 ]{_ "rsn": "RESET_PIN", "cnt": 1, "img": "1.0.0.0", "hash": "42f9d1df4c9817c1c148538e12ae39c883cee7a63010cdc19cf35a6562639431", "flags": "active bootable confirmed"}
000005 
Slinky 1.0.0.0
At this point the terminal is totally unresponsive. I can CTRL-A Z and get to mincom menus but I'm not sure what I'm looking at as far the output from the Feather.

Any advice?

User avatar
mikehoyt
 
Posts: 14
Joined: Fri Nov 27, 2015 1:13 pm

Re: Mynewt Slinky Serial Comms Having Trouble

Post by mikehoyt »

I should also mention the LED is blinking so the build is running.

User avatar
mikehoyt
 
Posts: 14
Joined: Fri Nov 27, 2015 1:13 pm

Re: Mynewt Slinky Serial Comms Having Trouble

Post by mikehoyt »

I figured it out. I needed to turn off HW Flow Control in minicom's port setup.

User avatar
mikehoyt
 
Posts: 14
Joined: Fri Nov 27, 2015 1:13 pm

Re: Mynewt Slinky Serial Comms Having Trouble

Post by mikehoyt »

Ok, this was an effort debug why simply newtmgr command aren't going through:

Code: Select all

mhoyt@brewlab:~/projects/newt/slinky$ newtmgr conn show
Connection profiles: 
  nrf52serial: type=serial, connstring='/dev/ttyUSB0,mtu=128'
  sim1: type=serial, connstring='/dev/pts/2'
mhoyt@brewlab:~/projects/newt/slinky$ newtmgr -c nrf52serial mpstat
Error: NMP timeout
Is there somewhere I need to configure newtmgr to not use HW flow control?

User avatar
mikehoyt
 
Posts: 14
Joined: Fri Nov 27, 2015 1:13 pm

Re: Mynewt Slinky Serial Comms Having Trouble

Post by mikehoyt »

looks like there is rx/tx happening and that newtmgr is getting stuck?

Code: Select all

$ sudo newtmgr -c nrf52serial echo "hello" -l debug
DEBU[2022-09-14 15:07:38.001] Using connection profile: name=nrf52serial type=serial connstring=dev=/dev/ttyUSB0,baud=115200,mtu=128 
DEBU[2022-09-14 15:07:38.002] {add-nmp-listener} [serial_sesn.go:213] seq=66 
DEBU[2022-09-14 15:07:38.002] Encoded &{NmpBase:{hdr:{Op:2 Flags:0 Len:0 Group:0 Seq:66 Id:0}} Payload:hello} to:
00000000  a1 61 64 65 68 65 6c 6c  6f                       |.adehello| 
DEBU[2022-09-14 15:07:38.002] Encoded:
00000000  02 00 00 09 00 00 42 00  a1 61 64 65 68 65 6c 6c  |......B..adehell|
00000010  6f                                                |o| 
DEBU[2022-09-14 15:07:38.002] Tx NMP request: 00000000  02 00 00 09 00 00 42 00  a1 61 64 65 68 65 6c 6c  |......B..adehell|
00000010  6f                                                |o| 
DEBU[2022-09-14 15:07:38.002] Base64 encoding request:
00000000  02 00 00 09 00 00 42 00  a1 61 64 65 68 65 6c 6c  |......B..adehell|
00000010  6f                                                |o| 
DEBU[2022-09-14 15:07:38.002] Tx serial
00000000  06 09                                             |..| 
DEBU[2022-09-14 15:07:38.002] Tx serial
00000000  41 42 4d 43 41 41 41 4a  41 41 42 43 41 4b 46 68  |ABMCAAAJAABCAKFh|
00000010  5a 47 56 6f 5a 57 78 73  62 38 45 4a              |ZGVoZWxsb8EJ| 
DEBU[2022-09-14 15:07:38.002] Tx serial
00000000  0a                                                |.| 
DEBU[2022-09-14 15:07:38.297] Rx serial:
00000000  30 30 30 30 30 30 20 5b  74 73 3d 30 75 73 2c 20  |000000 [ts=0us, |
00000010  6d 6f 64 3d 36 20 6c 65  76 65 6c 3d 34 20 5d 7b  |mod=6 level=4 ]{|
00000020  5f 20 22 72 73 6e 22 3a  20 22 52 45 53 45 54 5f  |_ "rsn": "RESET_|
00000030  50 49 4e 22 2c 20 22 63  6e 74 22 3a 20 31 2c 20  |PIN", "cnt": 1, |
00000040  22 69 6d 67 22 3a 20 22  31 2e 30 2e 30 2e 30 22  |"img": "1.0.0.0"|
00000050  2c 20 22 68 61 73 68 22  3a 20 22 34 32 66 39 64  |, "hash": "42f9d|
00000060  31 64 66 34 63 39 38 31  37 63 31 63 31 34 38 35  |1df4c9817c1c1485|
00000070  33 38 65 31 32 61 65 33  39 63 38 38 33 63 65 65  |38e12ae39c883cee|
00000080  37 61 36 33 30 31 30 63  64 63 31 39 63 66 33 35  |7a63010cdc19cf35|
00000090  61 36 35 36 32 36 33 39  34 33 31 22 2c 20 22 66  |a6562639431", "f|
000000a0  6c 61 67 73 22 3a 20 22  61 63 74 69 76 65 20 62  |lags": "active b|
000000b0  6f 6f 74 61 62 6c 65 20  63 6f 6e 66 69 72 6d 65  |ootable confirme|
000000c0  64 22 7d                                          |d"}| 
DEBU[2022-09-14 15:07:38.297] Rx serial:
00000000  30 30 30 30 30 34 20                              |000004 | 
DEBU[2022-09-14 15:07:38.297] Rx serial:
00000000  53 6c 69 6e 6b 79 20 31  2e 30 2e 30 2e 30        |Slinky 1.0.0.0| 
DEBU[2022-09-14 15:07:48.003] {remove-nmp-listener} [serial_sesn.go:213] seq=66 
DEBU[2022-09-14 15:07:48.004] goroutine 1 [running]:
mynewt.apache.org/newt/util.NewNewtError(0xad1e99, 0xb, 0xb)
	/tmp/mynewt.JeVKhhIZfqS/pkg/mod/mynewt.apache.org/[email protected]/util/util.go:77 +0xcc
mynewt.apache.org/newt/util.ChildNewtError(0xbb1fe0, 0xc00008fcd0, 0xc0001ca000)
	/tmp/mynewt.JeVKhhIZfqS/pkg/mod/mynewt.apache.org/[email protected]/util/util.go:103 +0x85
mynewt.apache.org/newtmgr/newtmgr/cli.echoRunCmd(0xc0001b8000, 0xc0001960a0, 0x1, 0x5)
	/tmp/mynewt.JeVKhhIZfqS/src/mynewt.apache.org/newtmgr/newtmgr/cli/echo.go:48 +0x289
github.com/spf13/cobra.(*Command).execute(0xc0001b8000, 0xc000196050, 0x5, 0x5, 0xc0001b8000, 0xc000196050)
	/tmp/mynewt.JeVKhhIZfqS/pkg/mod/github.com/spf13/[email protected]/command.go:830 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0xc00018e000, 0xafbda8, 0xc000118240, 0x0)
	/tmp/mynewt.JeVKhhIZfqS/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
	/tmp/mynewt.JeVKhhIZfqS/pkg/mod/github.com/spf13/[email protected]/command.go:864
main.main()
	/tmp/mynewt.JeVKhhIZfqS/src/mynewt.apache.org/newtmgr/newtmgr/newtmgr.go:111 +0x129

goroutine 19 [syscall]:
os/signal.signal_recv(0x0)
	/usr/lib/go-1.13/src/runtime/sigqueue.go:147 +0x9c
os/signal.loop()
	/usr/lib/go-1.13/src/os/signal/signal_unix.go:23 +0x22
created by os/signal.init.0
	/usr/lib/go-1.13/src/os/signal/signal_unix.go:29 +0x41

goroutine 5 [chan receive]:
main.main.func1(0xc000118240)
	/tmp/mynewt.JeVKhhIZfqS/src/mynewt.apache.org/newtmgr/newtmgr/newtmgr.go:97 +0x41
created by main.main
	/tmp/mynewt.JeVKhhIZfqS/src/mynewt.apache.org/newtmgr/newtmgr/newtmgr.go:95 +0x11f

goroutine 6 [syscall]:
syscall.Syscall(0x0, 0x5, 0xc0001d00de, 0xf22, 0x4c8a65, 0x7f4ea054aed0, 0x72)
	/usr/lib/go-1.13/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.read(0x5, 0xc0001d00de, 0xf22, 0xf22, 0x0, 0xc0000d7b68, 0x52cf74)
	/usr/lib/go-1.13/src/syscall/zsyscall_linux_amd64.go:732 +0x5a
syscall.Read(...)
	/usr/lib/go-1.13/src/syscall/syscall_unix.go:183
internal/poll.(*FD).Read(0xc00006c4e0, 0xc0001d00de, 0xf22, 0xf22, 0x0, 0x0, 0x0)
	/usr/lib/go-1.13/src/internal/poll/fd_unix.go:165 +0x164
os.(*File).read(...)
	/usr/lib/go-1.13/src/os/file_unix.go:259
os.(*File).Read(0xc0000100a8, 0xc0001d00de, 0xf22, 0xf22, 0xc000091ec0, 0x0, 0x30)
	/usr/lib/go-1.13/src/os/file.go:116 +0x71
github.com/tarm/serial.(*Port).Read(0xc0000100b0, 0xc0001d00de, 0xf22, 0xf22, 0x0, 0x0, 0x0)
	/tmp/mynewt.JeVKhhIZfqS/pkg/mod/github.com/tarm/[email protected]/serial_linux.go:138 +0x4c
bufio.(*Scanner).Scan(0xc00011c080, 0x5)
	/usr/lib/go-1.13/src/bufio/scan.go:213 +0xa4
mynewt.apache.org/newtmgr/nmxact/nmserial.(*SerialXport).Rx(0xc0001960f0, 0xc00011c080, 0x0, 0x0, 0x0, 0x0)
	/tmp/mynewt.JeVKhhIZfqS/src/mynewt.apache.org/newtmgr/nmxact/nmserial/serial_xport.go:304 +0x130
mynewt.apache.org/newtmgr/nmxact/nmserial.(*SerialXport).Start.func1(0xc0001960f0)
	/tmp/mynewt.JeVKhhIZfqS/src/mynewt.apache.org/newtmgr/nmxact/nmserial/serial_xport.go:135 +0x114
created by mynewt.apache.org/newtmgr/nmxact/nmserial.(*SerialXport).Start
	/tmp/mynewt.JeVKhhIZfqS/src/mynewt.apache.org/newtmgr/nmxact/nmserial/serial_xport.go:127 +0x127

goroutine 7 [select]:
mynewt.apache.org/newtmgr/nmxact/nmserial.(*SerialSesn).Open.func1(0xc0001ca000)
	/tmp/mynewt.JeVKhhIZfqS/src/mynewt.apache.org/newtmgr/nmxact/nmserial/serial_sesn.go:101 +0x144
created by mynewt.apache.org/newtmgr/nmxact/nmserial.(*SerialSesn).Open
	/tmp/mynewt.JeVKhhIZfqS/src/mynewt.apache.org/newtmgr/nmxact/nmserial/serial_sesn.go:97 +0x2df 
Error: NMP timeout

mhoyt@brewlab:~/projects/newt/slinky$ newtmgr version
Apache Newtmgr 1.10.0
mhoyt@brewlab:~/projects/newt/slinky$ newt version
Apache Newt 1.10.0 / unknown / 2022-05-20_12:44
any ideas?

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”