PDA

View Full Version : USB Host Status?



nixcamic
12-27-2012, 05:51 AM
Just wondering what the current state of using a teensy 3 as a USB host is?

stareye
01-23-2013, 11:44 PM
Paul, are there any news about USB host mode on a teensy3? Id need it for an ADK application.

Thanks!

PaulStoffregen
01-25-2013, 02:07 AM
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....

RussNelson
02-27-2013, 07:04 PM
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.

W11cE
02-27-2013, 07:33 PM
There is this USB host shield: http://www.pjrc.com/teensy/td_libs_USBHostShield.html
But it doesnt work with teensy 3.0. Imo i would rather use this shield instead of teensy 3.0 built-in host feature. Are there plans for supporting this shield on teensy 3.0 ?
No hurry, Im just asking.

syburgh
03-15-2013, 10:05 PM
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?

PaulStoffregen
03-15-2013, 11:26 PM
The upload via I2C is definitely not ready.

donpdonp
06-21-2013, 08:56 PM
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.

PaulStoffregen
06-21-2013, 10:41 PM
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.

W11cE
06-23-2013, 06:28 PM
How about this USB host shield: http://www.pjrc.com/teensy/td_libs_USBHostShield.html
Any news for this?

PaulStoffregen
06-24-2013, 11:42 PM
I actually started fiddling with the host library a few weeks ago. If you want to play with some utterly untested and unlikey-to-work (but at least compiles) code, here it is:

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

W11cE
06-26-2013, 04:04 PM
Thanks. I will try that library when i have some time. Nice to hear that you have at least worked with it.

btmcmahan
08-30-2013, 05:31 AM
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?

PaulStoffregen
08-30-2013, 06:13 PM
any recent developments?

No, nothing new since message #11 in this thread.

W11cE
08-31-2013, 01:48 PM
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(?).

palesius
09-03-2013, 08:01 PM
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?

W11cE
09-03-2013, 09:09 PM
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).

btmcmahan
09-13-2013, 02:40 AM
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?

btmcmahan
09-14-2013, 12:24 AM
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?
931
932

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

W11cE
09-14-2013, 02:50 PM
This is the wiring tutorial for older teensys: http://www.pjrc.com/teensy/td_libs_USBHostShield.html

And i used those basic teensy 3.0 SPI pins. This is the shield we are talking about here: http://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino-pro-mini
Dont know about that shield.

btmcmahan
10-06-2013, 07:07 PM
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

PaulStoffregen
10-06-2013, 08:39 PM
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.

btmcmahan
10-06-2013, 09:10 PM
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

btmcmahan
10-06-2013, 09:54 PM
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.

manitou
05-03-2014, 12:04 AM
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 .

luisonoff
05-30-2014, 12:52 PM
Hello, I am quite noob about this topic.
My question is: will it be possible (some day) to connect my xbox360 gamepad directly to the usb port of Teensy 3.x?

Or will I always need some sort of shield like this (https://www.circuitsathome.com/category/mcu/arduino/usb-shield)?

Thank you very much,

Luis R.

maddis
11-02-2015, 04:16 PM
Hi,

This is bit old thread, but just what I wanted to know. I'm planning on starting new project and Teensy 3.2 is pretty much exactly suited for it at least HW side. I need to access USB serial device from it so I need USB host mode support for it. What's the latest status of the USB Host status and/or does this work now work with Teensy 3.2 too? If it does, it seems to do everything I need for USB access. I'm okay to have separate shield and not use the built-in USB in host mode.

https://www.pjrc.com/teensy/td_libs_USBHostShield.html

Seems that you get 3.3V out from Teensy 3.2 so that shouldn't be a problem as long as the SW side works.

Manuel Stahl
01-19-2016, 05:25 PM
See also https://forum.pjrc.com/threads/28173-Teensy-3-x-NATIVE-USB-HOST-PREVIEW-AVAILABLE?highlight=usb+host

maddis
01-19-2016, 06:46 PM
I got the USB host library working even without seeing that post, but good to know that it's official too.

Although it seems that I'm using different library than what is mentioned in the post.

Manuel Stahl
01-19-2016, 06:50 PM
Did you use a host shield or integrated host? And which library did you use?

maddis
01-19-2016, 06:52 PM
I used host shield and I used the USB Host Shield Library 2.0. Now that I looked more I think the link you sent is for rework of the USB Host Shield Library 2.0?