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.10 => 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=8.8.8.8;8.8.4.4;
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 192.168.42.1 too.)
enp1s0u1u1 is the new interface name that was changed from usb0 once tethered.
I tried eth0, usb0, enp1s0u1u1, but nothing worked. Still 192.168.42.9…
Appreciated if you could help.
Cheers!