Hi,
I followed each step in the Install the Legato Plugin for VSCode tutorial. Connect WP7607 to linux virtual machine using USB port:
Ubuntu 18.04.6 LTS
SDK for WP76 (Release 16 + Legato 20.08.0)
ntram@ubuntu:~/space$ leaf shell
Leaf Shell /bin/bash started in Leaf environment.
(lsh:wp76stable) ntram@ubuntu:~/space$ sudo apt-get install openssh-client
[sudo] password for ntram:
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssh-client is already the newest version (1:7.6p1-4ubuntu0.7).
The following packages were automatically installed and are no longer required:
fonts-liberation2 fonts-opensymbol
gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0
gir1.2-gudev-1.0 gir1.2-udisks-2.0 grilo-plugins-0.3-base
gstreamer1.0-gtk3 libboost-date-time1.65.1
libboost-filesystem1.65.1 libboost-iostreams1.65.1
libboost-locale1.65.1 libcdr-0.1-1 libclucene-contribs1v5
libclucene-core1v5 libcmis-0.5-5v5 libcolamd2 libdazzle-1.0-0
libe-book-0.1-1 libedataserverui-1.2-2 libeot0
libepubgen-0.1-1 libetonyek-0.1-1 libevent-2.1-6 libexiv2-14
libfreerdp-client2-2 libfreerdp2-2 libgc1c2 libgee-0.8-2
libgexiv2-2 libgom-1.0-0 libgpgmepp6 libgpod-common libgpod4
liblangtag-common liblangtag1 liblirc-client0 liblua5.3-0
libmbim-glib4 libmbim-proxy libmediaart-2.0-0 libmspub-0.1-1
libodfgen-0.1-1 libqmi-glib5 libqmi-proxy libqqwing2v5
libraw16 librevenge-0.0-0 libsgutils2-2 libssh-4
libsuitesparseconfig5 libvncclient1 libwinpr2-2
libxmlsec1-nss lp-solve media-player-info python3-mako
python3-markupsafe syslinux syslinux-common syslinux-legacy
usb-creator-common usb-modeswitch usb-modeswitch-data
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
(lsh:wp76stable) ntram@ubuntu:~/space$ sudo apt-get remove modemmanager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'modemmanager' is not installed, so not removed
The following packages were automatically installed and are no longer required:
fonts-liberation2 fonts-opensymbol gir1.2-gst-plugins-base-1.0
gir1.2-gstreamer-1.0 gir1.2-gudev-1.0 gir1.2-udisks-2.0 grilo-plugins-0.3-base
gstreamer1.0-gtk3 libboost-date-time1.65.1 libboost-filesystem1.65.1
libboost-iostreams1.65.1 libboost-locale1.65.1 libcdr-0.1-1 libclucene-contribs1v5
libclucene-core1v5 libcmis-0.5-5v5 libcolamd2 libdazzle-1.0-0 libe-book-0.1-1
libedataserverui-1.2-2 libeot0 libepubgen-0.1-1 libetonyek-0.1-1 libevent-2.1-6
libexiv2-14 libfreerdp-client2-2 libfreerdp2-2 libgc1c2 libgee-0.8-2 libgexiv2-2
libgom-1.0-0 libgpgmepp6 libgpod-common libgpod4 liblangtag-common liblangtag1
liblirc-client0 liblua5.3-0 libmbim-glib4 libmbim-proxy libmediaart-2.0-0
libmspub-0.1-1 libodfgen-0.1-1 libqmi-glib5 libqmi-proxy libqqwing2v5 libraw16
librevenge-0.0-0 libsgutils2-2 libssh-4 libsuitesparseconfig5 libvncclient1
libwinpr2-2 libxmlsec1-nss lp-solve media-player-info python3-mako
python3-markupsafe syslinux syslinux-common syslinux-legacy usb-creator-common
usb-modeswitch usb-modeswitch-data
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
(lsh:wp76stable) ntram@ubuntu:~/space$ ssh root@192.168.2.2
ssh: connect to host 192.168.2.2 port 22: Connection refused
But when I Build and Install onto target, I get this error:
* Executing task: mksys ${LEGATO_DEF_FILE} -s components -t ${LEGATO_TARGET} -w ${LEGATO_OBJECT_DIR} -o ${LEGATO_OUTPUT_DIR} && update ${LEGATO_UPDATE_FILE}
[137/199] Build kernel driver module
make: Entering directory '/home/ntram/space/_build_mySystem/wp76xx/modules/spisvc'
make -C /home/ntram/space/leaf-data/wp76stable/wp76-toolchain/sysroots/armv7a-neon-poky-linux-gnueabi/usr/src/kernel M=/home/ntram/space/_build_mySystem/wp76xx/modules/spisvc modules
make[1]: Entering directory '/home/ntram/.leaf/wp76-toolchain_SWI9X07Y_02.37.07.00-linux64/sysroots/armv7a-neon-poky-linux-gnueabi/usr/src/kernel'
Building modules, stage 2.
MODPOST 1 modules
make[1]: Leaving directory '/home/ntram/.leaf/wp76-toolchain_SWI9X07Y_02.37.07.00-linux64/sysroots/armv7a-neon-poky-linux-gnueabi/usr/src/kernel'
make: Leaving directory '/home/ntram/space/_build_mySystem/wp76xx/modules/spisvc'
[140/199] Running external build step
...
...
...
fab492d218bcc55284ddeb3271655b93 ./lib/libComponent_serviceDirectory.so
9255ba66660c0aadaa7838d8029e57c4 ./lib/libComponent_supervisor.so
352829d89ead667fe74025447d5df252 ./lib/libComponent_update.so
54c99d4d01a8a1022f7a1fc8d885c98e ./lib/libComponent_updateDaemon.so
204bfa967c064f4c8100c7a4173d925b ./lib/libComponent_watchdogDaemon.so
d7d8196198d78daccfff1e8d452d9f58 ./lib/libjansson.so.4.11.0
9eac1dd131a8dfe66a47fb640d03d1d8 ./lib/liblegato.so
5a77a38ae58c677c8a25a586a70c7af7 ./modules/files/spisvc/scripts/install.sh
e3fb82673d0a38b49ab22a34dd8747df ./modules/files/spisvc/scripts/remove.sh
9dbfae699672d79fcb3a8a825eee9ad8 ./modules/spisvc.ko
e42fc8faf356374b3e6d7c907d745f7f ./version
/legato/apps/a8ef36aee0ba7290dc08a665ae93aa96
/legato/apps/ba0d55941bb4140921fca2079b5027e4
/legato/apps/8bd6db7eba9ab8dfaeaf57465710e5fb
/legato/apps/1e00cf289244dff5693b3330d13b2b85
/legato/apps/02c9993f7c05cb2845f9d635ced4dab3
/legato/apps/a12dc16c4cab94e3d3a4a4a0e7fd8b2e
/legato/apps/49fda258c700617298086c4839e5e07e
/legato/apps/b6a80c725dc1056b553a0d3715b2e1ef
/legato/apps/3519a3fec877a05ad140017af7c044cd
/legato/apps/3d45281431f0b1bf2d46aa62d333853f
/legato/apps/90489ec5f15b8c49ba87c355ad251157
/legato/apps/36273a5ef1e32d6ee908cecb4aeb8baf
/legato/apps/c07c4dcf8413be82ac999c3c7006d7e2
/legato/apps/8c1db0020fa4154c466d8c17d2082417
/legato/apps/5f7af4c75a2a50511b97189613b8c61d
/legato/apps/c25f5d6d10a6f798ce24155afee6cf3f
/legato/apps/85d7ea4b76eaea6a1d85de7a636e028d
/legato/apps/6117b3bedce5e6bbcb70ee0da80b62df
/legato/apps/74f54afe47b8946b051ef313137a1e38
/legato/apps/f4841ee30915c52d11e1b1eb99373695
/legato/apps/8ed2f38c020895322ccb2022c5ba7323
/legato/apps/839222997649b46ac0c7b70ea622c1c0
debugCfg
debugCfg
libjansson.so.4
libjansson.so.4.11.0
[199/199] Packaging system
Applying update from file './mySystem.wp76xx.update' to device at address '192.168.2.2'.
ssh: connect to host 192.168.2.2 port 22: Connection refused
Update failed
ssh: connect to host 192.168.2.2 port 22: Connection refused
* The terminal process "/bin/bash '-c', 'mksys ${LEGATO_DEF_FILE} -s components -t ${LEGATO_TARGET} -w ${LEGATO_OBJECT_DIR} -o ${LEGATO_OUTPUT_DIR} && update ${LEGATO_UPDATE_FILE}'" terminated with exit code: 255.
Can anyone tell me what step I’m missing?
Any help will be very much appreciated !
jyijyi
November 25, 2022, 9:08am
2
Can your PC ping the USB ECM interface of module (i.e. 192.168.2.2)?
Do you have UART2 console of your WP7607 module?
If yes, please type ifconfig in module and see the IP address of the USB ECM interface of module.
Also you might need to shut down the firewall of module by “iptables -I INPUT -j ACCEPT”
1 Like
Thanks for your quick reply.
My PC can ping 192.168.2.2 but can’t be sure it’s the module’s USB interface.
How to use UART2 console on the module? I don’t know what is UART2 console?
jyijyi
November 25, 2022, 9:45am
4
you can disconnect the USB of module and see if there is still 192.168.2.2.
BTW, do you use mangoh board?
There should be a port for UART2 console.
1 Like
Hi,
I disabled the module’s USB and the PC can’t ping. So perhaps 192.168.2.2 is the IP address of the USB ECM interface of module.
I don’t use Mangoh board.
jyijyi
November 25, 2022, 10:20am
6
Then does your board have uart2 console?
It’s similar to this board. This one has usb port and uart port. I’m not sure there’s a uart2 console
jyijyi
November 25, 2022, 11:05am
8
You can map the uart1 or uart2 to console by at!mapuart command.
(Only one port can be mapped to console)
And then you can see if there is thing coming out in those two usb ports
My output:
at!mapuart?
!MAPUART: 1,0
OK
Then I would type the command: at!mapuart=16,1 and reset, right?
jyijyi
November 25, 2022, 11:22am
10
Yes, you can have a try first
Hi,
I tried at!mapuart=16,1 and reset
at!mapuart?
!MAPUART: 16,0
OK
What will I do next?
jyijyi
November 28, 2022, 3:20am
12
you can see if there is anything coming out in those two USB ports with baud rate 115200
I typed:
at!reset
OK
Output of the remaining USB port:
[ 2639.819162] ch_notify on a closed smd_pkt_dev id:2
[ 2641.069642] msm_hsusb msm_hsusb: [ep_queue] request already in queue
rcK: Executing run_K_scripts...
Stopping linkmon: no linkmon found; none killed
done
[ 2741.589284] ch_notify on a closed smd_pkt_dev id:2
[ 2741.600398] [RMNET:HI] rmnet_config_notify_cb(): Kernel is trying to unregister ecm0
[ 2741.660253] [RMNET:HI] rmnet_config_notify_cb(): Kernel is trying to unregister ecm0
Stopping port_bridge: no port_bridge found; none killed
Stopping qmi_ip: no qmi_ip_multiclient found; none killed
Stopping eMBMs_TunnelingModule: no eMBMs_TunnelingModule found; none killed
Stopping netmgrd: no netmgrd found; none killed
Stopping qmuxd: stopped qmuxd (pid 1101)
done
no QCMAP_ConnectionManager found; none killed
Stopping fs-scrub-daemon: no fs-scrub-daemon found; none killed
Stopping thermal-engine: stopped thermal-engine (pid 1114)
done
stopped qti (pid 1572)
Stopping reboot daemon: stopped reboot-daemon (pid 1011)
done
Legato shutdown sequence
umount: can't unmount /legato/smack: Invalid argument
Legato wasn't running.
Finished Legato stop Sequence
stopping time daemon
Stopping time_services: no time_daemon found; none killed
stopping ntpd
no ntpd found; none killed
Stopping diagrebootapp: stopped diagrebootapp (pid 749)
done
stopping DNS forwarder and DHCP server: dnsmasq... stopped /usr/bin/dnsmasq (pid 1549)
done.
Deconfiguring network interfaces... ifdown: interface eth0 not configured
done.
Stopping syslogd/klogd: stopped syslogd (pid 696)
stopped klogd (pid 703)
done
mkdir: can't create directory '/mnt/flash/rootfs/': No space left on device
K96mount_unionfs: RO rootfs fudge allowed.
Stopping system message bus: dbus.
K98mount_early: Executing mount_early_user_stop...
K98mount_early: RO rootfs fudge allowed.
K98mount_early: ubidetach failed for device /dev/mtd15, rcK should take care of it.
K98mount_early: Executing mount_early_legato_stop...
Can't get valid SMEM, init DSSD SMEM
Linux sub system 1
K98mount_early: Executing mount_early_userrw_stop...
K98mount_early: Executing mount_early_unset_timezone...
rcK: Executing kill_all_proc...
rcK: Executing umount_fs_generic...
rcK: Executing print_shutdown_msg...
** SYSTEM SHUTDOWN COMPLETE **
The system is going down NOW!
[ 2743.853050] Error: returning -512 value
Sent SIGTERM to all processes
[ 2743.942496] [RMNET:HI] rmnet_config_notify_cb(): Kernel is trying to unregister bridge0
[ 2743.970585] [RMNET:HI] rmnet_config_notify_cb(): Kernel is trying to unregister bridge0
Sent SIGKILL to all processes
Requesting system reboot
[ 2745.868130] reboot: Restarting system
[ 2745.872042] Calling SCM to disable SPMI PMIÃrcK: Executing run_K_scripts...
Stopping linkmon: no linkmon found; none killed
done
[ 187.381576] ch_notify on a closed smd_pkt_dev id:2
[ 187.394557] [RMNET:HI] rmnet_config_notify_cb(): Kernel is trying to unregister ecm0
[ 187.440285] [RMNET:HI] rmnet_config_notify_cb(): Kernel is trying to unregister ecm0
Stopping port_bridge: no port_bridge found; none killed
Stopping qmi_ip: no qmi_ip_multiclient found; none killed
Stopping eMBMs_TunnelingModule: no eMBMs_TunnelingModule found; none killed
Stopping netmgrd: no netmgrd found; none killed
Stopping qmuxd: stopped qmuxd (pid 1120)
done
no QCMAP_ConnectionManager found; none killed
Stopping fs-scrub-daemon: no fs-scrub-daemon found; none killed
Stopping thermal-engine: stopped thermal-engine (pid 1133)
done
stopped qti (pid 1581)
Stopping reboot daemon: stopped reboot-daemon (pid 1035)
done
Legato shutdown sequence
umount: can't unmount /legato/smack: Invalid argument
Legato wasn't running.
Finished Legato stop Sequence
stopping time daemon
Stopping time_services: no time_daemon found; none killed
stopping ntpd
no ntpd found; none killed
Stopping diagrebootapp: stopped diagrebootapp (pid 742)
done
stopping DNS forwarder and DHCP server: dnsmasq... stopped /usr/bin/dnsmasq (pid 1562)
done.
Deconfiguring network interfaces... ifdown: interface eth0 not configured
done.
Stopping syslogd/klogd: stopped syslogd (pid 686)
stopped klogd (pid 695)
done
mkdir: can't create directory '/mnt/flash/rootfs/': No space left on device
K96mount_unionfs: RO rootfs fudge allowed.
Stopping system message bus: dbus.
K98mount_early: Executing mount_early_user_stop...
K98mount_early: RO rootfs fudge allowed.
K98mount_early: ubidetach failed for device /dev/mtd15, rcK should take care of it.
K98mount_early: Executing mount_early_legato_stop...
Can't get valid SMEM, init DSSD SMEM
Linux sub system 1
K98mount_early: Executing mount_early_userrw_stop...
K98mount_early: Executing mount_early_unset_timezone...
rcK: Executing kill_all_proc...
rcK: Executing umount_fs_generic...
rcK: Executing print_shutdown_msg...
** SYSTEM SHUTDOWN COMPLETE **
The system is going down NOW!
[ 189.753047] Error: returning -512 value
Sent SIGTERM to all processes
[ 189.843417] [RMNET:HI] rmnet_config_notify_cb(): Kernel is trying to unregister bridge0
[ 189.870559] [RMNET:HI] rmnet_config_notify_cb(): Kernel is trying to unregister bridge0
Sent SIGKILL to all processes
Requesting system reboot
[ 191.768726] reboot: Restarting system
[ 191.772630] Calling SCM to disable SPMI PMIÃ
It hangs there for more than 10 minutes and doesn’t show AT port on Device Manager, only Linux console COM16
jyijyi
November 28, 2022, 3:56am
14
AT port on device manager should be another USB port which is directly connected to USB of module.
But from your log, it is already the console log before module resets.
Yes, after I type at!reset with AT port (COM11). The module displays that log at COM16 and loses COM11. How to see output after reset?
jyijyi
November 28, 2022, 4:10am
16
what do you see in device manager now?
Any DM port, NMEA port and AT port?
USB port of module should enumerate these three ports in device manager.
BTW, anything coming out from COM16 (i.e. UART port) now after reset?
Only COM16, without any DM port, NMEA port and AT port after reset
jyijyi
November 28, 2022, 4:17am
18
Strange that seems the module is dead as the USB should not be affected by these commands.
anything coming out in COM16?
Can you confirm that the steps I followed are correct?
Use Putty on windows to type AT command.
Type at!mapuart=16,1
OK
at!reset
OK
Connect the remaining USB port to the Ubuntu virtual machine, use minicom to see the output.