On 19.05.2020 21:40, Sid Spry wrote: > On Tue, May 19, 2020, at 2:12 PM, Sid Spry wrote: >> On Mon, May 18, 2020, at 6:58 PM, Peter Chen wrote: >>> >>>>> 2. Try exactly the same script I gave you, do not try change any >>>>> charaters (except the position for your application) >>>>> >>>>>>> cd /sys/kernel/config/usb_gadget >>>>>>> cd g1 >>>>>>> echo "0x1d6b" > idVendor >>>>>>> echo "0x0105" > idProduct >>>>>>> mkdir /dev/usb-ffs >>>>>>> mkdir functions/ffs.usb >>>>>>> mount -t functionfs usb /dev/usb-ffs ln -s functions/ffs.usb >>>>>>> configs/c.1 /home/root/usb_test/ffs_test/ffs-test & /* your own >>>>>>> test application */ while [ ! -e /dev/usb-ffs/ep1 ] do echo "." >>>>>>> sleep 1; >>>>>>> done >>>>> >>>>>> >>>>>> [1]: I actually did not have CONFIG_USB_CONFIGFS_F_FS nor F_NCM/ECM >>>> set however the necessary code seemed to have been pulled in some other way >>>> and the modules were available. They were loaded, and as explained my shell- >>>> based configfs code worked. They are set now and the problem persists. >>>>> >>>> >>>> Hi, sorry I was not clear. The kernel config is fine, and >>>> CONFIG_USB_CONFIGFS_F_FS is set. I run your exact script (minus the ffs-test >>>> line) and it fails to create the functions/ffs.usb directory as I described before. I can >>>> create other functions just fine. >>> >>> You may enable debug at configfs.c, f_fs.c and your udc driver to see >>> what happened. >>> >> >> Thanks for your help Peter. Unfortunately I have hit a brick wall. The >> examples in libusbgx also fail to work, and I tried that library after >> a friend recommended it as perhaps having secret mojo. I enabled the >> userspace debug helpers in the kernel but they do not seem to offer me >> any insight, and there's no relevant dmesg output. >> >> My device is an Allwinner H2+, and the UDC seems to be the Inventra >> Highspeed Dual Role Controller. I've also got the DesignWare USB3/USB2 >> cores enabled from my upstream but I think they are not being loaded. >> >> If anyone can look I'd appreciate it, this is just a hobby project. >> It's a good chance for me to do some kernel debugging but I'm a bit >> lost. >> >> Thanks for the help so far. >> > > Sorry for double post again. Alternatively, if anyone can recommend a device which they know has working ffs configfs gadget functionality, I'll just buy a board with that instead. Can you send me the strace log from the libusbgx example that does not work for you? Best regards, -- Krzysztof Opasiak Samsung R&D Institute Poland Samsung Electronics