Hello,
I would like to have multiple (2) serial links over composite usb at vf61. Is it even possible?
I tried to edit /etc/usbg/g1.schema copying blocks under function and configs - see below - but it doesn’t work, since usbg service fails during start with this message: Failed to start Load default USB gadget schema g1.schema, specifically at this line:
ExecStartPost=/bin/sh -c /bin/echo `ls /sys/class/udc/` > /sys/kernel/config/usb_gadget/g1/UDC (code=exited, status=1/FAILURE).
It fails at writing to /sys/kernel/config/usb_gadget/g1/UDC with this message (exactly same as when I try to write there anything else):
root@colibri-vf:~# echo “” > /sys/kernel/config/usb_gadget/g1/UDC
-sh: echo: write error: No such device
EDIT: I tried with port_num = 0 and port_num = 1 in acm_GS1, since I don’t know what this attribute is about - with the same result.
Could somebody please tell me what’s wrong or what’s the way to add secondary serial line over usb - if it even is possible? Thank you.
root@colibri-vf:~# cat /etc/usbg/g1.schema
attrs :
{
bcdUSB = 0x0;
bDeviceClass = 0x0;
bDeviceSubClass = 0x0;
bDeviceProtocol = 0x0;
bMaxPacketSize0 = 0x40;
idVendor = 0x1d6b;
idProduct = 0x0104;
bcdDevice = 0x400;
};
strings = (
{
lang = 0x409;
manufacturer = "Toradex";
product = "Unknown";
serialnumber = "";
} );
functions : {
acm_GS0 :
{
instance = "GS0";
type = "acm";
attrs :
{
port_num = 0;
};
};
acm_GS1 :
{
instance = "GS1";
type = "acm";
attrs :
{
port_num = 0;
};
};
rndis_0 :
{
instance = "0";
type = "rndis";
attrs :
{
dev_addr = "00:14:2d:ff:ff:ff";
host_addr = "00:14:2d:ff:ff:fe";
qmult = 5;
};
};
};
configs = (
{
id = 1;
name = "c";
attrs :
{
bmAttributes = 0x80;
bMaxPower = 0x2;
};
strings = (
{
lang = 0x409;
configuration = "Conf 1";
} );
functions = (
{
name = "acm.GS0";
function = "acm_GS0";
},
{
name = "acm.GS1";
function = "acm_GS1";
},
{
name = "rndis.0";
function = "rndis_0";
} );
} );