更改Beaglebone Black的USB0地址? [英] Changing USB0 address of Beaglebone Black?

查看:71
本文介绍了更改Beaglebone Black的USB0地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试更改BeagleBone Black USB0端口的静态IP地址.

我知道此线程以前是打开的(更改静态Beagle Bone Black USB0 的IP).但没有找到答案.因此,我现在重新开放,看看人们现在是否有任何解决方案.

我还发现Eric Wong有解决方案.( http://ewong.me/changing-usb0-ip-address-the-beaglebone黑色/)-----但是这种解决方案适合于旧的debian映像.最新的文件与解决方案中提到的文件内容不同.因此上述解决方案不起作用.

我执行的步骤:步骤1:我尝试更改/etc/network/interfaces,以使默认地址是192.168.8.2而不是192.168.7.2,

iface usb0 inet静态地址192.168.8.2网络掩码255.255.255.0网络192.168.8.0网关192.168.8.1

step2:然后我更改了文件/etc/udhcpd.conf的内容-在两个地方将"192.168.7.1"更改为"192.168.8.1".

第3步:重新启动

Bingo,我失去了连接,现在我不得不再次将Debian映像重写为Beaglebone black,因为我无法再访问它.因此,基本上我都无法通过192.168.7.2或192.168.8.2进行访问

所以,如果有人知道该怎么做,如果您能分享自己的想法,那真的很有帮助吗?

解决方案

来得太晚了;我的网络内部使用192.168.6/24和192.168.7/24,所以最新的BB映像根本对我不起作用.

首先:通过J1连接器没有真正替代真正的串行连接.一个3.3v USB串行doodad很便宜,而且从一开始就可以观看整个启动过程(并闪烁图像!)非常有帮助.Adafruit出售与BeagleBone搭配使用的产品非常好: https://www.adafruit.com/product/954

无论如何,在Debian GNU/Linux 10(2020年4月映像)上,/etc/default/bb-boot 包含:

  ...USB_CONFIGURATION =启用#假设usb0始终处于启用状态,usb1可以处于禁用状态...USB0_SUBNET = 192.168.7USB0_ADDRESS = 192.168.7.2USB0_NETMASK = 255.255.255.0USB1_ENABLE =启用USB1_SUBNET = 192.168.6USB1_ADDRESS = 192.168.6.2USB1_NETMASK = 255.255.255.0DNS_NAMESERVER = 8.8.8.8 

调整此口味以重新启动.就我而言,我将USB0更改为192.168.70,并#注释掉了所有USB1线.

由于我必须定期重新刷新一堆板,因此将其刻录到SD卡映像本身中,这节省了很多时间.

I am trying to change the static IP address of USB0 port of BeagleBone Black.

I know this thread was open previously (Changing the static IP of Beagle Bone Black USB0). But no answer was found. So I am reopening now, to see if people have got any solution now.

I also found there is solution by Eric Wong. (http://ewong.me/changing-usb0-ip-address-on-the-beaglebone-black/) ----- But this solution is good for may be old debian images. The latest ones have different file contents of what's mentioned in the solution. And therefore above solution does not work.

Steps I did: step 1: I tried to change /etc/network/interfaces such that default address is 192.168.8.2 instead of 192.168.7.2 as this:

iface usb0 inet static address 192.168.8.2 netmask 255.255.255.0 network 192.168.8.0 gateway 192.168.8.1

step2: Then I changed contents of file /etc/udhcpd.conf -- change "192.168.7.1" to "192.168.8.1" in two places.

step3: reboot

Bingo, I lost my connectivity and now I have to rewrite the Debian image onto Beaglebone black again, as I no longer can access it. So basically neither I am unable to access through 192.168.7.2 or 192.168.8.2

So If anyone knows how to do it, It would be really helpful if you can share your thoughts ?

解决方案

Coming into this late; my network uses 192.168.6/24 and 192.168.7/24 internally, so the latest BB images didn't work for me at all.

First: there's no real substitute for a real serial connection via the J1 connector; a 3.3v USB serial doodad is cheap, and being able to watch the whole boot (and image flashing!) process from the very start is super helpful. Adafruit sells one that works great with BeagleBone: https://www.adafruit.com/product/954

Anyway, on Debian GNU/Linux 10 (Apr 2020 image), /etc/default/bb-boot contains:

...
USB_CONFIGURATION=enable
#It's assumed usb0 is always enabled, usb1 can be disabled...
USB0_SUBNET=192.168.7
USB0_ADDRESS=192.168.7.2
USB0_NETMASK=255.255.255.0

USB1_ENABLE=enable
USB1_SUBNET=192.168.6
USB1_ADDRESS=192.168.6.2
USB1_NETMASK=255.255.255.0

DNS_NAMESERVER=8.8.8.8

Adjust this to taste and reboot. In my case, I changed USB0 to 192.168.70, and #commented out all the USB1 lines altogether.

Because I have to re-flash a bunch of boards periodically, I burned this into the SD card image itself, which saved me a lot of time later.

这篇关于更改Beaglebone Black的USB0地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆