Yes it is!

The beaglebone gets the ip from a hardcoded value and the dev PC gets the 
ip from a dhcp server running on the beaglebone.

The beaglebones usb ip is set and the dhcp server is launched in 
the /usr/bin/g-ether-load.sh script, called by the the g-ether-load.service 
(run "systemctl status g-ether-load" to view details). At the bottom of 
this script you'll see:
/sbin/ifconfig usb0 192.168.7.2 netmask 255.255.255.252
/usr/sbin/udhcpd -f -S /etc/udhcpd.conf

That first line sets the beaglebones ip and subnet mask, the second fires 
up the dhcp server using the configuration file /etc/udhcpd.conf, seen here:
start      192.168.7.1
end        192.168.7.1
interface  usb0
max_leases 1
option subnet 255.255.255.252

The start and end is the address range the server can assign to the dev PC. 
The subnet limits the network to <http://www.subnet-calculator.com/> the 
addresses 192.168.7.1 - 192.168.7.2 (with a broadcast address of 
192.168.7.3).

The problem is, when you attach two beaglebones to the same dev PC, the 
dhcp server on each beaglebone assigns an address of 192.168.7.1. Your dev 
PC says, "wait, I can't have to interfaces with the same IP" so refuses 
it...but, even if more ips were allowed, the dhcp protocol has no way to 
handle this crazy network topology, so everything gives up.

To make two work on the same pc, change the hardcoded beaglebone ip in 
/usr/bin/g-ether-load.sh and the dhcp ip range in /etc/udhcpd.conf to a 
different subnet. Sticking with the 255.255.255.252 subnet mask, which 
allows 2 ips and a broadcast ip, the next subnet starts at 192.168.7.4, so 
assign the beaglebone to 192.168.7.5 and the dhcp range to 192.168.7.4 (or 
flipping the ips would work too, it's an arbitrary selection).

-Brandon

On Wednesday, January 29, 2014 1:32:01 AM UTC-8, Andrea Pola wrote:
>
> It's possible to connect two BeagleBoneBack using the IP over USB.
> One is acting like Dev PC and may have the 192.168.7.1 address and the 
> other act as normal BBB using 192.168.7.2 address.
>
> I'm trying to do it, and i'm encountering problem. 
> Someone has made anything about this?
>
> Thanks
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to