Torizon VS Code Extension v2 (ApolloX) - cannot see the connected Verdin iMX8M-Mini

On my Ubuntu 22.04 PC, the official Torizon VS Code Extension can see my Verdin iMX8M-Mini with Torizon running.
I can connect with ssh without issues.
Then I tried the new Torizon VS Code Extension v2 (ApolloX) and the Verdin is not found.
I see two items named as the Ubuntu 22.04 PC
immagine
and I don’t understand why.
And no Verdin is shown.

Hi @vix ,

thanks for trying to use ApolloX, having brave early adopters like you will help us a lot moving forward :muscle:.

About your issue, yeah this behavior has been reported before but we have not been able to reproduce internally. Therefore, in cases where device detection on the network does not help, there is a way to manually connect the device:

  • Click on Manualy Connect Device:
    image

  • Input the IP address of the device to be connected:
    image

  • Input the user of the device to be connected:
    image

  • Input the password of the device to be connected:
    image

Wait for the Trying to connect to and finished the Connect to on the Output ApolloX Torizon logs:

That should be enough to connect your device. Let us know if this helps in your environment.

I would also like to ask you, if possible, when you have time to send us the return of the following commands in a terminal:

ip link show
nmap -oX - -sn --system-dns -T 4 --min-parallelism 10 --max-rtt-timeout 2.5 --max-retries 0 192.168.0.0/24

Please change the 192.168.0.0./24 by the IP range of your network interface. Also after this last command check if the device IP is listed.

This will help us a lot to understand your environment and the issue, thanks in advance.

Best Regards,

Hello @matheus.tx
thank you.

I confirm that Manualy Connect Device works as expected.
This morning, when I started VS Code, ApolloX upgraded to the latest release
immagine
and now I can see three ubuntu-2204 devices in NETWORK DEVICES.
Yesterday I saw only two of them.

I describe my environment, in case it can help.

  • my Ubuntu 22.04 is a Guest Virtual Machine (Virtualbox 7.0.4) installed on my Host Windows 10 PC
  • the network interface for the Guest is set to NAT
  • the Verdin is connected into an ethernet switch together with other devices (not Toradex SoMs) on the network 192.168.1.0/24
  • the IP of the Verdin is 192.168.1.99

Here are the logs, as you requested:

  • log for ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 08:00:27:81:43:e1 brd ff:ff:ff:ff:ff:ff
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:a1:d6:c3:59 brd ff:ff:ff:ff:ff:ff
4: br-c60667dd5e4d: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:1f:dd:b7:4f brd ff:ff:ff:ff:ff:ff
  • log for nmap ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE nmaprun>
<?xml-stylesheet href="file:///usr/bin/../share/nmap/nmap.xsl" type="text/xsl"?>
<!-- Nmap 7.80 scan initiated Tue Dec 20 08:22:06 2022 as: nmap -oX - -sn -&#45;system-dns -T 4 -&#45;min-parallelism 10 -&#45;max-rtt-timeout 2.5 -&#45;max-retries 0 192.168.1.0/24 -->
<nmaprun scanner="nmap" args="nmap -oX - -sn -&#45;system-dns -T 4 -&#45;min-parallelism 10 -&#45;max-rtt-timeout 2.5 -&#45;max-retries 0 192.168.1.0/24" start="1671520926" startstr="Tue Dec 20 08:22:06 2022" version="7.80" xmloutputversion="1.04">
<verbose level="0"/>
<debugging level="0"/>
<host><status state="up" reason="syn-ack" reason_ttl="0"/>
<address addr="192.168.1.20" addrtype="ipv4"/>
<hostnames>
</hostnames>
<times srtt="2837" rttvar="5000" to="100000"/>
</host>
<host><status state="up" reason="syn-ack" reason_ttl="0"/>
<address addr="192.168.1.21" addrtype="ipv4"/>
<hostnames>
</hostnames>
<times srtt="3197" rttvar="5000" to="100000"/>
</host>
<host><status state="up" reason="syn-ack" reason_ttl="0"/>
<address addr="192.168.1.100" addrtype="ipv4"/>
<hostnames>
</hostnames>
<times srtt="10344" rttvar="10344" to="100000"/>
</host>
<runstats><finished time="1671520927" timestr="Tue Dec 20 08:22:07 2022" elapsed="1.16" summary="Nmap done at Tue Dec 20 08:22:07 2022; 256 IP addresses (3 hosts up) scanned in 1.16 seconds" exit="success"/><hosts up="3" down="253" total="256"/>
</runstats>
</nmaprun>

I see that in the nmap log the IP of Verdin is not shown. I can see IPs of other devices connected to my local network 192.168.1.0/24.
Let me know if I can help in some way.

Thank you for the information. You are using in VM, this is interesting environment. I will ask the team to prepare some VM to try run the tests.

If i need anything else I’ll let you know, thanks a lot so far.

Hello @matheus.tx
I downloaded the Ubuntu 22.04 VM ready to use from Ubuntu Virtual Machine Images for VirtualBox and VMware

1 Like

Hi @vix

I had installed here the VBox and download the osboxes image to try the same environment, and with the bridge network I was able to detect my local network devices successfully. Could you change your VM network config to bridge and try?

Best regards,

Hi @matheus.tx
I tried and now ApolloX extension sees a couple of other non-Toradex devices connected to the same local network as the Verdin.
As far as I can see, I see the devices that expose themselves with mDNS name. I see their mDNS name xxxxx.local
The Verdin cannot be seen (but I can connect manually to the IP, as in the NAT network configuration).
And some other non-toradex devices connected to the same network cannot be seen to.

Which is the command run “under to hood” to scan for Verdin devices?
Can I debug the issue in some way?

I want to add another minor issue when I try to connect manually:
when I must enter the IP and the password, the textbos shows the hints “IP address” and “password”
immagine
immagine

But when I must enter the username, no hint is shown
immagine

Hi @vix ,

sorry for the delay. Hope you had a good New Year’s Eve.

Which is the command run “under to hood” to scan for Verdin devices?
Can I debug the issue in some way?

We don’t specifically look for a Toradex device on the network, this scan for all network devices in your default network interface, actually this is just a help feature so you can find devices on your network and connect to the board without needing to know the IP address beforehand.

The extension uses nmap behind the scenes to do it:

nmap -oX - -sn --system-dns -T 4 --min-parallelism 10 --max-rtt-timeout 2.5 --max-retries 0 192.168.0.0/24

And list the devices that are reported with the state="up" property.

I want to add another minor issue when I try to connect manually:
when I must enter the IP and the password, the textbos shows the hints “IP address” and “password”

Thanks, we must address this on the next release.

Best Regards,

Hi @matheus.tx,
don’t worry.
I had a good New Yesr’s Eve, thanks.ù
I hope the same for you.

Here is the result when I execute
nmap -oX - -sn --system-dns -T 4 --min-parallelism 10 --max-rtt-timeout 2.5 --max-retries 0 192.168.1.0/24

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE nmaprun>
<?xml-stylesheet href="file:///usr/bin/../share/nmap/nmap.xsl" type="text/xsl"?>
<!-- Nmap 7.80 scan initiated Thu Jan  5 08:01:39 2023 as: nmap -oX - -sn -&#45;system-dns -T 4 -&#45;min-parallelism 10 -&#45;max-rtt-timeout 2.5 -&#45;max-retries 0 192.168.1.0/24 -->
<nmaprun scanner="nmap" args="nmap -oX - -sn --system-dns -T 4 --min-parallelism 10 --max-rtt-timeout 2.5 --max-retries 0 192.168.1.0/24" start="1672902099" startstr="Thu Jan  5 08:01:39 2023" version="7.80" xmloutputversion="1.04">
   <verbose level="0" />
   <debugging level="0" />
   <host>
      <status state="up" reason="syn-ack" reason_ttl="0" />
      <address addr="192.168.1.20" addrtype="ipv4" />
      <hostnames />
      <times srtt="1121" rttvar="5000" to="100000" />
   </host>
   <host>
      <status state="up" reason="conn-refused" reason_ttl="0" />
      <address addr="192.168.1.99" addrtype="ipv4" />
      <hostnames />
      <times srtt="2527" rttvar="5000" to="100000" />
   </host>
   <host>
      <status state="up" reason="syn-ack" reason_ttl="0" />
      <address addr="192.168.1.100" addrtype="ipv4" />
      <hostnames />
      <times srtt="1430" rttvar="5000" to="100000" />
   </host>
   <host>
      <status state="up" reason="conn-refused" reason_ttl="0" />
      <address addr="192.168.1.179" addrtype="ipv4" />
      <hostnames>
         <hostname name="ubuntu-2204" type="PTR" />
      </hostnames>
      <times srtt="301" rttvar="5000" to="100000" />
   </host>
   <runstats>
      <finished time="1672902105" timestr="Thu Jan  5 08:01:45 2023" elapsed="5.33" summary="Nmap done at Thu Jan  5 08:01:45 2023; 256 IP addresses (4 hosts up) scanned in 5.33 seconds" exit="success" />
      <hosts up="4" down="252" total="256" />
   </runstats>
</nmaprun>

I see 4 different hosts with the state="up" property; their IPs are 192.168.1.20, 192.168.1.99 and 192.168.1.100 (all of them with empty <hostnames />) and 192.168.1.179 (which is my Ubuntu VM).
But in ApolloX I see 5 items:
immagine
The fourth item (masked) is the mDNS name of IP 192.168.1.20. The mDNS name is not returned by nmap, so I image is read in another way.
I see that some of the nmap answers are reason="conn-refused" so I tried to run nmap under sudo and I get different results:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE nmaprun>
<?xml-stylesheet href="file:///usr/bin/../share/nmap/nmap.xsl" type="text/xsl"?>
<!-- Nmap 7.80 scan initiated Thu Jan  5 08:21:11 2023 as: nmap -oX - -sn -&#45;system-dns -T 4 -&#45;min-parallelism 10 -&#45;max-rtt-timeout 2.5 -&#45;max-retries 0 192.168.1.0/24 -->
<nmaprun scanner="nmap" args="nmap -oX - -sn --system-dns -T 4 --min-parallelism 10 --max-rtt-timeout 2.5 --max-retries 0 192.168.1.0/24" start="1672903271" startstr="Thu Jan  5 08:21:11 2023" version="7.80" xmloutputversion="1.04">
   <verbose level="0" />
   <debugging level="0" />
   <host>
      <status state="up" reason="arp-response" reason_ttl="0" />
      <address addr="192.168.1.20" addrtype="ipv4" />
      <address addr="00:08:79:EF:07:53" addrtype="mac" vendor="CEM" />
      <hostnames />
      <times srtt="882" rttvar="5000" to="100000" />
   </host>
   <host>
      <status state="up" reason="arp-response" reason_ttl="0" />
      <address addr="192.168.1.33" addrtype="ipv4" />
      <address addr="04:91:62:16:BC:EB" addrtype="mac" vendor="Microchip Technology" />
      <hostnames />
      <times srtt="474" rttvar="5000" to="100000" />
   </host>
   <host>
      <status state="up" reason="arp-response" reason_ttl="0" />
      <address addr="192.168.1.41" addrtype="ipv4" />
      <address addr="00:60:6E:20:06:E5" addrtype="mac" vendor="Davicom Semiconductor" />
      <hostnames />
      <times srtt="345" rttvar="5000" to="100000" />
   </host>
   <host>
      <status state="up" reason="arp-response" reason_ttl="0" />
      <address addr="192.168.1.45" addrtype="ipv4" />
      <address addr="F8:E4:3B:AD:F0:05" addrtype="mac" />
      <hostnames />
      <times srtt="2240" rttvar="5000" to="100000" />
   </host>
   <host>
      <status state="up" reason="arp-response" reason_ttl="0" />
      <address addr="192.168.1.77" addrtype="ipv4" />
      <address addr="74:DA:DA:33:C6:67" addrtype="mac" vendor="D-Link International" />
      <hostnames />
      <times srtt="2779" rttvar="5000" to="100000" />
   </host>
   <host>
      <status state="up" reason="arp-response" reason_ttl="0" />
      <address addr="192.168.1.100" addrtype="ipv4" />
      <address addr="00:03:27:12:0E:36" addrtype="mac" vendor="Act'l" />
      <hostnames />
      <times srtt="486" rttvar="5000" to="100000" />
   </host>
   <host>
      <status state="up" reason="localhost-response" reason_ttl="0" />
      <address addr="192.168.1.179" addrtype="ipv4" />
      <hostnames>
         <hostname name="ubuntu-2204" type="PTR" />
      </hostnames>
   </host>
   <runstats>
      <finished time="1672903271" timestr="Thu Jan  5 08:21:11 2023" elapsed="0.80" summary="Nmap done at Thu Jan  5 08:21:11 2023; 256 IP addresses (7 hosts up) scanned in 0.80 seconds" exit="success" />
      <hosts up="7" down="249" total="256" />
   </runstats>
</nmaprun>

The reason is either reason="arp-response" or reason="localhos-response" (for the VM) and I see all of the devices connected to my local network (7 devices).

Here are my doubts/questions:

  • Why I see 5 items and not 4?
  • Why 4 of them are labelled ubuntu-2204?
  • what does the “arrow icon” means in the above image (I added a red arrow to highlight the icon)?
  • Should ApolloX nmap be run under sudo?

Thanks

Hey @vix

I see 4 different hosts with the state="up" property; their IPs are 192.168.1.20 , 192.168.1.99 and 192.168.1.100 (all of them with empty <hostnames /> ) and 192.168.1.179 (which is my Ubuntu VM).
But in ApolloX I see 5 items:

We have an issue that the button is not being in the disable state during the load, what can cause queue of more than one detection tasks. We will work on it.

immagine

this was an issue (showing a not trimmed break line) that has been fixed on the latest release, thanks for the report.

The fourth item (masked) is the mDNS name of IP 192.168.1.20 . The mDNS name is not returned by nmap , so I image is read in another way.
I see that some of the nmap answers are reason="conn-refused" so I tried to run nmap under sudo and I get different results:

I forget to mention that there is another step, we use also avahi-resolve to get the hostnames from the address.

Should ApolloX nmap be run under sudo?

We wouldn’t want to run anything as sudo at this stage.

Let me ask, is there any reason why you are choosing run in a VM than in WSL 2 in your environment? (to support Windows we are adding features in the extension to support it trough WSL 2)
Let me know.

Best regards,

Hi @matheus.tx

yes, there is one reason why I must use a VM. I hope that in the future I can switch to WSL 2.
The reason is that for other projects I have a set of MS Windows Guest VMs in Virtualbox.
And, unfortunately, Virtualbox works really bad (slow performance) when Hyper-V is enabled on the Host PC.
Hyper-V is necessary to run WSL 2, Docker on Windows, Sandbox, …
Bjut if I enable it, the performances of Virtualbox Guest VMs are too slow.
It’s a known problem of Virtualbox; newer releases behave a little bit better, but at the moment this is a major issue for me.

At the moment these VMs are my everyday job, and Torizon is the future (I hope).
It’s frustrating, but this is the reason.

Hi @vix ,

I also ran into this issue myself, which is why I now have a native Linux machine.

Maybe it is worth trying Vmware instead of Virtualbox, not sure if it fixed the issue, but its worth trying.

Best Regards
Kevin

Hi @vix !

Do you have any news about this topic?

Were you able to solve your issue?

Best regards,

Hi @henrique.tx
no way with the Linux Virtualbox Guest.
I’ve been evaluatiuon the feasibility/effor of migrating to VMWare or enabling Hyper-V with the new release of Virtualbox.

Not an easy job…

Hi @henrique.tx and @matheus.tx
I had a partial success in using WSL2 instead of my VM.
I setup WSL2 and installed the TorizonCore extensions in VS Code.
The problem (related to WSL2 and not TorizonCore) is that it seems that WSL2 supports only one network adapter.
I created a different topic to discuss this.

hello,
I’m testing Apollo extension on a an Ubuntu laptop and I have the same issue, I can’t see any of my Verdin devices connected to my network

If I connect manually , it connects, but it doesn’t recognise the device as a verdin board, it seems that it just connects via ssh to the bash prompt of the device.

If I check DOCKER_HOST under docker->contexts I can’t see my device as endpoint

Under Run and Debug there is no Torizon option

Hello @RoccoBr,

For now there is no a “perfect” solution for this, and the user can always connect by the ip address. This feature is a handy help.

we are thinking to make some changes in the OS level, maybe to have some socket or service, so the IDE can list only the Torizon devices instead to have to scan the network. But this does not have an estimate and when it will be implemented…

Best Regards,

Matthias