Not Returning Data for Bulk Transfer

The USBDroid provides USB Host functionality for use as an Android peripheral as an Open Android Development Kit board. [Product page]
Post Reply
marks
Posts:31
Joined:Wed Jan 04, 2012 8:13 pm
Not Returning Data for Bulk Transfer

Post by marks » Wed Jan 04, 2012 8:43 pm

Hello Freetronics,

I recently purchased your USBDroid board which I love by the way. Being new to the Android world there has been a bit of a learning curve which has been fun. Everything works fine and as expected running the various example code around the internet and some of my own code.

Except I have a problem with all of the Bulk Transfer USB devices I have tried. The problem is that using the old and new 2.0 USB Host libraries from arduino.cc on an inTransfer I end up with the expected and actual received bytecount in rRCVBC but the data in rRCVFIFO is always a series of NULLs which is the correct length as the per the received bytecount.

I have a working driver, which I built in Win .NET, which works fine for one device so I'm comfortable that the device is working correctly and I know how to communicate with it. I'm also comfortable that the Arduino code is working OK given that that I receive a bytecount and I can read all of the other appropriate registers and end up with what I expect. It's just the rRCVFIFO that has NULL values. There are absolutely no errors from either library.

So I guess my question is, bearing in mind that I'm no Arduino expert, is there something I need to do with these libraries, perhaps with pin(s) maybe differently assigned compared to the Arduino and USB Host shield at arduino.cc or is there a specific library for the USBDroid?

Thank you in advance,

Mark S.

marks
Posts:31
Joined:Wed Jan 04, 2012 8:13 pm

Re: Not Returning Data for Bulk Transfer

Post by marks » Thu Jan 05, 2012 1:58 am

I have resolved this issue thank you. I told you I was new to Arduino which was the problem :)

Basically the problem was due to timing, a few well placed "delays" have this working perfectly.

Cheers,

Mark S.

User avatar
jonoxer
Freetronics Staff
Freetronics Staff
Posts:298
Joined:Sat Oct 15, 2011 11:31 am
Location:Melbourne, Australia
Contact:

Re: Not Returning Data for Bulk Transfer

Post by jonoxer » Mon Jan 09, 2012 11:14 pm

Hi Mark, sorry about not replying sooner but I'm glad to see you solved the problem!

I'm interested to know what project you're working on. Do you have a progress report or more details you can share?
--
Jon

marks
Posts:31
Joined:Wed Jan 04, 2012 8:13 pm

Re: Not Returning Data for Bulk Transfer

Post by marks » Tue Jan 10, 2012 12:33 am

Hi Jon,

Thanks for your interest :)

With this project I am under some NDA's so can only talk in generalities, although on completion I will be able to show some pics and a bit more detail.

Basically it is to connect to a specific class/type of medical device. The Arduino will log measurements, patient detail etc and then send this by way of an Android phone to a centralised DB. Patients will be connected from all over the world and both the patient and their treating doctors will be able to review results, trends and analysis over the web. The medical device is a portable unit unlike the currently used large expensive fixed devices used by the medical profession.

So it can be carried by patients and measurements taken throughout the day. This has the potential to revolutionise this area of medicine in much the same way home measurement of blood sugar levels by diabetics revolutionised diabetes management. Prior to this development the longer term prognosis for diabetics was very poor.

I'm actually doing this pro-bono as I suffer from this condition. I have one of these large expensive devices at home and I must say that it has completely changed the way I manage and view my condition. So what we are trying to do is bring it down to a much cheaper, portable, battery operated and accessible piece of equipment.

The data collection prototype based on your board is working flawlessly and will be shipped to the US next week for testing by a selected group of patients.

So thank you for a rather excellent board:)

Cheers,

Mark

Post Reply