after configure configfs gadget and connect ubuntu machine getting disabled event

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

after configure configfs gadget and connect ubuntu machine getting disabled event

ソリューションへジャンプ
2,277件の閲覧回数
ankitpanchal167
Contributor III

Hi 

i am try to enable configfs gadget using usb_f_fs.ko with imx8mp

kernel version : 5.4 

below My gadget configuration.

modprobe libcomposite
mkdir -p /run/usb/config
mount none /run/usb/config -t configfs
cd /run/usb/config/usb_gadget/
mkdir g1
cd g1
echo 0x1600 >idVendor

echo 0x0030 >idProduct

mkdir strings/0x409
echo "0000000000" >strings/0x409/serialnumber
echo "XYZ" >strings/0x409/manufacturer

echo "product1" >strings/0x409/product

mkdir configs/c.1
mkdir configs/c.1/strings/0x409
echo "Config1" >configs/c.1/strings/0x409/configuration

mkdir functions/ffs.usb0
ln -s functions/ffs.usb0 configs/c.1
cd ../../../
mkdir -p ffs
mount usb0 ffs -t functionfs -o gid=1000,uid=1000

i am using ffs-test utility for test and it's able to endpoint. but after write UDC and connect with ubuntu os geting disabled event.

also test with windows its not geting any event ya response 

below attach logs with ubuntu os 

root@imx8mp:/run/usb/ffs# ~/ffs-test_magic_v2 64 &
[1] 1139
root@imx8mp:/run/usb/ffs#
ffs-test: info: ep0: writing descriptors (in v2 format)
ffs-test: info: ep0: writing strings
ffs-test: dbg: ep1: starting
ffs-test: dbg: ep2: starting
ffs-test: info: ep1: starts
ffs-test: info: ep0: starts
ffs-test: info: ep2: starts
root@imx8mp:/run/usb/ffs# echo 38100000.dwc3 > ../config/usb_gadget/g1/UDC
Event BIND
root@imx8mp:/run/usb/ffs# [ 483.832965] configfs-gadget gadget: full-speed config #1: c
Event DISABLE
 

below attach logs with windows os 

root@imx8mp:/run/usb/ffs# ~/ffs-test_magic_v2 64 &
[1] 1139
root@imx8mp:/run/usb/ffs#
ffs-test: info: ep0: writing descriptors (in v2 format)
ffs-test: info: ep0: writing strings
ffs-test: dbg: ep1: starting
ffs-test: dbg: ep2: starting
ffs-test: info: ep1: starts
ffs-test: info: ep0: starts
ffs-test: info: ep2: starts
root@imx8mp:/run/usb/ffs# echo 38100000.dwc3 > ../config/usb_gadget/g1/UDC
Event BIND

0 件の賞賛
返信
1 解決策
2,261件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Can you see what happened in kernel log?

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
2,262件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Can you see what happened in kernel log?

0 件の賞賛
返信
2,255件の閲覧回数
ankitpanchal167
Contributor III

Hi

It's descriptor issue now its resolved 

Thanks 

0 件の賞賛
返信