Tiny Core Base > Raspberry Pi
USB gadget kernel module with RPi zero
creitzel:
--- Quote from: Juanito on October 05, 2022, 07:09:55 AM ---Is it worth trying usb modeswitch?
--- End quote ---
Juanito, I'm not sure that util is available for windows. Usually it's the windows device manager that you use to assign drivers to usb devices.
--- Quote from: Rich on October 05, 2022, 09:09:33 AM ---Hi creitzel
This link looks kind of interesting:...
--- End quote ---
Rich, I read through that article, and it seems to cover the same things that the articles I've been finding cover. Things I've already tried. The order thing seems to be out of my control as well, as I'm just loading the g_ether.ko module, and it appears to be loading the others, in whatever order it thinks is appropriate.
One thing I just discovered about the device from the windows side is that it is declaring itself to be a vendor id of 1a40 and a product id of 0101. When I google for this vendor/product pair, it comes back with a Terminus Technology Inc. USB Hub, which is why windows and linux are trying to install hub drivers for it, I think.
Do either of you know if I can change the Vendor Id and/or Product Id, somewhere in the configuration files of piCore? Maybe through parameters to the g_ether module? I think if I can get the pi to report a vendor id/product id for an RNDIS network device, windows should load the appropriate driver, and I might be in business.
Thanks again for sticking it out with me, and answering questions. Much appreciated! :)
creitzel:
Ok, so it looks like, from what I've read, that if I use
--- Code: ---sudo insmod /{path to g_ether}/g_ether.ko idVendor=0000 idProduct=0000
--- End code ---
where the 0000's are replaced with appropriate values, and the path is the correct path, that I should be able to start g_ether with parameters for the vendor and product id. That said, I've tried it every different way from sunday that I can think of, and I just keep getting
--- Code: ---insmod: can't insert '/usr/local/lib/modules/5.10.77-piCore/kernel/drivers/usb/gadget/legacy/g_ether.ko': unknown symbol in module, or unknown parameter
--- End code ---
am I doing this wrong?
Also, I came across an article on the linux gadget system in general, and it appears that you can mount a config filesystem to pass parameters into the gadget kernel layer. I haven't tried this one yet, because it looks like you have to completely define the gadget, and I don't know what the default config is for g_ether.
so, no luck so far at changing the vendor and product id's. :(
Rich:
Hi creitzel
What happens if you try it like this:
--- Code: ---sudo modprobe libcomposite.ko
sudo modprobe u_ether.ko
sudo modprobe usb_f_ecm_subset.ko
sudo modprobe usb_f_rndis.ko
sudo modprobe usb_f_ecm.ko
sudo modprobe usb_f_eem.ko
sudo modprobe g_ether.ko idVendor=0000 idProduct=0000
--- End code ---
creitzel:
--- Quote from: Rich on October 05, 2022, 10:03:27 PM ---Hi creitzel
What happens if you try it like this: ...
--- End quote ---
Hi Rich. I didn't know you could pass module params through modprobe. When I read the help for it, it didn't look like it accepted them. That is why I was trying to use insmod.
But, I tried this, and it appears that there's no difference. By that, I mean that the pi appears to load everything fine, with no errors in dmesg. I don't know of a way to see if if actually took the idVendor and idProduct parameters, but it didn't complain about them. And then on the Win10 box, it's still reporting an unknown usb device/usb hub, with VendorID= 1a40 and ProductID= 0101. So, if it did in fact take the parameters, it seems to be ignoring them/not using them.
From everything I've read, this seems to work for a lot of people, and none of them seem to be having the same trouble I am. Maybe I'm barking up the wrong tree here. Maybe there's just some simple step I've missed or something. Although, I've been through this a bunch of times, and I'm not seeing it lol.
creitzel:
Ok, I think I now understand why it was reporting a usb hub to the win10 box. I have a little usb hub that connects to the pi zero, and it's been a while since I actually installed it, and I thought that it was connected via the gpio, but it's not. It actually mounts like a HAT, but it has little plunger connectors that actually connect right to the zero's usb connector (there's 2 little contacts right by the connector that it connects to).
Anyway, I basically threw a dart, and said, I wonder if this would work if I took the hub off the zero. So, I uninstalled the hub, and tried again, and poof now it's not reporting a hub to the win10 box anymore. It briefly reported an RNDIS/Ethernet gadget (which is obviously what I want), but then quickly changed it to a serial port. So now I'm at the point, where it is creating a new COM port (COM3), which doesn't actually work, because I'm running g_ether, and not g_serial. lol. Anyways, it's progress I guess. Now to figure out how to make it stop switching to a usb serial device.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version