Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,771,111 Members 47,689 Now Online
XDA Developers Android and Mobile Development Forum

[WIP] USB Host support (working)

Tip us?
 
Renate NST
Old
#101  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 792
Posts: 1,967
Join Date: Feb 2012
Location: Boston
I did get the USB GPS puck to work on /dev/ttyUSB0 after I set it to 9600 baud first on my Windows system. I can cat valid NMEA data out of it. Unfortunately, Google Maps comes up with a suggestion to set "My Location" in Settings. I haven't discovered yet what do to about that. Am I missing some provider or something?

I'm surprised that there has not been more interest/response from my app and the "Magic" button. There is a technical problem with the Nook that it addresses and it should have helped people who couldn't get USB to work. I was waiting to hear some feedback before I let the cat out of the bag.
 
ApokrifX
Old
#102  
Senior Member
Thanks Meter 47
Posts: 410
Join Date: May 2011
Quote:
Originally Posted by Renate NST View Post
I'm surprised that there has not been more interest/response from my app and the "Magic" button. There is a technical problem with the Nook that it addresses and it should have helped people who couldn't get USB to work. I was waiting to hear some feedback before I let the cat out of the bag.
Renate,
I’d love to give it a try, but I have neither [OTG] USB cable nor USB "gender-changer" nor USB "modified powered" hub.
If there is a "low budget" solution under $10, it’ll be great "for the rest of us".
That’s why I was looking at micro USB Y cables, but I have a feeling, they supply +5 and GND only and no any data wires…
Although, shouldn’t be a problem to DIY.
 
Renate NST
Old
#103  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 792
Posts: 1,967
Join Date: Feb 2012
Location: Boston
I made my own OTG cable. I probably should put in a switch so that I can test with and without the ID pin being grounded. I should drop by a Radio Shack.

If you have a spare micro USB cable, you can make your own.
Just take a razor blade and start carefully scraping off the plastic.
You'll see that there are probably three solder pads on one side and two on the other.
The pad you want is the pad that is not connected already, of course, the empty one on the two side.
As you look at your Nook, this pad will be on the bottom left side of your connector.
As you twist it around, it will be on your right side if the connector is pointing away from you.
Just get a tiny wire and solder it between the pad and the shell.
Wrap it up with tape and you are done.

(I'd take a photo, but my camera can't really do macro.)

To make a powered hub, open up a cheap hub, look for the big diode, trace it back to make sure it goes to the input USB jack. Replace this diode with a jumper. Put a big warning sticker on the top of the hub that it back-powers. See the schematic:

If any of this sounds above your level, don't do it!

Back to the GPS thing, I've got the data coming in, but apparently I've got no LocationProvider's installed.
Attached Thumbnails
Click image for larger version

Name:	hub.png
Views:	472
Size:	3.5 KB
ID:	919390  
 
cceerrtt
Old
#104  
Senior Member
Thanks Meter 24
Posts: 147
Join Date: Sep 2010
Quote:
Originally Posted by Renate NST View Post
Back to the GPS thing, I've got the data coming in, but apparently I've got no LocationProvider's installed.
What do you see in logcat? I have the backup of my 2.1 android phone so I can get some apps from this backup but can't find any LocationProvider, just:

/system/app:
HtcLocationPicker.apk
HtcLocationService.apk
/system/lib/libgps.so
 
mali100
Old
#105  
Senior Member
Thanks Meter 130
Posts: 208
Join Date: Jun 2007

 
DONATE TO ME
Quote:
Originally Posted by Renate NST View Post
I did get the USB GPS puck to work on /dev/ttyUSB0 after I set it to 9600 baud first on my Windows system. I can cat valid NMEA data out of it.
I use this https://market.android.com/details?i...ort_api.sample app to access serial devices from android.
 
Renate NST
Old
#106  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 792
Posts: 1,967
Join Date: Feb 2012
Location: Boston
@mali100: Thanks, but the serial port and the puck work fine.

Code:
$GPGSV,3,1,12,14,49,286,45,27,17,45,27,9,38,48,28,22,75,290,0*77
Yes, it's getting my lat/long, I just didn't paste it!

The LocationManager is working fine because I can do this:

Code:
      LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
      List<String> list = lm.getAllProviders();
The providers aren't there because the list is empty.

I've gone far enough into this to know that I don't have any installed.
They would be in /data/misc/location/gps/
There was a suggestion to copy the files off the emulator! But they weren't there.
 
Renate NST
Old
(Last edited by Renate NST; 28th February 2012 at 12:58 AM.)
#107  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 792
Posts: 1,967
Join Date: Feb 2012
Location: Boston
This is the preview screenshot of the next version of software.
I still haven't heard anybody having any success with the old version.
Don't people want to have keyboards on their Nooks?
The Following User Says Thank You to Renate NST For This Useful Post: [ Click to Expand ]
 
Dagon.Alex
Old
#108  
Junior Member
Thanks Meter 6
Posts: 26
Join Date: Feb 2012
Quote:
Originally Posted by Renate NST View Post
Don't people want to have keyboards on their Nooks?
What for? As a proof of concept it is cool, but I can not see any reason I would need a hardware keyboard for my device. Readers(tablets) main feature is its compactness, so why would I want to connect it to keyboard which is bigger then device itself?

Another thing is flash drives support. It`s cool to be able to view any work/study documents on flash just when I need it (Assuming that I take my nook almost everywhere and reading on all the occasions).
 
Googie2149
Old
#109  
Googie2149's Avatar
Senior Member
Thanks Meter 54
Posts: 288
Join Date: Jan 2012
Quote:
Originally Posted by Renate NST View Post
I still haven't heard anybody having any success with the old version.
Don't people want to have keyboards on their Nooks?
I do want to use it, but still need to order a cable / keyboard to connect to it. I'm not sure if I need an OTG cable or if I can just get a gender changer.
 
Renate NST
Old
#110  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 792
Posts: 1,967
Join Date: Feb 2012
Location: Boston
I guess that the eye-opener thing around here is that everybody has specific desires to personalize their Nook.

@Dagon.Alex: With about 4 GB of spare space on my Nook SD card I never thought of using a USB flash drive on it. I just tried it. It works fine.

Code:
mount -o rw,remount rootfs /
mkdir /usb
mount -t vfat /dev/block/uba1 /usb
Right now I have my Nook connected to a hub with the keyboard, a GPS puck and a flash drive. The GPS data is there, I'm just working on getting a NMEA LocationProvider working. It's also charging. That makes a nice docking station. I can connect a mouse, but it only generates DPAD commands.

@Googie2149: You can try without it being an OTG cable, but as long as you are going to bother to get one it might as well be OTG. It's not clear now if the interrupt from grounding it or the status is used. In any case, it could be.

To all: See, the thing is, getting this to work without so-called "Magic" is a statistical thing based on the Nook, the cabling and the phase of the moon. For some they may have never gotten it to connect, for others they have never had a problem. I'm just interested in how many of each type. This probably has relevancy to other devices also.

Tags
usb host, usbhost
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes