These days, I am back with embedded programming. At AgriConnect, we use PlatformIO to setup and build embedded projects. This time, I want to evaluate a new chip and new software framework, so I tell PlatformIO to install new packages with the command pio pkg install
, but it hangs.
Turn out that it is because of network problem between Vietnamese ISP and the CDN services that PlatformIO Labs use to mirror its package repositories.
The solution is to quickly setup a temporary SOCKS proxy, and let PlatformIO tool reach those CDN through the proxy. The requirement is that you have a server that is outside Viet Nam, and you can access it via SSH. The steps is simple:
- First, make a SSH connection to our server, activating its SOCKS proxy feature. Assume that we use port 1337 for proxy.