How can I set a static IP for the USB tethering?
If I connect my phone and enable
usb tethering, my balena device gets connected to the internet thru my phone. The problem is its local IP address.
I’d like to assign a static IP address, but it changes once I reboot and tether again…
192.168.42.9 => … … …
Here is my
/boot/system-connections/resin-tethering file to assign a static IP:
[connection] id=my-ethernet type=ethernet interface-name=enp1s0u1u1 permissions= secondaries= [ethernet] mac-address-blacklist= [ipv4] address1=192.168.42.150/24,192.168.42.129 dns=188.8.131.52;184.108.40.206; dns-search= method=manual [ipv6] addr-gen-mode=stable-privacy dns-search= method=auto
192.168.42.129 is the IP address of the Gateway, which was obtained by
netstat -nr command on my Raspberry Pi. (Of course, tried
enp1s0u1u1 is the new interface name that was changed from
usb0 once tethered.
enp1s0u1u1, but nothing worked. Still
Appreciated if you could help.