We talked to one of your support engineers at Elevate sessions and he told us that SSL 1.1 and Docker support (enabled on the client) will allow one to connect a Toradex device to your Visual Studio Code plugin for Torizon.
For the client device. Colibri T30, We have built a custom Yocto Linux image based on your 2.8.8 BSP. Kernel Version 6.1.8 . We have SSL 1.1 and Docker support added to this image. SSH is no problem connecting to the device. Went to a lot of trouble to add Docker to the image. Docker works (docker run hello-world)… that works.
On the development box. 22.04.1-Ubuntu, VS Code 1.78.2, Toradex Torizon Support plugin 1.5.1
Below is the log output.
> Serving on http://localhost:5000 > INFO:root:REST → /api/version > INFO:root:REST ← /api/version - 200 > INFO:root:REST → /api/version/docker > INFO:root:REST ← /api/version/docker - 200 > INFO:root:REST → /api/devices > INFO:root:REST → /api/setup/enableemulation > INFO:root:REST ← /api/devices - 200 > INFO:root:REST ← /api/setup/enableemulation - 200 > INFO:root:REST → /api/eulas > INFO:root:REST ← /api/eulas - 200 > INFO:root:REST → /api/eulas/nxp-la-opt-v5 > INFO:root:REST ← /api/eulas/nxp-la-opt-v5 - 200 > INFO:root:REST → /api/devices/network_detect > INFO:root:DETECT - Trying to detect device 192.168.10.137. > WARNING:root:DETECT - Login successful. > INFO:root:DETECT - Toradex device id 06590495 > INFO:root:DETECT - toradex-0030 detected :: Model 0030 > ERROR:root:Error: 524 User is not enabled to execute commands as root. User root is not enabled to execute commands as root. > INFO:root:REST ← /api/devices/network_detect - 524 > INFO:root:REST → /api/devices/network_detect > INFO:root:DETECT - Trying to detect device 192.168.10.137. > WARNING:root:DETECT - Login successful. > INFO:root:DETECT - Toradex device id 06590495 > INFO:root:DETECT - toradex-0030 detected :: Model 0030 > ERROR:root:Error: 524 User is not enabled to execute commands as root. User root is not enabled to execute commands as root.
Ok. So on a hunch, I decided to add a user called torizon and add it to sudoers instead of just using root to login. That seems to at least connect and show all of the device details…docker container details and so forth.
I will try an example program or two and update the post if it works
No nothing is stopping us. I wasn’t sure which one to use to be honest. I started with that one at first, but then I read some of the posts I saw on the forum using the older one and I saw the number of downloads on the Torizon Support Extension was greater and used it instead.
So I will deactivate the torizon support extension and try the other one.
Well the problem with the ApolloX extension (after some testing) seems to be that it doesn’t connect with our device like the Torizon Support Extension does.
There seems to be no useful information coming out of the ApolloX extension just Torizon, Trying to connected to 192.168.10.137
The logs on the device show > ug 17 15:23:30 colibri-t30-mainline sshd[1174]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.10.153 user=torizon > Aug 17 15:23:33 colibri-t30-mainline sshd[1174]: Accepted password for torizon from 192.168.10.153 port 43552 ssh2 > Aug 17 15:23:33 colibri-t30-mainline sshd[1174]: pam_unix(sshd:session): session opened for user torizon by (uid=0) > Aug 17 15:23:33 colibri-t30-mainline systemd-logind[382]: New session c21 of user torizon. > – Subject: A new session c21 has been created for user torizon > – Defined-By: systemd > – Support: systemd-devel Info Page > – Documentation: multiseat
*> – * > – A new session with the ID c21 has been created for the user torizon.
*> – * > – The leading process of the session is 1174. > Aug 17 15:23:33 colibri-t30-mainline systemd[1]: Started Session c21 of user torizon. > – Subject: Unit session-c21.scope has finished start-up > – Defined-By: systemd > – Support: systemd-devel Info Page
*> – * > – Unit session-c21.scope has finished starting up.
*> – * > – The start-up result is done. > Aug 17 15:23:39 colibri-t30-mainline smbd[689]: [2023/08/17 15:23:39.814569, 0] …/source3/printing/print_standard.c:71(std_pcap_cache_reload) > Aug 17 15:23:39 colibri-t30-mainline smbd[689]: Unable to open printcap file /etc/printcap for read! > Aug 17 15:28:21 colibri-t30-mainline nmbd[426]: [2023/08/17 15:28:21.587593, 0] …/source3/nmbd/nmbd_become_lmb.c:533(become_local_master_browser) > Aug 17 15:28:21 colibri-t30-mainline nmbd[426]: become_local_master_browser: Error - cannot find server COLIBRI-T30-MAINLINE in workgroup MYGROUP on subnet 172.17.0.1 > Aug 17 15:28:21 colibri-t30-mainline nmbd[426]: [2023/08/17 15:28:21.591717, 0] …/source3/nmbd/nmbd_become_lmb.c:533(become_local_master_browser) > Aug 17 15:28:21 colibri-t30-mainline nmbd[426]: become_local_master_browser: Error - cannot find server COLIBRI-T30-MAINLINE in workgroup MYGROUP on subnet 192.168.10.137
I have no idea what is going on with the new extension…why would it not work when the older one does?
Then I tried to connect via address in the extension… it seemed to run into same problem again. Is there anyway just to disable connect via nmb & samba ? I am not sure if the configuration of those are done correctly on the device yet and I would just rather connect ssh directly via IP address right now
Ok, so I disabled nmbd and smbd on the client, then tried to connect to the device via IP address in the ApolloX ext.
now I am getting more messages on the client but something is still getting hung up on the ApolloX ext connecting to the device.
Below are from journalctl -xe from the client
Aug 18 08:38:36 colibri-t30-mainline sshd[2142]: Accepted password for torizon from 192.168.10.153 port 43288 ssh2 Aug 18 08:38:36 colibri-t30-mainline sshd[2142]: pam_unix(sshd:session): session opened for user torizon by (uid=0) Aug 18 08:38:36 colibri-t30-mainline systemd[1]: Created slice User Slice of torizon. – Subject: Unit user-1001.slice has finished start-up – Defined-By: systemd – Support: systemd-devel Info Page
*-- * – Unit user-1001.slice has finished starting up.
*-- * – The start-up result is done. Aug 18 08:38:36 colibri-t30-mainline systemd[1]: Starting User Manager for UID 1001… – Subject: Unit user@1001.service has begun start-up – Defined-By: systemd – Support: systemd-devel Info Page
*-- * – Unit user@1001.service has begun starting up. Aug 18 08:38:36 colibri-t30-mainline systemd-logind[382]: New session c25 of user torizon. – Subject: A new session c25 has been created for user torizon – Defined-By: systemd – Support: systemd-devel Info Page – Documentation: multiseat
*-- * – A new session with the ID c25 has been created for the user torizon.
*-- * – The leading process of the session is 2142. Aug 18 08:38:36 colibri-t30-mainline systemd[1]: Started Session c25 of user torizon. – Subject: Unit session-c25.scope has finished start-up – Defined-By: systemd – Support: systemd-devel Info Page
*-- * – Unit session-c25.scope has finished starting up.
*-- * – The start-up result is done. Aug 18 08:38:36 colibri-t30-mainline systemd[2144]: Reached target Timers. – Subject: Unit UNIT has finished start-up – Defined-By: systemd – Support: systemd-devel Info Page
*-- * – Unit UNIT has finished starting up.
… Aug 18 08:38:36 colibri-t30-mainline systemd[2144]: Reached target Paths. – Subject: Unit UNIT has finished start-up – Defined-By: systemd – Support: systemd-devel Info Page
*-- * – Unit UNIT has finished starting up.
*-- * – The start-up result is done. Aug 18 08:38:36 colibri-t30-mainline systemd[2144]: Reached target Basic System. – Subject: Unit UNIT has finished start-up – Defined-By: systemd – Support: systemd-devel Info Page
*-- * – Unit UNIT has finished starting up.
*-- * – The start-up result is done. Aug 18 08:38:36 colibri-t30-mainline systemd[2144]: Reached target Default. – Subject: Unit UNIT has finished start-up – Defined-By: systemd – Support: systemd-devel Info Page
*-- * – Unit UNIT has finished starting up.
*-- * – The start-up result is done. Aug 18 08:38:36 colibri-t30-mainline systemd[2144]: Startup finished in 149ms. – Subject: User manager start-up is now complete – Defined-By: systemd – Support: systemd-devel Info Page
*-- * – The user manager instance for user 1001 has been started. All services queued – for starting have been started. Note that other services might still be starting – up or be started at any later time.
*-- * – Startup of the manager took 149119 microseconds. Aug 18 08:38:36 colibri-t30-mainline systemd[1]: Started User Manager for UID 1001. – Subject: Unit user@1001.service has finished start-up – Defined-By: systemd – Support: systemd-devel Info Page
*-- * – Unit user@1001.service has finished starting up.
*-- * – The start-up result is done.
I am not sure what your plugin is trying to do and why it is getting hung up still. Below is the output of systemctl status that shows the slice that your plugin created
maybe there is something that we have on Torizon that is not set on your custom build. Could you please after try to connect open the Developer console, by pressing F1 and selecting the option Developer: Toggle Developer Tools. So, send the logs from this window that will be opened please.
Therefore it is really not recommended to start development on this module.
Also, although it seems like you were able to have some advances in using Torizon Extension(s) with Colibri T30, neither TorizonCore nor VS Code extensions are supported for this module.
Toradex Sales team can help you find a module with Torizon ecosystem support out-of-the-box that is future-proof and fits your needs, so you can invest your time in the actual development/implementation of your product/solution.
Please don’t hesitate to get in contact with our Sales Team.
We understand that T30 is EOL and are not starting development on this module. These developments are not part of new development but part of continuing support of existing modules that we have in the field for those modules in our stock that have not been shipped.
We are looking to move to a imx8 module but I have been tasked to support the T30 and that is what I am doing here.
ApolloXVSCodeExtFailToConnect.txt (8.5 KB)
Ok here is a log from the VS Code console. Hopefully it shows what you need to see. It is clear that the extension is able to login because you can see the bash completion history warnings that one would normally see using the torizon login on our device.
What follows below is greek to me. I don’t understand what the extension is doing.
thanks for the logs. On the first login, the extension expects to have something like this as return torizon@<hostname>, but instead it is getting only the hostname colibri-t30-mainline:~$. This is what is hanging the login .
Could you change on your custom image the default user to torizon and also change the .bashrc to return something like torizon@<hostname> on the user prompt?
I believe that with these changes you will be able to mimic the same behavior that the extension expects from a default TorizonCore.
these Permission denied lines should be returning error code that the process is returning without success. Did you create the .bashrc ? Also, try to change the default shell to bash.
Hi @matheus.tx , ok I changed the shell for torizon in /etc/passwd to bash
.bashrc is created.
I also went ahead and did a chmod 777 on the whole /etc/profile.d directory
Something is still failing and I don’t know why
[Extension Host] first login success, checking if we should change the default password… console.ts:137 [Extension Host] Last login: Tue Aug 29 11:39:24 2023 from 192.168.10.153
console.ts:137 [Extension Host] exited with code 2 console.ts:137 [Extension Host] [08-29 13:50:41.338] ERROR :: Error trying to connect to : undefined notificationsAlerts.ts:42 Error trying to connect to : undefined
And on the device, the output from the journalctl is as follows
Aug 29 11:50:35 colibri-t30-mainline sshd[765]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.10.153 user=torizon Aug 29 11:50:40 colibri-t30-mainline sshd[765]: Accepted password for torizon from 192.168.10.153 port 58034 ssh2 Aug 29 11:50:40 colibri-t30-mainline sshd[765]: pam_unix(sshd:session): session opened for user torizon by (uid=0) Aug 29 11:50:40 colibri-t30-mainline systemd[1]: Created slice User Slice of torizon. Aug 29 11:50:40 colibri-t30-mainline systemd[1]: Starting User Manager for UID 1001… Aug 29 11:50:40 colibri-t30-mainline systemd-logind[360]: New session c4 of user torizon. Aug 29 11:50:40 colibri-t30-mainline systemd[1]: Started Session c4 of user torizon. Aug 29 11:50:41 colibri-t30-mainline systemd[767]: Reached target Sockets. Aug 29 11:50:41 colibri-t30-mainline systemd[767]: Reached target Timers. Aug 29 11:50:41 colibri-t30-mainline systemd[767]: Reached target Paths. Aug 29 11:50:41 colibri-t30-mainline systemd[767]: Reached target Basic System. Aug 29 11:50:41 colibri-t30-mainline systemd[767]: Reached target Default. Aug 29 11:50:41 colibri-t30-mainline systemd[767]: Startup finished in 109ms. Aug 29 11:50:41 colibri-t30-mainline systemd[1]: Started User Manager for UID 1001. Aug 29 11:52:16 colibri-t30-mainline systemd[1]: Started OpenSSH Per-Connection Daemon (192.168.10.153:33794). Aug 29 11:52:16 colibri-t30-mainline sshd[785]: /etc/ssh/sshd_config line 97: Deprecated option UsePrivilegeSeparation Aug 29 11:52:17 colibri-t30-mainline sshd[785]: error: kex_exchange_identification: Connection closed by remote host
I see the message Aug 29 11:52:17 colibri-t30-mainline sshd[785]: error: kex_exchange_identification: Connection closed by remote host from time to time and I don’t know why that is happening.
Write the host development PC IP address to the /etc/docker/daemon.json, the daemon.json file should be created, but the path /etc/docker need to be already there;
Run systemctl daemon-reload to apply the new override;
Run systemctl restart docker to reload the Docker service;
Run docker info to check if the new configurations was applied with success;
Create a /etc/motd to tell that the extension has been made changes to the distro;
Try to pass through these steps manually, maybe your distro is missing some path or service that we are expecting have on a default TorizonCore distro.