User avatar
peepo
Posts: 306
Joined: Sun Oct 21, 2012 9:36 am

2x RPi ethernet over usb? howto?

Tue May 28, 2013 5:55 pm

Does anyone have instructions or links for connecting two RPi,
using ethernet over usb?

I did manage to connect a kindle to one RPI this way.
see: http://www.ponnuki.net/2012/09/kindleberry-pi/

if not, other than ethernet patch cable, what's easy?

Electrocut
Posts: 6
Joined: Sat May 18, 2013 5:42 pm

Re: 2x RPi ethernet over usb? howto?

Thu May 30, 2013 8:44 pm

Ethernet over USB connections are usualy done using the "USB Gadget CDC Ethernet" kernel feature, which make possible to emulate a "USB Network Adapter device".

One hardware requirement is that one USB Device / OTG port must be available. Unfortunately, I don't think the RPi has an OTG USB Port.

remsnet
Posts: 151
Joined: Wed Dec 19, 2012 7:32 pm
Location: Planet Gaia
Contact: Website Yahoo Messenger

Re: 2x RPi ethernet over usb? howto?

Thu May 30, 2013 8:47 pm

peepo wrote:Does anyone have instructions or links for connecting two RPi,
using ethernet over usb?

I did manage to connect a kindle to one RPI this way.
see: http://www.ponnuki.net/2012/09/kindleberry-pi/

if not, other than ethernet patch cable, what's easy?
Bastard Operator Of Hell Sentence No.: 2014:

PI has OTG , but the usb ether link featger not compiled in.

Code: Select all

 dmesg | grep otg
[    2.615696] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    3.085717] dwc_otg: Microframe scheduler enabled
[    3.085932] dwc_otg bcm2708_usb: DWC OTG Controller
[    3.093897] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[    3.104267] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
[    3.153755] usb usb1: Manufacturer: Linux 3.8.13+ dwc_otg_hcd
[    3.185069] dwc_otg: FIQ enabled
[    3.185088] dwc_otg: NAK holdoff enabled
[    3.602858] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    4.246797] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    4.586691] usb 1-1.3: new low-speed USB device number 4 using dwc_otg
~ # uname -a
Linux smb 3.8.13+ #2 PREEMPT Thu May 30 09:52:24 UTC 2013 armv6l GNU/Linux

Electrocut
Posts: 6
Joined: Sat May 18, 2013 5:42 pm

Re: 2x RPi ethernet over usb? howto?

Thu May 30, 2013 8:54 pm

From this article, I understand that even if the BCM2835 does support USB OTG, electronic around the CPU doesn't: the LAN9512 chip is already connected to the unique USB port, acting as USB Host.

But I'm very new to Raspberry Pi, so I may be wrong ;)

remsnet
Posts: 151
Joined: Wed Dec 19, 2012 7:32 pm
Location: Planet Gaia
Contact: Website Yahoo Messenger

Re: 2x RPi ethernet over usb? howto?

Thu May 30, 2013 8:59 pm

Electrocut wrote:From this article, I understand that even if the BCM2835 does support USB OTG, electronic around the CPU doesn't: the LAN9512 chip is already connected to the unique USB port, acting as USB Host.

But I'm very new to Raspberry Pi, so I may be wrong ;)
BofH sencence No.: 2015

please read this : https://developer.ridgerun.com/wiki/ind ... networking

Code: Select all

~ # zgrep USB_GADGET  /proc/config.gz
# CONFIG_USB_GADGET is not set
bevor you can start using that , you must recompile the Kernel.

Electrocut
Posts: 6
Joined: Sat May 18, 2013 5:42 pm

Re: 2x RPi ethernet over usb? howto?

Thu May 30, 2013 9:07 pm

Yes, but I think you will met hardware limitation later. I'm afraid that is would be necessary to unsold the LAN9512 Chip, in order to connect directly to the CPU USB Port.

One other solution would be to buy a special "USB Host to USB host" cable, which acts as a USB Slave Ethernet Adapter from the computer side: http://ubuntuforums.org/showthread.php?t=993036

With this solution, no need to get the USB port work in Device mode ;)

User avatar
rpdom
Posts: 18014
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: 2x RPi ethernet over usb? howto?

Thu May 30, 2013 9:09 pm

Electrocut wrote:From this article, I understand that even if the BCM2835 does support USB OTG, electronic around the CPU doesn't: the LAN9512 chip is already connected to the unique USB port, acting as USB Host.

But I'm very new to Raspberry Pi, so I may be wrong ;)
Yes, you are correct. The LAN chip prevents the possibility of using OTG on the model B. As the model A doesn't have the LAN chip, it would be possible to use that in OTG mode if the right drivers were installed.

IanH2
Posts: 79
Joined: Tue Dec 18, 2012 10:17 am

Re: 2x RPi ethernet over usb? howto?

Sat Jun 01, 2013 9:10 pm

If you want really simple hardware, but don't need a very high data rate, you could connect the serial ports on the GPIO headers together, and use SLIP.
-----
https://github.com/IanHarvey

patraulea
Posts: 2
Joined: Thu Nov 26, 2015 1:29 pm

Re: 2x RPi ethernet over usb? howto?

Fri Dec 04, 2015 9:37 pm

Really really late reply, but does the CONFIG_USB_GADGET feature apply to the Pi Zero as well ?

mic_s
Posts: 92
Joined: Sun Oct 26, 2014 4:15 pm

Re: 2x RPi ethernet over usb? howto?

Fri Dec 04, 2015 11:04 pm

does the CONFIG_USB_GADGET feature apply to the Pi Zero as well ?
Short answer is: Yes.
However, there are actually small problems with the USB gadget driver. If these are resolved PI A, PI A+ and PI Zeros can be used as nodes in a low-cost USB 2.0 cluster (without Ethernet adapters).

e.g one Rasperry (B+, B2) as host and all other Pis (A, A+, Zeros) as devices.
or one Zero as host and the other Zero as device. (BOM: 5$ + 5$ = 10$ for both Zeros. Add one Cabel and one 5V/2A PSU for both)

fruitoftheloom
Posts: 25316
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: 2x RPi ethernet over usb? howto?

Fri Dec 04, 2015 11:37 pm

patraulea wrote:Really really late reply, but does the CONFIG_USB_GADGET feature apply to the Pi Zero as well ?
viewtopic.php?t=127211&p=852910
The information is out there....you just have to let it in.

My other Linux machine is a ChromeBox

Return to “Interfacing (DSI, CSI, I2C, etc.)”