Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
bbmint
Posts: 4
Registered: ‎12-15-2011
My Device: developer
My Carrier: rogers

External GPS receiver via USB

Hi all,

 

I'm in need of some advice. I have an external GPS receiver that's connected through USB. And I'd like to write a driver to have it recognized by BB Maps and any other maps applications on the BlackBerry. Problem is the BlackBerry does not accept USB GPS receivers (it accepts Bluetooth). So I am asking for suggestions of how to approach this, would appreciate any help, thanks!

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: External GPS receiver via USB

[ Edited ]

Welcome to the forums!

 

Sorry to say, I would not even bother starting down this route.  Unless you are willing to write some complicated code in the GPS unit so that it can drive the connection, you won't be able to do it.  Just my 2p worth.

 

What is wrong with Bluetooth anyway?

Please use plain text.
New Contributor
bbmint
Posts: 4
Registered: ‎12-15-2011
My Device: developer
My Carrier: rogers

Re: External GPS receiver via USB

[ Edited ]

Thanks for the welcome peter_strange!

 

Would you be able to elaborate a bit on writing code in the GPS unit to drive the connection?

 

Also might it be possible to somehow emulate an accepted type of GPS reciever. Not sure yet if that's doable.

 

Nothing wrong with Bluetooth, it's just not an option here.

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: External GPS receiver via USB

[ Edited ]

The really basic technical details behind what Peter is saying:

BlackBerry is a USB endpoint, not a host. So when you plug a BlackBerry into a computer, the computer initiates the conversation. When you plug your USB GPS receiver into a BlackBerry, nothing will happen. Your receiver and BlackBerry will wait for the other device to initiate the conversation.

 

It also doesn't help that some USB devices use the USB power and, in addition to not being a host, a BlackBerry probably has not been designed to supply power instead of receiving it.

 

So when Peter says to modify the GPS receiver, he basically means to make it into a host so it will start the connection and then your BlackBerry app can work with it. How you modify your GPS receiver is however the manufacturer has it designed (of you have it designed if you are the manufacturer).

 

Bluetooth can be used in a P2P manner so either device can start the conversation and power isn't an issue.

 

Edit: Additional:

http://supportforums.blackberry.com/t5/Java-Development/Device-to-Device-USB-connection/m-p/1013369

 

Slight note on that post, he says you can't do it with the PlayBook either but RIM has demonstrated it with the Arduino (http://devblog.blackberry.com/2011/12/blackberry-playbook-arduino/)

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
New Contributor
bbmint
Posts: 4
Registered: ‎12-15-2011
My Device: developer
My Carrier: rogers

Re: External GPS receiver via USB

Thank you for the explanation and info!

 

I am aware that the BlackBerry USB is not a host. However this isn't what I'm interested in, sorry I should've been more clear in my original post. Assuming that I have access to GPS data, I am interested in how this data can be recognized and used as if it was from a supported GPS receiver.

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: External GPS receiver via USB

As I understand it, the GPS 'layer' on the BlackBerry is capable of working with an on device or a Bluetooth connected GPS reciever.  It is not, as far as I am aware, capable of accepting the GPS clauses from any other device.

 

So if you had some other connection to a device suppling GPS data, you would have to parse this data yourself, as well as controlling the GPS reciever yourself. 

 

Does that answer the question?

Please use plain text.
New Contributor
bbmint
Posts: 4
Registered: ‎12-15-2011
My Device: developer
My Carrier: rogers

Re: External GPS receiver via USB

Sorry for the late reply, was away for a few days.

 

Thanks for your response Peter. I did play around with parsing the GPS data and drawing my own maps which works fine. However the real goal is to be able to use any existing mapping applications with all their features, so somehow I need to get the BlackBerry to recognize the GPS data. So far I haven't been able to find any good solution and I have my doubts that this is even possible to do. Perhpas someone here have some suggestions?

Please use plain text.