Hi,
I was setting up the Visual Studio Code on linux Host machine as per the following link
The setup was complete with no errors.
But while adding the colibri im7d module with torizon OS, the target gets added to the Devices with the following error
*Error running command torizon.openSSHTerminal: connect ECONNREFUSED 127.0.0.1:5000. This is likely caused by the extension that contributes torizon.openSSHTerminal.*
The Torizon IDE backend Terminal shows up following:-
*INFO:root:REST -> /api/version
INFO:root:REST <- /api/version - 200
INFO:root:REST -> /api/devices
INFO:root:REST <- /api/devices - 200
INFO:root:REST -> /api/devices/serial_detect
INFO:root:DETECT - Trying to detect device on port /dev/ttyUSB0.
WARNING:root: DETECT - Login successful.
INFO:root:DETECT - colibri-imx7 detected
WARNING:root: Can't solve hostname 192.168.1.102 saving address used for detection instead.*
and the output terminal shows the following:-
*Device successfully detected..
Device has been rebooted, it will take around one minute before it will be reconnected.*
I’m unable to recreate this exact error from my end. Are you adding the device connection via serial or network? It’s hard to tell from your terminal output since it references serial ports and ip addresses. Also it seems the device does appear under the “DEVICES” menu, however what happens when you “Click refresh to connect to devices and load information”. Does it actually load the device information?
I’m curious since there’s conflicting info in your terminal messages whether the connection was successful or not. It might just be a false negative and the device actually connected properly but an error messages was mistakenly given for some reason.
Once I installed the VS Code and all its prerequisites. I tried connecting my target using serial communication.
During serial communication firstly my connection was denied because access to /dev/ttyUSB0 required root privileges. Hence I added my user to the dialout group using sudo usermod -a -G dialout and gave it read write permission using chmod a+rw /dev/tty/USB0.
After this, I was able to connect to my target using serial communication.
Now the target adds up to the devices list as shown below
But when I click on the refresh to connect and load information link I get the following error
The same thing reflects in the Torizon IDE backend terminal
2020-04-30 11:39:12,438| ERROR | Could not resolve IP address for colibri-imx7-02997405, aborting!
ERROR:sshtunnel.SSHTunnelForwarder:Could not resolve IP address for colibri-imx7-02997405, aborting! ERROR:root:Error: 539 SSH tunnel error. SSH tunnel error: Could not establish session to SSH gateway
ERROR:root:Exception: SSH tunnel error: Could not establish session to SSH gateway
ERROR:root:Could not establish session to SSH gateway
INFO:root:REST ← /api/devices/02997405/images - 539
I tried the network connection for connecting the target it works fine and I am able to access it.
Also, I tried the other way out as mentioned by Valter.
I connected using the serial port as posted above. I got the same error.
By connecting the ethernet cable and by editing the correct hostname/ IP address in the info tab, I am able to connect and access my target by refreshing the above error link.
Devices can be detected via serial l, but you need a network connection to work with them in vscode. If you click on the device node you should see it’s properties in the properties pane. There you can edit the hostname. Try to replace it with the device own up address or add “.local” suffix to it.
It seems that your local network does not resolve hostnames.
Can you ping the device using hostname? Is it connected via crossed cable to your PC?