USB Host Status?

Status
Not open for further replies.
I have not yet worked on USB host, and honestly I'm not planning to work on it until at least the summer. Several other big things are planned first....
 
I'm also interested in USB host, as I want to make a device that intercepts mouse movement and turns them into keystrokes. So I'll need USB host to plug their mouse into, and USB client to plug into their computer.
 
Programming a project using USB host mode will require a second Teensy 3.0 and a board-to-board link using the I2C pins (2 wires and ground), to provide a path for the Arduino IDE to upload code.
Is this upload-over-I2C method ready to go, or not going to happen until USB Host is ready?
 
Just adding +1 to this thread. Id like to connect a USB wifi radio (they're so small these days!) to the teensy 3 to build a tracking device which sends reports over an (unencrypted) access point.
 
I don't want my reply and this question to give you any false impression I'm currently working on host support or that I might do so soon. I'm not, and I have several other things planned before even beginning any work on host support.

But with that in mind, I am curious if you could post the technical details of this USB Wifi product. Does it have a well documented protocol? When (or if) USB host support exists, that doesn't necessarily mean it will have drivers for nice Arduino-like APIs to actually use most USB devices. Writing such drivers and APIs is a LOT of work. But even that is pretty much impossible unless the devices use known protocols. Many cheap projects on the market have proprietary protocols and generally only work with Windows using the driver published by the manufacturer.
 
Thanks. I will try that library when i have some time. Nice to hear that you have at least worked with it.
 
any recent developments? I think I'm gonna start looking into this. I've never done a USB project before, what is a SIMPLE ( and cheap) device to use for testing?
 
USB host shield works with that modified code Paul provided. Well at least i have succesfully connected Dualshock 3 and xbox 360 controllers with that.

I quess this is something that we cant do ourself. Usb should be modified to work as a host, which means rewriting usb code completely(?). And programming over I2C is not done yet, which propably is not easy and quick job to do(?).
 
USB host shield works with that modified code Paul provided. Well at least i have succesfully connected Dualshock 3 and xbox 360 controllers with that.

I quess this is something that we cant do ourself. Usb should be modified to work as a host, which means rewriting usb code completely(?). And programming over I2C is not done yet, which propably is not easy and quick job to do(?).

I'm curious, I'm looking at connecting an xbox controller to it, how did you manage the power situation?
Did you use the full size shield or the mini one?
Did you end up running vbus at 3.3v or 5v?
 
Mini version. On host shield i cutted VBUS jumper and connected VBUS pad to Vin on teensy 3.0. Vin is connected to 5V (if you have not cutted VUSB pad).
 
Paul, I'm sorry but your code doesn't compile for me. At least, the usbPS3 example doesn't compile for me.
Do you use arduino IDE for this, or something else?
 
Last edited:
Got this compiling & downloaded, I had to update to the Arduino 1.05 IDE & reinstall the Teensyduino files.

Here's my next question:

What pins are you using on the USB host? I have the full version for the mega, ICSP header has SCK, MOSI, MISO, and Reset(?)

What pin, on the USB Host Sheild is used for the SlaveSelect?
sku_142010_1.jpg
arduino-icsp-programming-header-pinout.png

Are there other pins that MUST be used?

And, I think I am correct to assume you are using the basic Teensy3.0 spi pins...
10 = SS
11 = MOSI
12 = MISO
13 = SCK
 
Last edited:
Okay, so I got the USB Host Shield Mini & the full size USB Host Shield.

I got the Mini Shield + Teensy3 working with the Teensy3.0 lib (PS3USB example) provided by Paul.

However, there seems to be some issue when using the bluetooth dongle.

When I use the full size shield + Mega1280 + original arduino lib I can get the bluetooth dongle to work (with a ps3 controller).
When I use Paul's lib, with the same full size shield + Mega1280, it doesn't work.

Paul, what modifications did you make to the original library? I've been comparing some lib files, and I haven't found my issue yet.
Anyone see whats going on here?

Here's what the terminal shows:

Class of device: 00 05 08
Incoming Connection Request
HCI event error: 06
 
Last edited:
Does the host shield library work at all on Teensy3 for you?

You can see the specific changes I made here (the 6 commits on May 29, 2013)

https://github.com/PaulStoffregen/USB_Host_Shield_2.0/commits/master

Recently I've exchanged a few private emails with Kristian Lauszus, who maintains that library. He's been working to merge some of my changes to the official library. Here's a branch he created to experiment with Teensy3 stuff.

https://github.com/felis/USB_Host_Shield_2.0/tree/arm

Unfortunately, I can't dedicate more engineering time to this library right now. I'll probably fiddle with it again in a couple months.

In the meantime, I'm going to send a Teensy3 to Kristian. I don't know if he'll have much time either, but he is interested in adapting the library to more boards and using Teensy as the first step to making it work on more ARM-based boards.
 
The teensy3 does work with the lib, I connected the PS3 controller when I plug it in with USB.
It also partly works with the Bluetooth Dongle, it recognizes the dongle, and attempts to connect to the controller, but it doesn't connect and gets this message:

Class of device: 00 05 08
Incoming Connection Request
HCI event error: 06
 
Okay, I got it working, here's what I did:

1st) I started with the USB_Host_Shield_2.0 lib from the link you (Paul) just posted.
2nd) I added Teensy 3.0 SPI to usbhost.h
3rd) I added Teensy 3.0 pins to avrpins.h

Paul, I did not do any of the other four edits you did. I wanted to add JUST pin support, and see what happened.

I can now use USB Host Mini + Teensy 3.0 with PS3 Controller (both USB & Bluetooth)
I can now use USB Host STD + ATMege1280 with PS3 Controller (both USB & Bluetooth) with the same lib.

I don't know what was the cause of the problem (and as usual I don't care) but this seems to have fixed it.
 
Okay, I got it working, here's what I did:


I can now use USB Host Mini + Teensy 3.0 with PS3 Controller (both USB & Bluetooth)

How did you power/wire the USB host mini to the teensy 3? I have just done some experiments with Sparkfun USB host shield and Arduino meg2560. To get a Logitec joystick to work, I had to provide 7.5v to the DC input jack on the 2560 board. I presume I'll need to get the 3.3v USB Host mini for the teensy 3, but I worry about the 5v power required .
 
Status
Not open for further replies.
Back
Top