I am trying to have a Raspberry Pi Zero emulate a Cisco USB console interface (non-FTDI version). At a high level this is actually not that difficult:
- The
g_serial
driver running on the Pi can accept Cisco idvendor and idproduct parameters, so it will look roughly the same on a lsusb output - The Linux host uses the same driver,
cdc_acm
, to connect to the Pi and the Cisco Device
The one problem I am having is that the kernel device path is slightly different between the two.
- Cisco:
/sys/bus/usb/devices/1-1.4.2:1.0
- Raspberry Pi:
/sys/bus/usb/devices/1-1.4.2:2.0
The Cisco's device path ends in :1.0
and the Raspberry Pi's ends in :2.0
. I know 1-1.4.2
comes from the USB hubs I am using on the host, but I do not know how the numbers after the :
are assigned.
So my questions are:
- how is the last number assigned in the devpath? does it come from the host or attached device?
- is there anything I can do to the
g_serial
driver to make it better emulate the Cisco device and appear as:1.0
Note: I am not trying to fix this with a udev rule. My goal is to completely emulate the Cisco device with the Pi.