Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[WIP] USB Host support (working)

OP verygreen

25th February 2012, 04:36 PM   |  #101  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 822
 
2,001 posts
Join Date:Joined: Feb 2012
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.
25th February 2012, 06:05 PM   |  #102  
Senior Member
Thanks Meter: 47
 
421 posts
Join Date:Joined: May 2011
Quote:
Originally Posted by Renate NST

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.
25th February 2012, 06:19 PM   |  #103  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 822
 
2,001 posts
Join Date:Joined: Feb 2012
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:	490
Size:	3.5 KB
ID:	919390  
25th February 2012, 08:31 PM   |  #104  
Senior Member
Thanks Meter: 24
 
147 posts
Join Date:Joined: Sep 2010
Quote:
Originally Posted by Renate NST

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
25th February 2012, 08:55 PM   |  #105  
Senior Member
Thanks Meter: 134
 
208 posts
Join Date:Joined: Jun 2007
Donate to Me
Quote:
Originally Posted by Renate NST

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.
25th February 2012, 09:15 PM   |  #106  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 822
 
2,001 posts
Join Date:Joined: Feb 2012
@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.
27th February 2012, 04:05 AM   |  #107  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 822
 
2,001 posts
Join Date:Joined: Feb 2012
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?
Last edited by Renate NST; 28th February 2012 at 01:58 AM.
The Following User Says Thank You to Renate NST For This Useful Post: [ View ]
27th February 2012, 12:51 PM   |  #108  
Junior Member
Thanks Meter: 6
 
26 posts
Join Date:Joined: Feb 2012
Quote:
Originally Posted by Renate NST

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).
27th February 2012, 03:09 PM   |  #109  
Googie2149's Avatar
Senior Member
Thanks Meter: 54
 
288 posts
Join Date:Joined: Jan 2012
More
Quote:
Originally Posted by Renate NST

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.
27th February 2012, 03:49 PM   |  #110  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 822
 
2,001 posts
Join Date:Joined: Feb 2012
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.

Post Reply Subscribe to Thread

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

Advanced Search
Display Modes