Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB Gadget mode, any success? #9

Open
stevelord opened this issue Jul 10, 2016 · 15 comments
Open

USB Gadget mode, any success? #9

stevelord opened this issue Jul 10, 2016 · 15 comments

Comments

@stevelord
Copy link

Hi guys,

The Hackspace.pl wiki mentions USB gadget mode. I'm interested in trying it out, and was wondering if anyone has managed the steps described, which are:

Port the code
Remove the bootstrap resistor setting USB to host mode
Remove the card reader PCB and rewire the the USB signal pins

Has anyone managed this so far? If so, care to share your findings/code?

@frakman1
Copy link

I'm also very interested in this feature. If anyone has information on using the Zsun in USB Gadget mode, then please share your findings.

@pqyptixa
Copy link

I'm interested, too.
I did some googling, and found this: https://marc.info/?a=136188979700002&r=1&w=3 https://patchwork.linux-mips.org/patch/4968/ . Apparently, (unless I'm misreading) the patches were revised multiple times and sent, but they were never approved/pushed upstream...
I wonder how much would it cost to (back) port them and push them to upstream + openwrt.

@pqyptixa
Copy link

Also, there is a repo in github owned (I guess) by the person that made these patches: https://github.com/neykov/chipidea-openwrt , but it seems to be a bit older than the latest patchset ("Latest commit b4b579b on 28 Feb 2013" vs March 28 show in the linux-mips.org link above).

@pqyptixa
Copy link

Digging a bit more... v3 of the patches: https://www.linux-mips.org/archives/linux-mips/2013-04/msg00009.html
As plntyk @ #openwrt pointer out, looks like there never was a v4: https://www.google.com/search?q=%22PATCH+v4+*%5D+usb%3A+chipidea%22+%22Neykov%22

@Phant0mC0der
Copy link

Hope someone will port this

@Emeryth
Copy link
Owner

Emeryth commented Aug 11, 2017

USB gadget is working in LEDE trunk (unfortunately it has not been included in the first stable release).

Here's a quick port I made some time ago:
https://github.com/Emeryth/source/tree/zsun

@Phant0mC0der
Copy link

Is it possible to make zsun as rndis usb gadget?

@Emeryth
Copy link
Owner

Emeryth commented Aug 12, 2017

Yes, I've tested it.

@catalinii
Copy link

Hi @Emeryth,

sorry for the question, does g_ether works without any hardware modifications ?

If yes, I was wondering if it is possible to post some compiled images as I believe g_ether is very useful.

Thank you

@drawkula
Copy link

drawkula commented Jan 5, 2018

I'd like to use that too but using LEDE which ignores my wishes or I just am a victim of pebcak.
:-(

So probably I only can impatiently wait for a new LEDE release?
Could it be "officially" supported then?

Where is the petition we need to sign?
;-)

@x-magic
Copy link

x-magic commented Jun 4, 2018

I've modded my old-PCB ZSUN by removing the card reader board and headers, then jumped D+ and D- to USB connector, and finally removed G13 resistor (well, the hard way, I yanked it with a pair of tweezers since its too tiny for the iron).

zsun_gadget
(please ignore my crude soldering job)

On the original OpenWRT image (from here) the PC can detect the presence of an invalid device plugged in, while on an LEDE image (from here) nothing really happens. I haven't got time to compile my own kernel and image so I'd say it could be just a false hope.

@Emeryth
Copy link
Owner

Emeryth commented Jun 4, 2018

The USB gadget driver for AR9331 is not present in OpenWrt or LEDE 17.01.4.
You have to compile LEDE trunk with one of the USB gadget modules.

@x-magic
Copy link

x-magic commented Jun 4, 2018

@Emeryth thanks mate

I guess hardware-wise I'm good?
(Please tell me yes🤞)

Cheers

@Emeryth
Copy link
Owner

Emeryth commented Jun 4, 2018

Yes, it looks that way.
Remember that you will need to reduce the size of the LEDE kernel image by disabling some options (or it won't fit in the zsun's kernel partition).
There's discussion about it in the thread you posted.

@x-magic
Copy link

x-magic commented Jun 4, 2018

@Emeryth Fantastic! Thanks for the tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants