0

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.

Liam Kelly
  • 3,524
  • 1
  • 17
  • 41
  • Why do you need that exact path? What the problem it will solve? – 0andriy Feb 18 '21 at 23:13
  • 2
    According to [this answer](https://stackoverflow.com/a/33142810/5264491), the `:A.B` part is the USB configuration number (A) and the USB interface number (B). The numbers are probably fixed in hardware. – Ian Abbott Feb 19 '21 at 11:42

0 Answers0