hawsey
Posts: 28
Joined: Sun Sep 27, 2015 8:26 pm

Usb OTG question

Sun May 07, 2017 6:51 pm

I'm trying to hack a Pi Zero W in to an old Gamestick Dock and it has gone really well but i have a little problem .
The power button on the dock works great powering the Pi on and off however the usb ports are not working , so i think i need to connect a cable in to the USB port on the Pi and the power port OTG style , will that work ?
Any advice greatly appreciated :-)

hawsey
Posts: 28
Joined: Sun Sep 27, 2015 8:26 pm

Re: Usb OTG question

Mon May 08, 2017 5:55 am

Does anyone know if a Y splitter cable would work ? I've found a one with two male micro usb to one female .
I don't want to break my Pi Zero ...
Cheers

User avatar
davidcoton
Posts: 5021
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Usb OTG question

Mon May 08, 2017 8:33 am

I'm not sure that I understand the question, but...

There is only one USB port on the Zero. If you use that in device mode, then you can't do anything else with it.
(It can still power the Pi if the other end supplies enough power).
The other socket is for power. It has the same wiring as a Y cable -- so power only on one socket, in parallel with the power+data socket.
Make sure you have them plugged in the right way round.
Signature retired

hawsey
Posts: 28
Joined: Sun Sep 27, 2015 8:26 pm

Re: Usb OTG question

Mon May 08, 2017 12:48 pm

There is a little usb plug on the GameStick Dock that the Gamestick used to plug in to which gave the Gamestick ethernet , power , usb ports , I'm not sure if this uses OTG standard or not .
When the Zero is plugged in to the power port on the Zero to the dock , i can power on and off but the Usb ports don't work , i haven't tried the ethernet port .
Not sure how to proceed , i could just forget about the wiring as it is and keep the power on off active then use a OTG for usb ports / ethernet ( if i need it ) .
Was trying to get it working as is though :-)

fruitoftheloom
Posts: 23334
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Usb OTG question

Mon May 08, 2017 1:31 pm

hawsey wrote:There is a little usb plug on the GameStick Dock that the Gamestick used to plug in to which gave the Gamestick ethernet , power , usb ports , I'm not sure if this uses OTG standard or not .
When the Zero is plugged in to the power port on the Zero to the dock , i can power on and off but the Usb ports don't work , i haven't tried the ethernet port .
Not sure how to proceed , i could just forget about the wiring as it is and keep the power on off active then use a OTG for usb ports / ethernet ( if i need it ) .
Was trying to get it working as is though :-)
I believe your use of on the go OTG is misleading and not what you mean ;)

If you are running Raspbian Jessie on your RPi Zero then the USB Port is in HOST Mode, and the Power Port is just Power.

If you use "gadget mode" in Raspbian Jessie then the USB port will be in Slave Mode.

OTG is auto-switching on most devices but on the Zero it is not and therefore controlled by software.


If this is your product http://www.hunterdavis.com/gamestick-dock-hacking then the Dock is just a glorified USB Hub which when the powered is pulled from the Dock it shuts down whatever device is attactched, and in the case of the RPi Zero will lead to SD Card data corruption.



At your own risk
Regards the RPi Zero with a standard install so the USB Data Port is in Host Mode, plug that in to the Dock (if it is the same as the one above) and it should power up, as a far as I can ascertain the wiring of the dock is both power and data on that connector ie backfeeding and nothing to do with OTG.
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

hawsey
Posts: 28
Joined: Sun Sep 27, 2015 8:26 pm

Re: Usb OTG question

Mon May 08, 2017 4:53 pm

Ah ok , thanks for that , i will give it a go then .Yes it is that dock , i will bare in mind what you say about the power .
The Zero does fit perfectly inside and it will make a nice little case once i get the usb ports going .

hawsey
Posts: 28
Joined: Sun Sep 27, 2015 8:26 pm

Re: Usb OTG question

Mon May 08, 2017 10:23 pm

It's all working , thanks again i guess i just didn't understand the workings of that port on the zero , why is there a power one as well ? and not just the usb one i wonder .
Anyways the usb ports are now recognised by the Pi and I'm happy , I've not tried the SD card slot or the ethernet but am sure they will work too .
I need to do a bit more tweaking of the case then I'm all done .
The two charging pins on the top I'm thinking maybe fit an data dock , but not sure yet ....

Cheers

User avatar
davidcoton
Posts: 5021
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Usb OTG question

Mon May 08, 2017 10:29 pm

hawsey wrote: i guess i just didn't understand the workings of that port on the zero , why is there a power one as well ? and not just the usb one i wonder.
Because if the Pi is connected to an unpowered hub or an ordinary USB device, the second port is needed to power to Pi and through it the attached USB device(s).
Signature retired

hawsey
Posts: 28
Joined: Sun Sep 27, 2015 8:26 pm

Re: Usb OTG question

Tue May 09, 2017 11:42 am

Cheers , i get it now :-)

Return to “General discussion”