Author Topic: Alternatives to an OTG cable  (Read 1042 times)

Alternatives to an OTG cable
« on: 28 November, 2021, 10:29:14 am »
I want to try running Octoprint on an android phone (see link) and I need an OTG cable (micro USB) to connect to the printer.  Rather than buy one could I use a 4 port USB hub (male in 4x female out) to connect the 2 together?  Will it work?

https://github.com/feelfreelinux/octo4a

Thanks

Kim

  • Timelord
    • Fediverse
Re: Alternatives to an OTG cable
« Reply #1 on: 28 November, 2021, 11:25:28 am »
Possibly?  You'll still need an OTG cable/adaptor to convert the A-male lead from the hub's device port to something that works with the phone's port.

What you definitely can't do is connect the phone to one of the hub's A-female host ports and expect it to be able to do anything other than charge or communicate with the host connected to the hub's device port.  USB doesn't work like that, it's strictly hierarchical.

Re: Alternatives to an OTG cable
« Reply #2 on: 28 November, 2021, 11:28:07 am »
Thanks Kim, I've just collected all the bits together and realised the same thing.  Oh well, I'll just have to spend £3.50 on a cable!  ;D

Feanor

  • It's mostly downhill from here.
Re: Alternatives to an OTG cable
« Reply #3 on: 28 November, 2021, 11:28:50 am »
In short, no.
An OTG cable is a Special Thing, not just a dumb bit of wire.

Think of it like this:

Mostly, with USB, you have a Computer end, and a Peripheral Device end.
The computer is the Host, controlling the show, and the peripheral devices like memory sticks, Garmins, printers and phones are controlled by the host.
A phone is usually a dumb peripheral device, like a memory stick.

In some cases, you want the Phone to act like a computer, and be the Host device, the controller, so it can control other peripheral device, eg a memory stick, Garmin, or your printer.

The OTG cable contains the smarts to convert the phone from a dumb peripheral device to a Host device.

Kim

  • Timelord
    • Fediverse
Re: Alternatives to an OTG cable
« Reply #4 on: 28 November, 2021, 11:30:27 am »
An OTG cable is a Special Thing, not just a dumb bit of wire.

And moreover, a USB hub isn't like an Ethernet hub where all ports are equal, communicating with each other.

Re: Alternatives to an OTG cable
« Reply #5 on: 29 November, 2021, 11:00:53 pm »
The OTG cable contains the smarts to convert the phone from a dumb peripheral device to a Host device.

(Having been prompted to look it up)

An OTG cable shorts the mysterious fifth Micro USB pin to ground which activates the host smarts already in the phone.

Re: Alternatives to an OTG cable
« Reply #6 on: 30 November, 2021, 06:46:31 am »
With previous models of Samsung mobile phones I have also found a widget in the pack which turns an ordinary USB cable (the one supplied usually) into an OTG cable for the purposes of data transfer. 

At least, that's what I think it does. 

Re: Alternatives to an OTG cable
« Reply #7 on: 07 December, 2021, 01:03:23 pm »
There's an app on Google Play to check if your phone supports OTG.  Search for USB OTG Checker.  By all accounts low impact, ad free etc.

I have two phones, one older cheaper that runs Octoprint but probably does not support OTG (can't check at the moment 'cos I've forgotten my password!) and a better phone that does support OTG but won't run Octoprint.  It keeps stopping during installation.