1

I'm working on a small robotics project where I need to enable my old phone (Nokia 5230, shows up as USB Serial port on Windows but USB cable is straight-through) to talk to an Arduino UNO R3 (doesn't support USB Host mode natively).

My idea is wiring together the USB cable for the phone and the USB end of the adapter and wire the DATA/CLOCK port out of the PS/2 socket to the Arduino and communicate over USB serially.

Essentially, the phone will act same as a PS/2 keyboard connected does to the Arduino.

Sorry if my answer is lacking on original research, I am just inquiring if it's feasible (and some general advice) so I can start reading more on it in depth.

ps: With active I mean, Windows shows the adapter as composite USB device (with nothing connected at the PS/2 ports) and there is a circuit inside with some capacitors and a big epoxy blob on it.

a3f
  • 121
  • 5
  • 2
    Not all phones can act as a USB host. In addition, phones that do may not be able to power the USB bus, but the device can be self powered. Perhaps I'm misreading and the Arduino is your host. – kenny May 23 '13 at 12:41
  • I planned to use the voltage pins on the PS/2 connector to supply the power. – a3f May 23 '13 at 13:06
  • I have found that I don't have N-key rollover on my keyboards when using a PS/2->USB converter, I'd be worried about losing data at anything higher than ~5 chars/sec. – TMN May 23 '13 at 20:57
  • The main bottleneck would be in the mechanics, so 5 ch/s should be sufficient, I think. – a3f May 23 '13 at 21:36

1 Answers1

4

Basic USB is an asymmetric connection: a master connects to a slave. You can't connect two masters or two slaves (you can if you rewire cables, but it won't work).

The USB cable for your phone connects a master (the PC) to a slave (your phone). The PS2-USB converter is probably a slave that connects to your PC (the master). (Your PS2-USB converter could be less than a slave, if it relies on keyboard to do part of the job.)

Hence you can't (successfully) connect your PS2-USB slave to your phone slave.

Wouter van Ooijen
  • 48,407
  • 1
  • 63
  • 136
  • Could you please elaborate on the master-slave part? I don't want to implement fully standard compliant USB just a mean to make the phone "talk" to the Arduino. I mean you should be able to successfully connect a USB keyboard to the adapter and in turn connect that to the Arduino and interact with it, why shouldn't the phone be able to emulate the keyboard (which is a slave device) and the arduino to take-over the host part in the PS/2 setup ? – a3f May 23 '13 at 13:11
  • - does you arduino have an usb host stack that supports HID? I might be mistaken, but I think not! - does your phone implement the HID protocol? Again, I think not. – Wouter van Ooijen May 23 '13 at 14:04
  • 1
    @WoutervanOoijen The OP doesn't specify *which* Arduino. The Arduino Due does support [USB Host Mode](http://arduino.cc/en/Reference/USBHost). – Anindo Ghosh May 23 '13 at 14:48
  • 1
    @Anido: I assumed the basic Arduino, if the OP assumes otherwise he'd better specify which one. With a host stack on the arduino connecting a telephone directly might work, depending on the protocol used by the phone (IIRC many use simple serial-over-usb). Note that the OP did not specify *which* phone :( – Wouter van Ooijen May 23 '13 at 15:34
  • @Wouter van Ooijen Sorry that I omitted this information, I edited the first paragraph of the question. And you're right they don't support HID (out of the box at least). Soes that mean it's 100% impossible ? and also does that mean if I would wire the thing like described above and send a message using the RComm library in Symbian (linked in question) I wouldn't receive anything on the Arduino ? Thanks for answering, really much appreciated :) – a3f May 23 '13 at 16:15
  • I am not familiar with the details, but I suspect you won't even be able to open the serial port unless there is a host on the other side. – Wouter van Ooijen May 23 '13 at 16:53
  • Oh, didn't think of it that way. By same rationale using a usb-ttl adapter wont work too and there is no other way than purchasing a usb host shield I guess? – a3f May 23 '13 at 20:11