Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usb0 ip not assigned #68

Open
Stinocon opened this issue Dec 4, 2024 · 2 comments
Open

usb0 ip not assigned #68

Stinocon opened this issue Dec 4, 2024 · 2 comments

Comments

@Stinocon
Copy link

Stinocon commented Dec 4, 2024

I am trying to connect to the local usb0 interface so that I can check bjorn and possibly change WiFi networks to scan.
Unfortunately, however, I can only ever reach it through the IP of the WiFi network I initially connected it to.

I use a Mac and if I connect bjorn via USB I see it properly listed in the network interfaces. Clearly I set my interface as listed on 172.20.2.2 etc etc.
Via SSH by running an ip addr I see that the usb0 interface (which should have 172.20.2.1) has an apipa address.

The configuration in /etc/network/interfaces seems correct

allow-hotplug usb0
iface usb0 inet static
address 172.20.2.1
netmask 255.255.255.0

Suggestions? Thanks

2: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
inet 169.254.98.1/16 brd 169.254.255.255 scope global noprefixroute usb0
valid_lft forever preferred_lft forever
inet6 fe80::1caa:21ed:27f4:9bce/64 scope link
valid_lft forever preferred_lft forever

@timewall
Copy link

timewall commented Dec 5, 2024

Look in the file /etc/networks, your IP is there

The two settings seem to be interfering with each other.

At least Björn can be reached at IP 169.254.98.1. I haven't found a quick solution.

@Stinocon
Copy link
Author

Stinocon commented Dec 6, 2024

Okay... I was able to create a workaround.
I took /etc/networks and changed the link-local subnet to reflect what it should be:

172.20.2.0

Then I edited /etc/dhcpcd.conf by adding at the end of the file

interface usb0
static ip_address=172.20.2.1/24

After rebooting, the device responds correctly on address 172.20.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants