BeaglePlay SSH over USB-A to other beagleboard ?

I would like to use the BeagePlay as a host computer and communicate via SSH to ie BeagleBoneBlack through USB. The image’s device tree shows BP’s USB-A port (usb1) is configured as host.
But SSH does not work → ping 192.168.7.2 on Port 22 → no response.

I also changed my BP’s IP address for usb1 in /etc/network/interfaces to a static 192.168.7.132 in order to not conflict with other beagleboards. Kernel driver g_ether is loaded.
Basically my SSH service is running OK since I can communicate to other boards over Ethernet or Wifi. But I need to use an USB connection.
Anyone any idea what’s missing ?

Device Tree

&usb1 {
	dr_mode = "host";
	pinctrl-names = "default";
	pinctrl-0 = <&usb1_pins_default>;
};

/etc/network/interfaces

iface usb1 inet static 
address 192.168.7.132 
netmask 255.255.255.252 
network 192.168.7.0 
gateway 192.168.7.1

BP schematic

netmask 255.255.255.0

Your netmask is too restrictive, you can only run 2 with your settings.

netmask 255.255.255.240 will allow upto 14, unless you have an extremely good need to be that restrictive set it to 0 until your system is ready to be deployed.

netmask 255.255.255.0 does not resolve this issue.

lsusb and dmesg do show that the BeagleBoneBlack was detected and attached as USB Serial Device .
To my understanding ifconfig should show this device as new network connection, but that’s not the case here.
Maybe a kernel driver is missing ?

lsusb
Bus 001 Device 006: ID 1d6b:0104 Linux Foundation Multifunction Composite Gadget

dmesg

[  103.337158] usb 1-1.2: new high-speed USB device number 6 using xhci-hcd
[  103.439980] usb 1-1.2: New USB device found, idVendor=1d6b, idProduct=0104, bcdDevice= 4.04
[  103.440030] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  103.440059] usb 1-1.2: Product: BeagleBone
[  103.440084] usb 1-1.2: Manufacturer: BeagleBoard.org
[  103.440112] usb 1-1.2: SerialNumber: 1234BBBK5678
[  103.896943] usbcore: registered new interface driver usbserial_generic
[  103.897028] usbserial: USB Serial support registered for generic
[  103.938657] usbcore: registered new interface driver ftdi_sio
[  103.938779] usbserial: USB Serial support registered for FTDI USB Serial Device
[  104.011736] usbcore: registered new interface driver cdc_ether
[  104.032296] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected
[  104.032692] usb 1-1.2: Detected FT2232C
[  104.045411] ftdi_sio ttyUSB0: Unable to read latency timer: -32
[  104.052003] ftdi_sio ttyUSB0: Unable to write latency timer: -32
[  104.059979] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
[  104.060500] ftdi_sio 1-1.2:1.1: FTDI USB Serial Device converter detected
[  104.060903] usb 1-1.2: Detected FT2232C
[  104.063044] ftdi_sio ttyUSB1: Unable to read latency timer: -32
[  104.069576] ftdi_sio ttyUSB1: Unable to write latency timer: -32
[  104.076446] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB1
[  104.083707] cdc_acm 1-1.2:1.4: ttyACM0: USB ACM device
[  104.086088] usbcore: registered new interface driver cdc_acm
[  104.086106] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[  104.089013] usbcore: registered new interface driver rndis_host
[  104.142912] cdc_ncm 1-1.2:1.2: MAC-Address: 98:5d:ad:51:fc:4d
[  104.144479] cdc_ncm 1-1.2:1.2 eth2: register 'cdc_ncm' at usb-xhci-hcd.2.auto-1.2, CDC NCM, 98:5d:ad:51:fc:4d
[  104.144867] usbcore: registered new interface driver cdc_ncm
[  104.159686] usbcore: registered new interface driver rndis_wlan
[  104.187578] usbcore: registered new interface driver cdc_wdm
[  104.201586] usbcore: registered new interface driver cdc_mbim

At this point I am just making a very cheap guess, if you are using a windows host it might be the issue. I don’t care for the usb to IP thing, have briefly touched it a few times. Sorry, I am out of guesses…

SOLVED. I was on the wrong track thinking that my USB connection will always show up as usb0/usb1. Furthermore I had totally crap udev rule assigning FTDI instead of RNDIS.
Thanks to USB Networking - Openmoko things started to become clearer.

Just connect your PocketBeagle (or whatever board) to the BeaglePlay’s USB-A port.
Then identify by dmesg which network name was assigned to rndis-service and bring this network up with the correct host IP and port.
Example:

dmesg | grep rndis
...
rndis_host 1-1.2:1.0 eth2: register 'rndis_host' at usb-xhci-hcd.2.auto-1.2, RNDIS device, 98:5d:ad:51:fc:4b

Here it’s eth2…hence:

sudo ip address add 192.168.7.1/22 dev eth2
sudo ip link set dev eth2 up

The door is open…

ssh debian@192.168.7.2

Next days will check how to simplify the networking with a smart udev rule and corresp. file /etc/network/interfaces

2 Likes