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

Error: disconnected on device with multiple images #160

Open
saty9 opened this issue May 18, 2022 · 0 comments
Open

Error: disconnected on device with multiple images #160

saty9 opened this issue May 18, 2022 · 0 comments

Comments

@saty9
Copy link

saty9 commented May 18, 2022

On a raspberry pi I am unable to query the image list of a device with multiple images on it. initially I was able to list images but once I uploaded a second image I cant and get Error: disconnected. I also see this error when running image test (although if I then reset the device it does boot into the image so the command did succeed). I was able to get the image list for the same device fine from macos.

reproduction steps

on raspberry pi os 64 bit lite and a ble mcu device that has had an image uploaded to its secondary slot

sudo apt-get update && sudo apt-get install go git
go get github.com/apache/mynewt-mcumgr-cli/mcumgr
sudo go/bin/mcumgr --conntype ble --connstring "peer_name=DEV NAME" image list -l trace

Error message

sudo go/bin/mcumgr --conntype ble --connstring "peer_name=EDGE TEST" image list -l trace
DEBU[2022-05-18 10:47:51.539] Using connection profile: name=unnamed type=ble connstring=peer_name=EDGE TEST 
DEBU[2022-05-18 10:47:51.702] Connecting to peer                           
DEBU[2022-05-18 10:47:52.139] Exchanging MTU                               
DEBU[2022-05-18 10:47:52.15] Exchanged MTU; ATT MTU = 600                 
DEBU[2022-05-18 10:47:52.15] Discovering profile                          
DEBU[2022-05-18 10:47:52.291] Subscribing to NMP response characteristic   
DEBU[2022-05-18 10:47:52.306] {add-nmp-listener} [bll_sesn.go:392] seq=66  
DEBU[2022-05-18 10:47:52.307] Encoded &{NmpBase:{hdr:{Op:0 Flags:0 Len:0 Group:1 Seq:66 Id:0}}} to:
00000000  a0                                                |.| 
DEBU[2022-05-18 10:47:52.307] Encoded:
00000000  00 00 00 01 00 01 42 00  a0                       |......B..| 
DEBU[2022-05-18 10:47:52.307] Tx NMP request: 00000000  00 00 00 01 00 01 42 00  a0                       |......B..| 
DEBU[2022-05-18 10:47:53.036] {remove-nmp-listener} [bll_sesn.go:392] seq=66 
DEBU[2022-05-18 10:47:53.037] goroutine 1 [running]:
mynewt.apache.org/newt/util.NewNewtError(0x4000024170, 0xc, 0xc)
	/home/pi/go/src/mynewt.apache.org/newt/util/util.go:83 +0xb8
mynewt.apache.org/newt/util.ChildNewtError(0x5d8b40, 0x40000520a0, 0x40002a8000)
	/home/pi/go/src/mynewt.apache.org/newt/util/util.go:109 +0x80
mynewt.apache.org/newtmgr/newtmgr/cli.imageStateListCmd(0x40001a7400, 0x40001805a0, 0x0, 0x6)
	/home/pi/go/src/mynewt.apache.org/newtmgr/newtmgr/cli/image.go:103 +0x160
github.com/spf13/cobra.(*Command).execute(0x40001a7400, 0x4000196780, 0x6, 0x8, 0x40001a7400, 0x4000196780)
	/home/pi/go/src/github.com/spf13/cobra/command.go:875 +0x1dc
github.com/spf13/cobra.(*Command).ExecuteC(0x40001a6000, 0x55c3f8, 0x4000092540, 0x0)
	/home/pi/go/src/github.com/spf13/cobra/command.go:989 +0x274
github.com/spf13/cobra.(*Command).Execute(...)
	/home/pi/go/src/github.com/spf13/cobra/command.go:917
main.main()
	/home/pi/go/src/github.com/apache/mynewt-mcumgr-cli/mcumgr/mcumgr.go:94 +0xf4

goroutine 22 [syscall]:
os/signal.signal_recv(0x5de2e0)
	/usr/lib/go-1.15/src/runtime/sigqueue.go:147 +0xc4
os/signal.loop()
	/usr/lib/go-1.15/src/os/signal/signal_unix.go:23 +0x20
created by os/signal.Notify.func1.1
	/usr/lib/go-1.15/src/os/signal/signal.go:150 +0x44

goroutine 34 [chan receive]:
main.main.func1(0x4000092540)
	/home/pi/go/src/github.com/apache/mynewt-mcumgr-cli/mcumgr/mcumgr.go:82 +0x34
created by main.main
	/home/pi/go/src/github.com/apache/mynewt-mcumgr-cli/mcumgr/mcumgr.go:80 +0xec

goroutine 35 [syscall]:
syscall.Syscall(0x3f, 0x7, 0x400007e000, 0x1000, 0x4, 0x400018c7eb, 0x40001d61e0)
	/usr/lib/go-1.15/src/syscall/asm_linux_arm64.s:9 +0x10
golang.org/x/sys/unix.read(0x7, 0x400007e000, 0x1000, 0x1000, 0x400018c7e8, 0x400007e000, 0x7)
	/home/pi/go/src/golang.org/x/sys/unix/zsyscall_linux.go:1366 +0x4c
golang.org/x/sys/unix.Read(...)
	/home/pi/go/src/golang.org/x/sys/unix/syscall_unix.go:157
github.com/JuulLabs-OSS/ble/linux/hci/socket.(*Socket).Read(0x4000192480, 0x400007e000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/home/pi/go/src/github.com/JuulLabs-OSS/ble/linux/hci/socket/socket.go:123 +0x7c
github.com/JuulLabs-OSS/ble/linux/hci.(*HCI).sktLoop(0x40001b29c0)
	/home/pi/go/src/github.com/JuulLabs-OSS/ble/linux/hci/hci.go:304 +0x9c
created by github.com/JuulLabs-OSS/ble/linux/hci.(*HCI).Init
	/home/pi/go/src/github.com/JuulLabs-OSS/ble/linux/hci/hci.go:153 +0x4ec

goroutine 50 [select]:
github.com/JuulLabs-OSS/ble/linux/hci.(*HCI).Accept(0x40001b29c0, 0x0, 0x0, 0x0, 0x0)
	/home/pi/go/src/github.com/JuulLabs-OSS/ble/linux/hci/gap.go:185 +0x9c
github.com/JuulLabs-OSS/ble/linux.loop(0x40001b29c0, 0x40002981c0, 0x203)
	/home/pi/go/src/github.com/JuulLabs-OSS/ble/linux/device.go:55 +0x28
created by github.com/JuulLabs-OSS/ble/linux.NewDeviceWithNameAndHandler
	/home/pi/go/src/github.com/JuulLabs-OSS/ble/linux/device.go:48 +0x20c

goroutine 36 [select]:
github.com/JuulLabs-OSS/ble.trap.func1(0x40001809c0, 0x4000288480, 0x5e6140, 0x4000286660)
	/home/pi/go/src/github.com/JuulLabs-OSS/ble/gatt.go:173 +0x84
created by github.com/JuulLabs-OSS/ble.trap
	/home/pi/go/src/github.com/JuulLabs-OSS/ble/gatt.go:172 +0x13c 
Error: disconnected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant