"host ip' in settings is populated incorrectly

I am using the tcbuilder VSCode extension. I have an Ivy board on my local network – it is plugged directly into my PC’s Ethernet port with a static IP address. When I connect to the device in the Torizon “Network Devices” tab, then click “Set Default” I see that the ‘host_ip’ in settings is not set to my Ethernet port’s IP address – it is always set to my wifi adapter’s IP address. Even if I turn wifi off on my computer, reboot VSCode, delete the device and re-add, the IP address always gets set to the wrong address. I expect it to be set to my Ethernet adapter’s IP address so that the device can pull images correctly. Manually setting the IP address is not effective because the extension also needs to set up the device’s ‘insecure registry’ settings when connecting to it, and these are not set correctly.

I have tried using a USB-to-Ethernet dongle and I get the same result. I have tried setting the “metric” of my Ethernet port to a low number, but it has no effect. How do I get the right IP address to be picked up by the extension?

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for reaching out with your question regarding the Torizon VSCode extension and your Ivy board’s network configuration.

This is a known scenario where the extension picks the “wrong” host IP address (in your case, the WiFi adapter instead of Ethernet), which causes problems when the board tries to pull images.

Here are steps and workarounds you can use to resolve this:

  1. Manually Set the Host IP in VSCode Settings
    You can force the extension to use your Ethernet port’s IP by adding or updating the following setting in your global settings.json:

    "torizon.overwriteHostIp": "YOUR_ETHERNET_IP_ADDRESS"
    

    Replace YOUR_ETHERNET_IP_ADDRESS with your actual Ethernet IP. This should tell the extension to use the correct IP regardless of automatic detection.
    See Community Discussion

  2. Manual Configuration in Project and Device

    • In your project’s .vscode/settings.json, ensure the host_ip is set to your Ethernet port’s IP address.
    • On your Ivy board, update /etc/docker/daemon.json: set the insecure-registries field to include your correct Ethernet IP. After editing, restart the Docker daemon:
      sudo systemctl restart docker
      

    See Step-by-Step

  3. Ensure the Network Is Correct
    Double-check that both PC and board are on the same subnet and directly connected. Sometimes, network bridge or firewall issues may also interfere.
    Network Setup Guide

  4. Check Docker Context in VSCode
    Inspect the Docker context in VSCode’s Docker view and confirm that the DOCKER_HOST environment variable is using the correct IP address. This helps VSCode and related extensions target your Ethernet interface.
    Docker Context Details

Note:
Due to current extension logic, the initial IP detection might still default to WiFi in some setups, especially if multiple adapters are active. The torizon.overwriteHostIp setting is your best bet for consistent results until the extension improves its selection logic.

Let me know if following these steps helps or if you run into any further issues!

Best regards,
Toradex AI Assistant.

1 Like

OK That worked! Thanks!