Network Troubleshooting - nxp-mcuxpresso/vscode-for-mcux GitHub Wiki
MCUXpresso for VS Code
VS Code already handles most networking issues automatically within its settings. For a more comprehensive guide, please refer to the official Visual Studio Code Network Guide.
However, VS Code does not handle its dependencies network configurations, and these must be handled manually.
Git
Git is used by the MCUXpresso for VS Code extension in order to clone various repositories or examples. Since git falls back to the global configuration in this case, it must be configured correctly. Therefore, any proxy settings or certificates have to be manually applied to the global configuration of Git.
A comprehensive guide to Git network configuration is available in this gist. For more information, you may refer to the official git-config documentation.
West
West internally uses Git for fetching or updating repositories. Therefore, if Git is configured correctly, West should work as well.
For more information, refer to the official West Troubleshooting Guide.
MCUXpresso Installer
The Installer application requires, in most instances, Internet connectivity. There are multiple mechanisms in place to ensure that the Installer works on different network configurations.
Download mechanism
The Installer checks for component and application updates upon starting up the application. This is done through HTTPS using a network request library. HTTP is not supported, therefore if your organization has a network proxy, it is necessary to install certificates in the OS-specific certificate store. This is covered in a later chapter. The Installer will do the network requests using the certificate chain present in the certificate store.
If the network request fails, the Installer falls back to using wget. This utility is installed along some components, but if the Installer cannot connect before wget is installed, it is necessary to install it manually and add it to the system path.
Also, in case of running behind a proxy server, the Installer requires the proxy settings to be manually set in the configuration file (located in MCUXpressoInstaller layout/config/config.ini). All three fields under the [proxy] category (protocol, host, port) have to be completed in order for the proxy configuration to take effect, otherwise, the download mechanism will ignore the uncomplete configuration and proceed using the default settings (no proxy). If user authentication is required by the proxy server, the username and password can be set under the [proxy.auth] category. Also, the browser used by the server can be modified by setting the User Agent in the [network] category.
If the fallback fails as well, the installer reverts to offline mode.
Offline mode
Whenever the Installer has no Internet connectivity, it will switch into offline mode. This mode will work only if the Installer was started at least once and has sucesfully connected to the Internet, or if using an offline image.
In this mode, all component installs are local only, and their versions might not be up to date. If Internet connectivity resumes, it is necessary to restart the Installer application to switch back to normal operating mode.
Certificate store configuration
If the user is behind a corporate proxy, it is usually necessary to add the root certificate in the OS-specific certificate store.
First, acquire the root certificate authority file. This usually needs to be in PEM or X.509 format, but may differ depending on the operating system.
Then, add it to the OS certificate store (Windows Certificate Store on Windows, Keychain Access on macOS, CA trust store on Ubuntu).
Finally, if on macOS or Ubuntu, add the certificate file to the wget configuration file. This is necessary if the default network request fails. The file is usually present in ~/.wgetrc
.
ca_certificate = /path/to/certificate.pem
After changing the file, it is necessary to log out and log in again, in order to apply the changes.
Further troubleshooting
Consult the latest log file (can be accessed in Options > Open log folder) and look for lines containing the tags Command
, Network
or Download
. All errors and warnings should be logged, and may help you troubleshoot any network problems. If you encounter further problems, or there is a bug with the application, please report it to NXP support (also attach the log file).
Note: the log file contains path names and OS information, please redact any sensitive information prior to sending the log.