Fresh update of USB Host Library 2.0 has just been posted to GitHub. The primary purpose of this release is to maintain compatibility with Arduino releases – the USB Host Library is now compiles in 1.0 as well as pre-1.0 versions of Arduino IDE. Enjoy!
Several important changes have been made to the code, some related to 1.0 compatibility and some not. The library examples were all tested and corrected, the information below is intended for developers using the library in their own projects:
- PL2302 driver. Arduino 1.0 defines PL symbol internally (thank you, Paul for finding this out!), therefore, I needed to change name of Prolific class driver. The new name is
- NAK handling. A bug preventing long polls of an endpoint has been fixed. Previously, if
- Code speed. An unnecessary delay of 20ms has been found (thank you, Alex for discovering this!) and removed from
PL2302
; I updated library examples to compile correctly, if someone uses this class in their own development, the right way to define an instance of Prolific device is now PL2303 Pl(&Usb, &AsyncOper);
bmNakPower
member of epInfo
structure was left unitialized the transfer to this endpoint would stop after receiving a single NAK. With current version, the endpoint would be polled for up to 5 seconds. This is rarely desirable, so please initialize bmNakPower
with USB_NAK_DEFAULT
or USB_NAK_MAX_POWER
. If a single poll is desired, as is often the case with interrupt endpoints, specify USB_NAK_NOWAIT
and if more than maximum number of NAKs (up to 5 seconds) is necessary, specify USB_NAK_NONAK
.
USB::setAddress()
member function. As a result, every USB transfer is now 20ms faster. While generally a good thing, it could inadvertently affect data exchanges with slow endpoints. If after upgrading to the current version you start seeing more NAKs, that’s probably why.
One nice thing about Arduino 1.0 is built-in PROGMEM support for strings. It is now possible to free about 300-400 bytes of RAM by redefining USBTRACE and USBTRACE2 macros used in debugging output (thank you, John, for the tip!). For example, USBTRACE (Serial.print(F(s)))
will move all USBTRACE strings to PROGMEM. The code size will increase so be careful with this feature if your code size is close to the limit for your Arduino board.
This is the end of announcement – download the code, play with it and if you have any issues please share your findings in the comments.
Oleg.
Hi Oleg,
I just upgraded to the new library, but now all inTransfers takes forever (several seconds).
I have uncomment “nak_limit–;” and now everythings works perfect again.
I’m using the inTransfer function with a bluetooth dongle via a interrupt endpoint – I have both tried to set bmNakPower to USB_NAK_DEFAULT, USB_NAK_MAX_POWER, USB_NAK_NOWAIT, and USB_NAK_NONAK but it does help at all.
I seems like it’s a problem with the library.
Regards
Lauszus
which driver are you using?
I’m using the newest one you just uploaded compatible with Arduino IDE 1.0.
Which device driver out of this library you are using? You’ve mentioned bluetooth dongle – I don’t support them yet. Are you talking about the driver you’re developing yourself?
Oleg,
I’m also interested in getting a BT USB dongle (from Cambridge Silicon Radio Ltd) to work; I “only” need the serial COMM profile of the BT dongle. I would be very glad for any help in this field, as I would like to focus on my primary application of using an Arduino with your USB host shield to transfer data between a special USB serial interface cable (w/ stock FTDI) and the BT dongle, where the Arduino handles the time-critical aspects of half-duplex serial line communication for an Android device attached via BT.
Yes I’m using the one I’m currently developing 🙂 My code is almost finished btw – hope to publish it this weekend.
But the “nak_limit–-;” line seems to course problems. It works fine without it.
It also sometimes freeze, but when I re added delay(20), it never freeze up anymore. Maybe your could make a way, so one could decide which one to use?
I’ve found that putting the delay(20) back into the Usb::SetAddress function allows the latest library to work when using the ADK (without it, it gets stuck on the getProto). If I don’t (and I uncommented the USBTRACE2 ADK Init Failed line), these are the results I get when trying term_test (or really any of the adk samples).
ADK demo start
ADK Init
getProto:
ADK Init Failed, error code: D
Which phone model are you using?
I am using a Motorola XOOM Tablet.
I don’t see it on Nexus S. Nevertheless, I increased NAK allowance for ADK and added a delay into
ADK::Init()
, see adk.cpp, line 203. Could you please test the code (if possible, with and without delay) and see if it makes any difference?Ok … I went and downloaded/installed the latest (with the adk.cpp delay at line 203 and the delay gone from the change I had made in the usb.cpp). It worked with the delay in right off the bat, no problems. Then I commented out the delay in adk.cpp at line 203… I rebooted the XOOM just to make absolutely sure everything was stable and tried it … it got stuck again at the getProto call (just like before I put the delay back into the usb.cpp file) … I then put the delay back into the adk.cpp at line 203 … and it worked again. And when I say worked, the application (in this case the term_test started right up) … but when I type something into the text box and send to the arduino, the application force closes. So, just for grins I removed the delay from the adk.cpp and put it back in the usb.cpp (as the final line in the setAddress method)… and everything is working again. So, yes … it helps with initialization of an ADK app with the delay in adk.cpp for the XOOM, but when it comes time to communicate after initialization, it’s seems to still have problems without the delay in the usb.cpp setAddress method. Hope that helps.
I did a little more testing with the latest (with the delay in Usb.cpp put back in and it taken out of adk.cpp on my XOOM … this time I did it with a modified DemoKit sketch that basically has one of everything working (1 Button, 1 Relay, 1 Servo, 1 3-Color LED, a TMP36 for Temperature [which means I slightly modified the Android App too] and a Photo Resistor for Light).
If I just run the sketch and bring up the DemoKit app on the XOOM, it runs fine (I just get a lot of incorrect readings from the Temperature, Light and Joystick … which for this test is fine). But…
When running the above mentioned sketch … There is nothing connected for the sketch so just readings from the unconnected Arduino analog inputs…
Version 1 (from 11-30-2011) … the Temperature, Light and Joystick readings jump all over the place … probably around 10 times / second.
Version 2 (from 1-10-2012) … pretty much the same as Version 1 … but it may be a little slower (again, this is with the delay put back into usb.cpp).
Version 3 (from 1-13-2012) … A LOT SLOWER (again, this is with the delay from adk.cpp removed and put back into usb.cpp) … at most 2 times / second.
Now, I’d like to believe that something between Version 2 and Version 3 stabilized readings coming from the Arduino … but I kind of think not.
HID keyboard sketch failed, enabled prints in hidboot.h
BM Init
Addr:1
NC:1
0000: … HexDump print …
stuck after that
Sorry, direct connection without hub does work. Need to modify sketch…
Keyboard and mouse, connected through hub, do not work correctly on new version. First few reports are correct, after that mouse output stuck, until keyboard is pressed. The same sketch works perfectly on arduino-23 and prev.lirary
Can you send me your code, please?
Hi,
Should I post the sketch here in plain text, or should I use some html tags to hide/show code in order not to overflow the thread? OK, this sketch has a drawback – it does not work for some usb hub connections, but eventually by changing usb hub port for keyboard/mouse you can get correct order of initialization (I had to modify hidboot.h and hidboot.cpp for stable init, but it’s another story). I just re-tested it, and it works in v.23. In v.1.0 the mouse print does appear only after keyboard press.
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
class KbdRptParser : public KeyboardReportParser {
void PrintKey(uint8_t mod, uint8_t key);
protected:
virtual void OnKeyDown (uint8_t mod, uint8_t key);
virtual void OnKeyUp (uint8_t mod, uint8_t key);
virtual void OnKeyPressed(uint8_t key);
};
void KbdRptParser::PrintKey(uint8_t m, uint8_t key) {
MODIFIERKEYS mod;
*((uint8_t*)&mod) = m;
Serial.print((mod.bmLeftCtrl == 1) ? “C” : ” “);
Serial.print((mod.bmLeftShift == 1) ? “S” : ” “);
Serial.print((mod.bmLeftAlt == 1) ? “A” : ” “);
Serial.print((mod.bmLeftGUI == 1) ? “G” : ” “);
Serial.print(” >”);
PrintHex(key);
Serial.print(“dX, DEC);
Serial.print(” dy=”);
Serial.println(mi->dY, DEC);
};
void MouseRptParser::OnLeftButtonUp (MOUSEINFO *mi) {
Serial.println(“L Butt Up”);
};
void MouseRptParser::OnLeftButtonDown (MOUSEINFO *mi) {
Serial.println(“L Butt Dn”);
};
void MouseRptParser::OnRightButtonUp (MOUSEINFO *mi) {
Serial.println(“R Butt Up”);
};
void MouseRptParser::OnRightButtonDown (MOUSEINFO *mi) {
Serial.println(“R Butt Dn”);
};
void MouseRptParser::OnMiddleButtonUp (MOUSEINFO *mi) {
Serial.println(“M Butt Up”);
};
void MouseRptParser::OnMiddleButtonDown (MOUSEINFO *mi) {
Serial.println(“M Butt Dn”);
};
USB Usb;
USBHub Hub1(&Usb);
USBHub Hub2(&Usb);
USBHub Hub3(&Usb);
HIDBoot Keyboard(&Usb);
HIDBoot Mouse(&Usb);
KbdRptParser PrsK;
MouseRptParser PrsM;
void setup() {
Serial.begin( 9600 );
Serial.println(“Start”);
if (Usb.Init() == -1) Serial.println(“OSC did not start.”);
delay( 200 );
Keyboard.SetReportParser(0, (HIDReportParser*)&PrsK);
Mouse.SetReportParser(0,(HIDReportParser*)&PrsM);
}
void loop() {
Usb.Task();
}
Oops, this is a bad way to post code… I will send it by E-mail.
I got it. Will take a look.
Hi,
Based on focus stacking assistant code, I used Arduino Uno w/Arduino 1.0, QP 4.3, USB Host Shield 2 (lib & hw), PTP2. Adding a pin ISR for encoders and keeping the existing timer ISR for buttons, i can’t manage to get USB working (OSCOKIRQ failed to assert). Do i run out of ISRs ? Am i doing something wrong ? I saw the GPIN on USB Host Shield perhaps should i use these instead ?
regards
I found the issue, that’s before IRQ enable, when setting pin mode as follow :
#define ENC_SW1 0x08 // 11, Port B — Switch 1
#define ENC_SW2 0x10 // 12, Port B — Switch 2
setup :
DDRB &= ~(ENC_SW1 | ENC_SW2); // 0 – INPUT
PORTB |= (ENC_SW1 | ENC_SW2); // 1 – HIGH
if (Usb.init() == -1)
and that broke USB init. Could you help me and tell me why ? (i have nothing on pins 9 & 10, port B) That’s probably a newbie question …
I finally found the issue : based on your Hardware Manual i thought pins 11 & 12 were free to use on Arduino Uno. But reading your USB Host Shield 2 released announcement, i saw that USB Host Shield used SPI signals on ICSP, corresponding to pins 11-13 that finally are unavailable (did i understand ?). prehaps you should add to your Hardware Manual that even if SPI is user through ICSP, SPI pins 11-13 are unavailable.
http://www.circuitsathome.com/store/usb-host-shield-2-0-released
Hello, I plan to use the mini usb host shield v1.1 with a Mega pro 3.3V from sparkfun ( http://www.sparkfun.com/products/10744 ). I wired MISO, MOSI and SCLK on the corresponding pins on the mega (50,51,52) SS to 10 and INT to 9.
When I run board_qc (with 022 arduino) I get
=============================================
Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register… Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K……………. SPI long test passed
GPIO test. Connect GPIN0 to GPOUT7, GPIN1 to GPOUT6, and so on
Test failed. Value written: 00 Value read: FF
Press any key to continue…
GPIO test passed.
PLL test. 100 chip resets will be performed
Resetting oscillator
Reset number 0 Time to stabilize – 350 cycles
Reset number 1 Time to stabilize – 352 cycles
[…]
Reset number 99 Time to stabilize – 350 cycles
Reset number 100 Time to stabilize – 352 cycles
Checking USB device communication.
Waiting for device …
Waiting for device …
Waiting for device …
[Indefinitely]
=============================================
The same usbhost board works fine on a arduino mini pro with an usb key and an EOS DSLR
Should I wire SS to 53 (the by default SS on the Mega) ? I could have miss-wired something wrong as all is done by hand on a proto-shield. Any idea on what I did wrong ?
SS seems to be fine, as well as the rest of SPI signals – if they were wrong the test would halt much earlier. How did you wire power/ground? INT could be wrong too – check to make sure it is the same port pin as on original Mega 2560.
Thank you for your help Oleg, it was power related. I found out that when the programming cable is attached, the mega pro doesn’t draw power from the (also attached) battery and then doesn’t give enough power to the uhs. I quickly adapted the board_qc sketch to output to my Graphic LCD, removed the programming cable and was able to get detection on battery power alone.
Thank you again.
hello,
when i tried this library. then i m getting an error “OSCOKIRQ failed to assert” so how could i over come this.???
which shield are you using?
hi,
i m using your library, when i attached mega adk to my system via USB. so i cant find anything so any kind of tool is available which can help me for see the data.
i have MEGA ADK, and working on windows XP. just need a tool who can help me listen the USB.
Using your drivers, can I get the USB to work in peripheral mode instead of host mode? I am connecting the ADK to a device with a host, so I need the ADK to fall back as a peripheral insread of host.
peripheral mode is not supported in this code
Hey wackoweazil,
did you find an alternative to set the MAX3421E chip into peripheral mode? I’m looking for code to do that as well since I have a similar project where I want the Mega ADK board to act as a peripheral instead of a host.
I have been trying to get your new USB_HOST_SHIELD library to work with the Sparkfun board, I have changed max4321e.h to include MAX_GPX 7
#define MAX_RESET 8 for my shield model and I am still getting the following errors do you have any suggestions?
Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register… Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K
Test failed. Value written: 01 read: 00
Unrecoverable error – test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test
I don’t support this board.
I’m also having a problem on Motorola Xoom.
I’ve been using the previous versions of the library successfully, but in Arduino 1.0 with the newest version of this library (including the delay(20) line in adk.cpp) I’m having this problem:
Board starts, then output:
————————–
ADK Init
ADK protocol rev. 1
Accessory mode switch attempt
ADK Init
Acc.mode device detected
————————–
then the board prompt comes up on the DemoKit and allowing access brings up the DemoKit control
…but then nothing. acc.isReady() is still false, and attempts to write to the accessory on the Android fail.
I’m having a similar problem in my previously-working custom code.
I tried taking the delay(20) line out and got results similar to the post by Jeff (Jan 12) above.
My setup:
Arduino Mega2560
Circuits@Home 2010
USB Host Shield
rev.2.0
07 Dec 2010
Motorola Xoom running Android 3.2
Android: Stock google DemoKit project
Arduino: The ‘demokit_20’ example from the library example folder
Thanks for any help!
It seems that ADK::Init() fails. Can you find out where it fails – uncomment USBTRACEs at the end of Init(), recompile and send me the output?
As it turns out, uncommenting all the USBTRACEs in ADK::Init() actually makes the library work (more often) for me (both in demokit_20 and in my custom sketch). I did have one problem with getAccessoryStrings on Android side, but it was transient and I’ve seen it before the newest library update.
The idea that uncommenting USBTRACE fixed the library seemed strange, so I verified it by using versions of the library with and without the USBTRACEs. Consistently, running the library with USBTRACEs worked and running the library without USBTRACEs stalled during ADK::Init (in the way originally posted). I thought the situation may be that the USBTRACEs added a little extra delay, so I attempted a test with delay(40) and the USBTRACEs disabled, which still stalled.
I will email you the two copies of adk.cpp I used, as well as my logs, which show both the Arduino and Android debug information for each case. The summary is below (in time order, with 3 tests each for with and without USBTRACE enabled):
NoUSBTRACE_Test1: Arduino stalled, Android sees device but can’t write to it
YesUSBTRACE_Test1: Arduino gets some data, Android fails on getAccessoryStrings
YesUSBTRACE_Test2: Arduino can receive data, Android can send data (same code as YesUSBTRACE_Test1)
YesUSBTRACE_Test3: Arduino can receive data, Android can send data (same code as YesUSBTRACE_Test1)
NoUSBTRACE_Test2: Arduino stalled, Android sees device but can’t write to it (same code as NoUSBTRACE_Test1)
NoUSBTRACE_Test3: Arduino stalled, Android sees device but can’t write to it (same code as NoUSBTRACE_Test1)
Between each test, I reinstalled the software on both Arduino and Android.
Thank you very much for your help on this!
ADK init makes two passes. It looks like the first pass works every time – with and without prints. The second pass fails but it’s not clear when. It happens between lines 151 and 200 in adk.cpp (line numbers per current github variant of the file). Just remove prints one by one and compare results. It is most likely one of USB transfers, so you can uncomment prints after “Fail..” labels and see which USB transfer fails.
Aha! Thanks for the guidance above. It really helped me find some things:
So it turns out the routine was failing at the getConf step. I managed to get it working by simply trying to get the config data again. Without lots of USBTRACEs in the file, I consistently fail the first attempt but succeed on the second attempt.
In adk.cpp, starting at (original code) line 160, I replaced the if(rcode) block with:
————————————————————————————–
if( rcode ) {
USBTRACE2(“\r\nGot 1st bad code for config: “, rcode);
// Try once more
rcode = pUsb->getConfDescr(bAddress, 0, i, &confDescrParser);
if( rcode ){
USBTRACE2(“\r\nGot 2nd bad code for config: “, rcode);
goto FailGetConfDescr;
}
}
————————————————————————————–
I decided to take this a step further and try running the code without the delay(20) line. It failed on the getProto step, so I decided to try to simply rerun the getProto call once when it fails. This now seems to work with the Xoom, although each time I fail the first call to both getProto and getConf.
In adk.cpp, starting at (original code) line 209, I replaced the if(rcode) block with:
————————————————————————————–
if( rcode ){
USBTRACE2(“\r\nGot 1st bad code for proto: “, rcode);
rcode = getProto((uint8_t*)&adkproto );
if( rcode ){
USBTRACE2(“\r\nGot 2nd bad code for proto: “, rcode);
goto FailGetProto; //init fails
}
}
————————————————————————————–
It seems like the Xoom is just slower at responding to these ADK configuration requests. What do you think? Would it help to make a ‘RETRY_MAX’ parameter for each of the getXXX calls in adk.cpp, or would that in some way violate the ADK spec or library integrity? I checked the ADK docs here: http://developer.android.com/guide/topics/usb/adk.html#wait-adk and it seems like Google’s sample code doesn’t expect there to be failures here either. Could there be some delay in the SPI/USB controller system or something?
Thanks again for your help and your quick replies thus-far!
What is rcode value after the first attempt?
rcode for first getProto is: D
rcode for first getConf is: D
ADK::init also gives an error code of FF
(from the following trace, based on the adk.cpp file as changed above):
—————————————-
ADK demo start
ADK Init
Got 1st bad code for proto: D
ADK protocol rev. 1
Accessory mode switch attempt
ADK Init Failed, error code: FF
ADK Init
Acc.mode device detected
Got 1st bad code for config: D
Configuration successfulData rcv. :4
Data rcv. :4
Data rcv. :4
…
—————————————-
D means device is not responding in time (not even sending a NAK), so increasing NAK limit won’t do us any good. Try to place some big delays ( 100, for example ) before calls to getproto and getconf.
Error code FF can be ignored – this is a result of two step initialization of the ADK.
Adding a delay right before the ‘rcode = …’ line for getProto and getConfig made it work on the first attempt. I started at delay(250) and narrowed it down to delay(1) as the boundary (delay(1) works). I tried delay(0), which failed on the first try but still connected on the second try. I verified that running without a delay statement still doesn’t connect on the first try. Both of the XOOMs I tested (one running 3.2 and one running IceCreamSandwich 4.0.3) exhibited this behavior.
I found a NexusOne to test. It does not require the delay to connect on the first try.
Trace:
—————————————
ADK demo start
ADK Init
ADK protocol rev. 1
Accessory mode switch attempt
ADK Init Failed, error code: FF
ADK Init
Acc.mode device detected
Configuration successfulData rcv. :4
Data rcv. :4
Data rcv. :4
Data rcv. :4
…
—————————————
So my current fix is to leave in a delay(1) before getProto and getConfig and also leave in the ‘try again’ logic in case. Let me know if there is anything else I should check!
Thank you – this looks like a good fix! I’m going to incorporate it into the main branch so other Xoom owners can use it.
After reading your post, I decided to go get the latest USB Host library from GitHub (although the only differences I saw from what I had are some Mega ADK support updates that don’t apply … I did load the stock Android Demokit app, etc. Basically trying to reproduce what you are seeing … and I wasn’t able to, after, again, making the delay changes (as I have mentioned previously … remove from adk.cpp, put back into usb.cpp), everything is working fine. Plus I used my Mega 2560 (Arduino R3) … so I feel like I’m comparing apples-to-apples.
So … just for grins … a couple questions about your XOOM … you said your are running Android 3.2 … I’m running 3.2.1 … I don’t know if it matters, but hey, it’s different I guess. I do have a 3G XOOM not a WiFi only … although at this level, I doubt it matters. Haven’t had it upgraded to 4G LTE … but I don’t even use the 3G, so didn’t see any sense.
Also, I am using an unrooted XOOM. Basically the OS is what came from the factory plus any upgrades that were available (Over-the-Air) have been applied.
I’ve also tried it with a number of other ADK apps I’ve been playing with … all seem to initialize/configure and run as-expected.
I actually have 2 XOOM devices. The one I was writing about is running Android 3.2 and lists the model number MZ604. The other is running Android ICS (4.0.3) and only lists the model number as ‘XOOM’. I hadn’t tested the second one because it gave me some trouble with adb.
I just tested the 4.0.3 one (without an active adb this time). Both XOOM tablets exhibit the same behavior: both fail initially on both the getProto (when delay(20) in adk.cpp is disabled) and getConfig calls, but both tablets successfully connect on the second attempt (as modified in the other post).
As mentioned in the post with Oleg, adding a delay of even 1ms fixed the problem.
The only difference I see is that I’m using an Arduino 2560 R2 board instead of R3.
Thanks for your feedback!
Hello, my USB shield just arrived in the mail! I have an ATmega 2560 Arduino board, and have spent some time with the “sketches”, plus my MegaMoto shield…
I downloaded USB-Shield-2.0 from the github and I’m trying to explore some of the examples.
\felis-USB_Host_Shield_2.0-4dcef5e\examples\hub_demo\hub_demo.pde seemed like a good place to begin.
OK, now I get to publicly demonstrate just how clueless I am. This .pde file, I tried opening it in the Arduino IDE but it causes major errors. This isn’t really a .pde file, is it? It’s a .cpp file in disguise?
What do I do with this file? Is this meant to be opened with some other software? Please advise.
Where did you place the library – is it in %arduino/libraries/libraryname directory? What kind of errors are you getting?
OK, some of my confusion stems from the fact I have dual-boot PCs here, Window$/Ubuntu. The problems I mentioned were encountered in W$.
Some quick google searches informed me that #include says “this file is somewhere else”. How does the Arduino IDE (version 1.0) know where to look? I can’t find any setting or preference that defines this.
I did try changing the statements to #include “something.h” and copying the named file to the same folder as the .pde example. (a lot of work) That seemed to silence the “file does not exist” errors, and the Verify seems to complete, but I haven’t yet managed to upload the compiled example to my ATmega 2560/USB-Host-Shield combo.
On the Ubuntu side of things, I have the Arduino IDE in a folder in ~/Public, and I have found the Arduino libraries at /usr/share/arduino/libraries/ I have copied the USB 2.0 libraries there. Question, should the Examples folder be there, or in my home directory?
Library path is defined in the IDE. Sketches can be anywhere, however, ones in examples directory can’t be modified. Take a look at this site -> http://www.arduino.cc/ , it has a lot of information about Arduino basics.
error in previous post change “#include says ‘this file is somewhere else'” to “#include says ‘this file is somewhere else”
grr. can’t use caret symbol? grr.
http://www.arduino.cc yes, I’ve been digging and flailing on that website. I what I find is many people asking this question and a very FEW “opinions” on what the correct answer might be.
One user insists that “non-standard libraries” should be in a subfolder named /libraries in the sketchbook folder. I tried that, and at least on the Ubuntu side of my computer, I am now able to compile and upload USB_desc.
In the absence of a definitive statement by Arduino, I’ll consider this conditionally solved, barring future repeats.
However, with USB_desc compiled and uploaded, the Serial Monitor spews one line of garbage and halts when I insert a vfat formatted USB stick into the Host Shield.
What do I do now? I’m SO confused!
You need to change serial speed in the monitor to 115200.
Arduino takes external libraries such as Olegs and others stored in /sketchbook/libraries and adds those libraries to its working path . So it a path to the “C” and header files ready to use.
When you open Arduino it picks these up for your use automatically . If you store them somewhere else you will have to tell your PATH statement where to look
YES!! Thanks Oleg. I do hope I’m past this very steep part of the learning curve I tend to think of as “the hair pulling stage”.
I hope this post formats the way I think it’s supposed to. No preveew, just pull the trigger and see where the bullet lands….
I’m reading through the lines of code in the example sketches. I see commands I’m not familiar with, like
void PrintAllAddresses(UsbDevice *pdev)
{
UsbDeviceAddress adr;
adr.devAddress = pdev->address;
Serial.print("\r\nAddr:");
Serial.print(adr.devAddress, HEX);
Serial.print("(");
Serial.print(adr.bmHub, HEX);
Serial.print(".");
Serial.print(adr.bmParent, HEX);
Serial.print(".");
Serial.print(adr.bmAddress, HEX);
Serial.println(")");
Good old Serial.print, that’s familiar enough. I get the idea that commands like UsbDeviceAddress are specific to the USB Host Shield. “adr” seems to be an object, with properties like “adr.mbAddress”.
I vaguely understand what that does, but these new commands and their arguments & syntax are a mystery. These commands aren’t listed on the Arduino site, are they? I don’t think so. Is there a reference available for these commands?
Thanks again for all your help, past present and future.
The source code of the library is the best reference; also, you can find some explanation of the code in the articles under “programming” tag.
Thanks a ton for your help with the XOOM problem! I’m sorry to say I already have another question:
I’m also trying to get your library working with the Mega ADK.
It likes to fail with the ‘OSCOKIRQ failed to assert’ problem.
I thought I had found the solution when I noticed the commented-out #define for ADK in avrpins.h.
This does allow the library to initialize (no ‘failed to assert’ this time), but when I plug in an Android device (I’ve tried Xoom and Nexus One), I get nothing.
I put some USBTRACE lines into USB::Task and found that the state there isn’t changing at all when plug things in. I also managed to uncomment the VBus printlns in MAX3421e::Task. The whole system just doesn’t notice when I plug something in. It’s stuck on tmpData = SE0, usb_task_state = USB_DETACHED_SUBSTATE_WAIT_FOR_DEVICE, vbus = 0. I bet I have the wrong pins indicated…
Is there a straightforward way to tell which pins are being used? The compiler complained when I tried println’ing the SS and INTR template variables.
My overall question (I can try to help debug/answer this if needed):
What things need to be done to the stock library to get it working with the Arduino Mega ADK board?
So far:
Uncomment ‘//#define BOARD_MEGA_ADK’ on line 24 in avrpins.h
??
I don’t support other vendor’s boards. Mega ADK support has been added by kibab via pull request. You may want contact him and/or to try his fork -> https://github.com/kibab/USB_Host_Shield_2.0/tree/kibab, apparently, it worked for him.
I just noticed that the current software isn’t really compatible with unplugging devices (entries don’t get removed). Will this feature come in later versions or will we have to reset the board after each removal of a usb device?
How did you check? I just ran some sketches, the device plugs and unplugs just fine. I tried USBHIDBootMouse – do you see anything different?
Downloaded latest today
board QC test hangs
changed this function
void press_any_key()
{
Notify(PSTR(“\r\nPress any key to continue…”));
while( Serial.available() <= 0 ); //wait for input
Serial.read(); //empty input buffer
return;
}
Hi Oleg
First off, great stuff your doing. I am looking to do some DSLR control, but…
I bought a USB Shield V2.0 from you and I am having difficulties with the board. It consistently fails with the OSC stage of the test. OSCIRQ failed or OSC didn’t start. What do you suggest I try next?
Thanks in advance
Les
Do you have all the headers soldered on, including 2×3 ICSP header? If you have all of them in place, load board test, run it and post the output. https://github.com/felis/USB_Host_Shield_2.0/tree/master/examples/board_qc
I am using a UNO and I did NOT solder the 2×3 ICSP in. There is nothing to connect it to. ???
when I load the board_qc as you suggest, I get this response.
Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register… Die revision invalid. Value returned: 00
Unrecoverable error – test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test
for what it’s worth, I have gotten OSC type errors with other sketches.
Thank you for your help.
Les
There should be ICSP header on Arduino board next to top right corner of Atmega which will mate with 2×3 header on USB Host Shield soldered female side down. Does your Arduino board have this connector?
Hello, i’m trying out your new library with ARduino 1.0 on a Arduino Nano v3.0 with the USBHost-4Nano v1.0 (Webstore: http://www.gravitech.us/usadforarna.html)
I tried you example PDE code, and got this result:
———————————————————————
USB Host Shield Quality Control Routine
Reading REVISION register… Die revision invalid. Value returned: 00
Unrecoverable error – test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test
———————————————————————
You talk about ICSP Header, my does have this ISCP connector. What does this have to do with USB host shield library
Does this have to do with pin selection in MAX3421E_contstants?
–Usb Host Shield 4 Nano Documentation:—————————-
Webstore: http://www.gravitech.us/usadforarna.html
Schematic: http://site.gravitech.us/Arduino/USBHOST-4NANO/Schematic.pdf
Mechanical Dimensions: http://site.gravitech.us/Arduino/USBHOST-4NANO/Dimensions.pdf
MAX3421E datasheet: http://site.gravitech.us/Arduino/USBHOST-4NANO/MAX3421Edatasheet.pdf
——————————————————————-
This board is not compatible with my code.
What is needed to make it comptatible?
Does this shield not use to the same MAX3421E chip?
That was it. I didn’t know you used those lines for runtime. I thought they were like a JTAG function where you could test your board(s) after assembly. All is well, thank you. Lot’s of fresh snow up there, and sunshine… go get some runs in eh?
This is programming header and AVR uses SPI for programming. SPI is also available on pins 11-13 on standard size Arduinos. However, on Megas SPI is routed on different pins. If you want to have a shield which fits both standard and megas, take SPI from ICSP (on official Arduinos it is also located in the same place relative to other pins).
Nice thinking, compatibility over several form factors is always a sweet design. Nice Job!
I have just got a host shield up and running with your library. I have tested the board and it passes the test. I have connected a Huawei GSM modem. The USB_desc example runs fine and gets a device with the following output:
1
—
Device descriptor:
Descriptor Length: 12
Descriptor type: 01
USB version: 0200
Device class: 00
Device Subclass: 00
…. all the way to:
Addr:1(0.0.1)
But if I run the acm terminal example it stops here:
Start
ACM Init
Addr:1
NC:1
and I can’t enter in any AT commands. Is this a problem with the modem or the setup?
What do you have in configuration descriptor?
How do I find the configuration descriptor with the 2.0 library? I found this page:
http://www.circuitsathome.com/mcu/arduino-usb-host-part-3-descriptors
But it has old code that throws an error ‘class MAX3421E’ has no member named ‘powerOn’
just run USB_desc and post the whole output.
This is what I get:
01
—
Device descriptor:
Descriptor Length: 12
Descriptor type: 01
USB version: 0200
Device class: 00
Device Subclass: 00
Device Protocol: 00
Max.packet size: 40
Vendor ID: 12D1
Product ID: 1446
Revision ID: 0000
Mfg.string index: 03
Prod.string index: 02
Serial number index: 00
Number of conf.: 01
Configuration descriptor:
Total length: 0037
Num.intf: 02
Conf.value: 01
Conf.string: 01
Attr.: E0
Max.pwr: FA
Interface descriptor:
Intf.number: 00
Alt.: 00
Endpoints: 02
Intf. Class: 08
Intf. Subclass: 06
Intf. Protocol: 50
Intf.string: 00
Endpoint descriptor:
Endpoint address: 81
Attr.: 02
Max.pkt size: 0040
Polling interval: 00
Endpoint descriptor:
Endpoint address: 01
Attr.: 02
Max.pkt size: 0040
Polling interval: 00
Interface descriptor:
Intf.number: 01
Alt.: 00
Endpoints: 02
Intf. Class: 08
Intf. Subclass: 06
Intf. Protocol: 50
Intf.string: 00
Endpoint descriptor:
Endpoint address: 02
Attr.: 02
Max.pkt size: 0040
Polling interval: 00
Endpoint descriptor:
Endpoint address: 82
Attr.: 02
Max.pkt size: 0040
Polling interval: 00
Addr:1(0.0.1)
Start
01
—
Device descriptor:
Descriptor Length: 12
Descriptor type: 01
USB version: 0200
Device class: 00
Device Subclass: 00
Device Protocol: 00
Max.packet size: 40
Vendor ID: 12D1
Product ID: 1446
Revision ID: 0000
Mfg.string index: 03
Prod.string index: 02
Serial number index: 00
Number of conf.: 01
Configuration descriptor:
Total length: 0037
Num.intf: 02
Conf.value: 01
Conf.string: 01
Attr.: E0
Max.pwr: FA
Interface descriptor:
Intf.number: 00
Alt.: 00
Endpoints: 02
Intf. Class: 08
Intf. Subclass: 06
Intf. Protocol: 50
Intf.string: 00
Endpoint descriptor:
Endpoint address: 81
Attr.: 02
Max.pkt size: 0040
Polling interval: 00
Endpoint descriptor:
Endpoint address: 01
Attr.: 02
Max.pkt size: 0040
Polling interval: 00
Interface descriptor:
Intf.number: 01
Alt.: 00
Endpoints: 02
Intf. Class: 08
Intf. Subclass: 06
Intf. Protocol: 50
Intf.string: 00
Endpoint descriptor:
Endpoint address: 02
Attr.: 02
Max.pkt size: 0040
Polling interval: 00
Endpoint descriptor:
Endpoint address: 82
Attr.: 02
Max.pkt size: 0040
Polling interval: 00
Addr:1(0.0.1)
According to the configuration you don’t have any ACM interfaces in this device – they are all mass storage (0x08). The ACM driver won’t recognize them.
So is it not possible to send AT commands through the USB host shield to this modem?
Is there another way I can do this?
People on the net are talking about some sequence which can be sent to this device to switch it to modem mode. I don’t have this device and can’t confirm.
I know you don’ t need to support this but can you recommend some modems that will work? Also is it possible to do data over a modem?
The one I use here works quite well -> https://www.circuitsathome.com/mcu/interfacing-arduino-to-usb-gprs-modem . I heard it won’t work with AT&T in USA though, only with TMobile. Other than that I only know for sure that Sierra modems won’t work – they use proprietary protocol. Many old GSM phones will work too – if you need GPRS data, Motorola V180, V220 or RAZR (GSM, not Verizon) are aplenty on eBay.
Hi,
I’m been trying to connect with my galaxy tab 7.7 (p6800) since the last few days using the host shield and an uno board. The output when I run the demokit are as follows:
ADK demo start
ADK Init
ADK protocol rev. 1
Accessory mode switch attempt
then it stalled and nothing happen after that. It failed to make the following ” ADK Init” in which in my understanding failed to make the second pass. My tab already switched to accessory mode and the demokit app did launch (verified this in the logcat).
The weird thing is that, after like 20-30 tries (adding delays here and there), it did work and then failed again. Need your help on this, thanks!
which USB Host board are you using?
dfrobot usb host shield : http://www.robotshop.com/dfrobot-usb-host-shield.html
This board is not supported.
But the problem is that it is using the usb host shield v2.0 driver from this page(a link provided in the manufacturer website to github) and it is a MX3421E based board. It is a copycat board or something?
Yes, what you trying to use is a clone, they never asked for my permission to use my design. If you have noted, what they present as a schematic is actually a PDF from my site with my company name and non-commercial license on it. Your problem is not with the code or controller chip but rather a poor implementation of the shield.
I see..now thats why. thanks for the info, will get your shield instead.
hi, whether Usb_Host_Shield_2.0 library compatible with arduino mega adk, before i’ve try connecting to my phone, but not happen anything (can’t show popup ADK) and then I check in serial monitor arduino IDE got a message “OSCOKIRQ failed to assert”, help …?
The compatibility with third-party boards is not guaranteed.
hi oleg… May I ask whether you’ve looked at the Max32 and its USB libraries? They’re just enough different and so poorly documentented, that I am pulling my hair out trying to get a usb HID boot keyboard to work — a mouse works fine. I have looked at all your usb code and libraries, and have tried them on a UNO3 with host shield 2 – they work fine, but I need to do it on the Max32. Any ideas?
I never had a problem with USBHostShield2 library and HID keyboard(s). Can you read HID descriptor (look up examples)? Did you try different keyboards? Are you sure your keyboard is a boot subclass (this is important, since detection is based on that parameter)?
Sorry, I missed the point. Are you trying to get HID class working on Digilent’s ChipKIT Max32 platform, not using Oleg’s HostShield, but PIC USB library?
I also have no problem with USBHostShield2 library. My keyboard works fine with it. But the Digilent Max32 has built in USB and is not compatible with the USBHostShield2 library. That’s basically my issue, as I need to use the Max32 for my project. I’m only asking you guys because you seem very knowledgable, and I’ll take any help I can get.
By the way, you fellows do a great service — I’ve bought stuff from you and I know you aren’t getting rich off it, no matter how much you sell. Thanks..
Yes, and their (ChipKit/Digilent) mouse examples work fine, but they don’t really have a keyboard example.
You may want to try to modify mouse example to work with keyboard. The basic protocol is the same. Don’t forget to allocate bigger buffer. Studying this code could help too -> https://github.com/felis/USB_Host_Shield/blob/master/examples/LCDkbd.pde , explanation -> https://www.circuitsathome.com/mcu/how-to-drive-usb-keyboard-from-arduino
sorry for my English, because I am Brazilian.
I must confess that I am a amateur in programming, because I’m in my first year engineering course.
but every time I try to compile the algorithm I get this error message.
core.a (main.cpp.o): In function `main ‘:
/ Applications / Arduino.app / Contents / Resources / Java / hardware / arduino / cores / arduino / main.cpp: 11: undefined reference to `setup ‘
/ Applications / Arduino.app / Contents / Resources / Java / hardware / arduino / cores / arduino / main.cpp: 14: undefined reference to `loop ‘
I’m using an Arduino Uno, it is possible to use your library here that you provided? and what would be the solution for this error that is happening every time?
thank you very much
You’re having some very basic errors, they are not related to any third-party library. I suggest starting at the http://arduino.cc and work through examples – it will give you better understanding of the environment.
but why this error happens if I’m using the example you provided with all the right extensions.
I am using the example of the ps3 control, because I want to remotely control my project.
your compiler doesn’s see setup() and loop(); it means you are not loading the proper sketch.
Hi,
I’m using a Arduino Mega ADK with the Arduino Ethernet Shield. I am consistently getting “OSC did not start” whenever I try to run code. When I run board_qc I get the following:
Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register… Die revision invalid. Value returned: 00
Unrecoverable error – test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test
What am I doing wrong? Is there some pin definitions I need to change?
Thank you very much
Oh, i forgot to say that I get the same messages with and without the sheild
for those who are interested:
The USB-host port on the Mega ADK won’t work with the version 2.0 library from circuits@home.
You can use version one of the USB-host-lib on the mega ADK but apparently its buggy and it doesn’t work with Arduino 1.0 IDE. you need v1.0 of the IDE for the Mega ADK
there is a fork of oleg’s USB HOST SHIELD 2.0 lib that works
https://github.com/kibab/USB_Host_Shield_2.0/tree/kibab
Hi,
I’m testing Android ADK with a simple blinking led controlled by android but I have problem to connect andoid with arduino board:
I’m using:
– MEDIACOM 10″ TABLET, OS 4.0.3
– SAMSUNG GALAXY Wonder GT-I8150, OS 2.3.6 Kernel 2.6.35.7@DELL170#3
– ARDUINO MEGA ADK
Software:
link1: http://www.tkjelectronics.dk/uploads/ArduinoBlinkLED.zip
link2: http://allaboutee.com/2011/12/31/arduino-adk-board-blink-an-led-with-your-phone-code-and-explanation/
ADK release: adk_release_0512
This is the output I receive from ARDUINO ADK + MEDIACOM:
ADK Init
Address: 0
EP: 0
NAK Power: 10
NAK Limit: FFFF
Address: 0
EP: 0
NAK Power: 10
NAK Limit: FFFF
Addr:1
Address: 1
EP: 0
NAK Power: 10
NAK Limit: FFFF
ADK protocol rev. 1
Address: 1
EP: 0
NAK Power: 10
NAK Limit: FFFF
Address: 1
EP: 0
NAK Power: 10
NAK Limit: FFFF
Address: 1
EP: 0
NAK Power: 10
NAK Limit: FFFF
Address: 1
EP: 0
NAK Power: 10
NAK Limit: FFFF
Address: 1
EP: 0
NAK Power: 10
NAK Limit: FFFF
Address: 1
EP: 0
NAK Power: 10
NAK Limit: FFFF
Address: 1
EP: 0
NAK Power: 10
NAK Limit: FFFF
Accessory mode switch attempt
ADK Init Failed, error code: FF
This is the output I receive from ARDUINO ADK + SAMSUNG I8150:
ADK demo start
ADK Init
Address: 0
EP: 0
NAK Power: 10
NAK Limit: FFFF
Address: 0
EP: 0
NAK Power: 10
NAK Limit: FFFF
Addr:1
Address: 1
EP: 0
NAK Power: 10
NAK Limit: FFFF
Got 1st bad code for proto: 5
Address: 1
EP: 0
NAK Power: 10
NAK Limit: FFFF
getProto:
ADK Init Failed, error code: 5
NOTE:
ARDUINO MEGA ADK:
– I use the latest libraries that I have found on internet:
link1: http://www.tkjelectronics.dk/uploads/ArduinoBlinkLED.zip
link2: http://allaboutee.com/2011/12/31/arduino-adk-board-blink-an-led-with-your-phone-code-and-explanation/
initial code:
#include
#include
USB Usb;
ADK adk(&Usb,”TKJElectronics”, // Manufacturer Name
“ArduinoBlinkLED”, // Model Name
“Example sketch for the USB Host Shield”, // Description (user-visible string)
“1.0”, // Version
“http://www.tkjelectronics.dk/uploads/ArduinoBlinkLED.apk”, // URL (web page to visit if no installed apps support the accessory)
“123456789”); // Serial Number (optional)
I have introduced the delay like XOOM tablet, but same problem.
Anyone may help me,
thanks.
Francesco
Just got my USB shield last week…
Trying to run USBHIDBootKbd
Compiling under Arduino 1.0 all I get is Start when I look at the Serial Monitor.
Loaded and compiled the USB_Desc and found this line in Loop()
if( Usb.getUsbTaskState() == USB_STATE_RUNNING )
so I decided to print Usb.getUsbTaskState and found it was 19, which looks to be – USB_DETACHED_SUBSTATE_ILLEGAL 0x13.
Any help for a beginner with this shield (and not Arduino…)
Thanks
Are you supplying power via Vin – USB power is often not enough for HID devices?
Tried it with power to the power jack along with the USB cable.
Loaded the board_qc sketch and this is the result –
Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register… Die revision invalid. Value returned: FF
Unrecoverable error – test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test
and when I press reset the same response.
Mounted the straight I/O headers and no other changes, board is otherwise stock. Rev 2.0 board, 2 weeks in my hands.
you also need to solder 2×3 header – it goes upside-down to mate with ICSP connector on Arduino board.
Thanks – Guess I’ll have to read the schemtic a bit closer. Now I need to document which pins are used so I can also connect with my 4×40 display.
I am trying to make a communication device for a young woman in Mexico that can’t speak. I am working with a roll-up silicon keyboard as it is resistant to liquids and such, and then the small display. They have a couple 40W solar panels so I want to create a single purpose device that can run off a 12V battery, but have a low power consumption.
Now to integrate the keyboard and the display.
Thanks for the quick replies.
Pete
This page has pinouts -> https://www.circuitsathome.com/usb-host-shield-hardware-manual . The LCD can also be controlled from GPOUT pins of the shield – there are several examples in LCD category.
I am able to use standard Arduino pinouts for this on – pins 1-8 for the display and 9-13 for the USB Shield. Now I just have to work out how to handle decoding all the keyboard keys. (shift and backspace and such)
Should have it functioning later this week. Have some code at work and some code at home.
In file https://github.com/felis/USB_Host_Shield_2.0/blob/master/cdcprolific.h line#44
#define PL_PID ( 0x2303 || 0x0609 )
is referenced from https://github.com/felis/USB_Host_Shield_2.0/blob/master/cdcprolific.cpp line#72
if (((USB_DEVICE_DESCRIPTOR*)buf)->idVendor != PL_VID && ((USB_DEVICE_DESCRIPTOR*)buf)->idProduct != PL_PID ) {
return USB_DEV_CONFIG_ERROR_DEVICE_NOT_SUPPORTED;
}
I wonder that the whole sense of this is the wrong way round (ie “if !” rather than “if” and “||” rather than “&&”) plus the fact that the symbol PL_PID evaluates to 1 (ie true) because it’s a logic or “||”).
Got he Arduino portion of my project done. Once I got everything wired up correctly (the 6 pin header threw me) I have been able to get the rest of the bugs out of my display manipulation. Real easy to overwrite elements of an array when it is then getting written t the display, but when the index variable gets big enough the program crashes…
One Question – Why don’t you process the ENTER key to 13 or 10 instead of having it return 19? Or was that one of those Hex/Decimal things?
Thanks for the help and the very nice shield.
Hi,
I believe I read somewhere that you would try to have a look on how MotionJoy works on BT communication with PS3 controller. I point that because I have a dongle laying arround with only one endpoint, that obviously doesn’t work with your [awesome!] library, but it does work with MotionJoy. Any idea on how it works?
I already bouhgt a “known to work” dongle (still waiting for it…), and have tested with an old dongle (non 2.0 +EDR) that worked pretty good, no analog buttons though (as the debug text pointed). I just faces this issue and wanted to know the other way arround
Thanks and congrats for the shield
Hello, when trying to compile the USB Host Shield 2.0 code for a Mega ADK, I need multiple copies of this error message:
“error: cannot convert ‘prog_char_t*’ to ‘const char*’ for argument ‘1’ to ‘void Notify(const char*)'”
I have tried compiling with vs 1.0, 1.0.1, 1.0.2 and 1.0.3. No luck.
Thanks,
Michael
Make sure that you have included the library correctly. See the readme for more information: https://github.com/felis/USB_Host_Shield_2.0#how-to-include-the-library.
Thanks Lauszus, it turned out I had another lib causing a conflict.
Dear Oleg, hi ,
I’ve just received your USB host mini and i am using it with a 3.3v arduino pro from sparkfun.
I’ve run the board_qc sketch and i am getting stuck in the “Waiting for device” line (output attached at the bottom)
I’ve read that some people had similar problem due to power drawing from the usb (programming device – i am programming using a standard ftdi cable).
So i’ve wired my usb host on top of the arduino and in order to debug, i’ve connected all the signals besides the Vin which comes from a separate power supply.
I indeed see that the device, when connected draws a healthy 350ma from the supply through usb host ,
My question is what am i doing wrong ? how can i make the usb host board detect the device.
My second question is – can i prevent the charging on the device side?
And finally – right now i am powering the arduino with 5v, but will the usb host mode work from a 3.3v power supply ?
Kindly advise,
Iskrene blagodaren.
arie
Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register… Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K……………. SPI long test passed
GPIO test. Connect GPIN0 to GPOUT7, GPIN1 to GPOUT6, and so on
Test failed. Value written: 00 Value read: FF
Press any key to continue…
GPIO test passed.
PLL test. 100 chip resets will be performed
Resetting oscillator
Reset number 0 Time to stabilize – 308 cycles
Reset number 1 Time to stabilize – 307 cycles
Reset number 2 Time to stabilize – 306 cycles
Reset number 3 Time to stabilize – 306 cycles
Reset number 4 Time to stabilize – 305 cycles
Reset number 5 Time to stabilize – 306 cycles
Reset number 6 Time to stabilize – 305 cycles
Reset number 7 Time to stabilize – 306 cycles
Reset number 8 Time to stabilize – 305 cycles
Reset number 9 Time to stabilize – 308 cycles
Reset number 10 Time to stabilize – 308 cycles
Reset number 11 Time to stabilize – 308 cycles
Reset number 12 Time to stabilize – 307 cycles
Reset number 13 Time to stabilize – 308 cycles
Reset number 14 Time to stabilize – 307 cycles
Reset number 15 Time to stabilize – 306 cycles
Reset number 16 Time to stabilize – 306 cycles
Reset number 17 Time to stabilize – 306 cycles
Reset number 18 Time to stabilize – 308 cycles
Reset number 19 Time to stabilize – 308 cycles
Reset number 20 Time to stabilize – 308 cycles
Reset number 21 Time to stabilize – 308 cycles
Reset number 22 Time to stabilize – 308 cycles
Reset number 23 Time to stabilize – 307 cycles
Reset number 24 Time to stabilize – 306 cycles
Reset number 25 Time to stabilize – 306 cycles
Reset number 26 Time to stabilize – 306 cycles
Reset number 27 Time to stabilize – 307 cycles
Reset number 28 Time to stabilize – 308 cycles
Reset number 29 Time to stabilize – 308 cycles
Reset number 30 Time to stabilize – 308 cycles
Reset number 31 Time to stabilize – 308 cycles
Reset number 32 Time to stabilize – 307 cycles
Reset number 33 Time to stabilize – 308 cycles
Reset number 34 Time to stabilize – 305 cycles
Reset number 35 Time to stabilize – 307 cycles
Reset number 36 Time to stabilize – 306 cycles
Reset number 37 Time to stabilize – 309 cycles
Reset number 38 Time to stabilize – 310 cycles
Reset number 39 Time to stabilize – 310 cycles
Reset number 40 Time to stabilize – 310 cycles
Reset number 41 Time to stabilize – 310 cycles
Reset number 42 Time to stabilize – 308 cycles
Reset number 43 Time to stabilize – 308 cycles
Reset number 44 Time to stabilize – 307 cycles
Reset number 45 Time to stabilize – 310 cycles
Reset number 46 Time to stabilize – 310 cycles
Reset number 47 Time to stabilize – 309 cycles
Reset number 48 Time to stabilize – 310 cycles
Reset number 49 Time to stabilize – 310 cycles
Reset number 50 Time to stabilize – 308 cycles
Reset number 51 Time to stabilize – 307 cycles
Reset number 52 Time to stabilize – 308 cycles
Reset number 53 Time to stabilize – 309 cycles
Reset number 54 Time to stabilize – 310 cycles
Reset number 55 Time to stabilize – 310 cycles
Reset number 56 Time to stabilize – 311 cycles
Reset number 57 Time to stabilize – 310 cycles
Reset number 58 Time to stabilize – 310 cycles
Reset number 59 Time to stabilize – 308 cycles
Reset number 60 Time to stabilize – 308 cycles
Reset number 61 Time to stabilize – 308 cycles
Reset number 62 Time to stabilize – 310 cycles
Reset number 63 Time to stabilize – 310 cycles
Reset number 64 Time to stabilize – 310 cycles
Reset number 65 Time to stabilize – 310 cycles
Reset number 66 Time to stabilize – 310 cycles
Reset number 67 Time to stabilize – 308 cycles
Reset number 68 Time to stabilize – 308 cycles
Reset number 69 Time to stabilize – 307 cycles
Reset number 70 Time to stabilize – 309 cycles
Reset number 71 Time to stabilize – 309 cycles
Reset number 72 Time to stabilize – 309 cycles
Reset number 73 Time to stabilize – 310 cycles
Reset number 74 Time to stabilize – 309 cycles
Reset number 75 Time to stabilize – 307 cycles
Reset number 76 Time to stabilize – 308 cycles
Reset number 77 Time to stabilize – 308 cycles
Reset number 78 Time to stabilize – 310 cycles
Reset number 79 Time to stabilize – 310 cycles
Reset number 80 Time to stabilize – 310 cycles
Reset number 81 Time to stabilize – 310 cycles
Reset number 82 Time to stabilize – 310 cycles
Reset number 83 Time to stabilize – 309 cycles
Reset number 84 Time to stabilize – 308 cycles
Reset number 85 Time to stabilize – 308 cycles
Reset number 86 Time to stabilize – 308 cycles
Reset number 87 Time to stabilize – 310 cycles
Reset number 88 Time to stabilize – 309 cycles
Reset number 89 Time to stabilize – 310 cycles
Reset number 90 Time to stabilize – 310 cycles
Reset number 91 Time to stabilize – 310 cycles
Reset number 92 Time to stabilize – 308 cycles
Reset number 93 Time to stabilize – 308 cycles
Reset number 94 Time to stabilize – 308 cycles
Reset number 95 Time to stabilize – 310 cycles
Reset number 96 Time to stabilize – 310 cycles
Reset number 97 Time to stabilize – 310 cycles
Reset number 98 Time to stabilize – 310 cycles
Reset number 99 Time to stabilize – 310 cycles
Reset number 100 Time to stabilize – 308 cycles
Checking USB device communication.
Waiting for device …
Waiting for device …
Waiting for device …
USB Host mini must be used with 3.3V Arduino board, this includes power and data signals. If you need 5V on VBUS, you need to modify the shield as explained here -> https://www.circuitsathome.com/usb-host-shield-hardware-manual , under 4.
To prevent a device from charging, you may want to try to restrict current on VBUS with a resistor.
Dear Oleg, thanks for the propmpt reply,
I’ve followed the instructions and basically my configuration looks like this now:
https://www.circuitsathome.com/wp/wp-content/uploads/2011/02/uhm_5V_VBUS.jpg
It works.
Ogromnoe spasibo.
Arie
Glad to hear you’ve got it working!