Google
  Web www.gpspassion.com


GpsPasSion LIVE!
www.flickr.com
This is a Flickr badge showing public photos from GpsPasSion Live !. Make your own badge here.

www.NaviBlog.com



Versions

Links/Liens




Portal/Portail
Rechercher

- -

Polls/Sondages
Sondage
Pour vous guider sur la Route :
GPS Mobile (SEM)
GPS Intégré
Smartphone
Autre
Voter  -  Résultat des votes
Votes : 1360




Club GpsPasSion
Soutenez le site!

USA: (US$)
EUROPE: (€)
Guide Paypal


GpsPasSion Forums
Home | Profile | Register/Enregist. | Active Topics | Search/Recherche | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 GPS Programming
 Programming Hints and Tips
 Interfacing with Garmin via USB
 New Topic  Reply/Répondre
 Printer Friendly
Author Previous Topic Topic Next Topic  

haskett

7 Posts

Posted - 05 mai 2010 :  21:18:08  Show Profile  Reply with Quote
I'm hoping others here have successfully tackled communicating in Garmin binary protocol via USB. I've been working at this for days and have finally decided I need help.

I am sending the following 12-byte data packet to the unit via end point 2 (the bulk write endpoint):

quote:
byte[] start_data = {
// 0: application layer=20 (0x14), usb protocol layer=0
// 1-3: reserved: must be set to zero
00, 00, 00, 00,

// 4-5; Packet ID: Pid_Data_Available = 2,Pid_Start_Session = 5, Pid_Session_Started = 6
// 6-7: reserved: must be set to zero
00, 05, 00, 00,

// 8-11: data size
00, 00, 00, 00

// 12+: data


I am getting no data back from the unit via endpoint #1 (interrupt read). It times out continuously.

I see that the Garmin unit has three USB endpoints.
0 = Bulk read
1 = Interrupt read
2 = Bulk write

Not that it matters, but for the record I have a Garmin 18x USB and I'm trying to talk to it in Java using icaste's JCommUSB interface.

Has anyone been able to communicate with their Garmin via USB?

Ads


haskett

7 Posts

Posted - 06 mai 2010 :  22:23:38  Show Profile  Reply with Quote
More info... I found in the Linux source code for the garmin USB driver that it is sending the following two packets to the device. I've modified my code to do the same, but still no data coming back.
quote:
static unsigned char const GARMIN_START_SESSION_REQ[] = { 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0 };
static unsigned char const GARMIN_START_SESSION_REQ2[] = { 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0 };
Go to Top of Page

milugar

1 Posts

Posted - 18 août 2010 :  22:05:59  Show Profile  Reply with Quote
hi. I have the same problem. have you got the solution now?
I need to receive the position. however, I dont know how to do it with a usb port and java. !!!
Go to Top of Page

kpk

USA
4 Posts

Posted - 20 mars 2013 :  00:26:52  Show Profile  Reply with Quote
At this point I'm sure you have an answer but figured I'd throw it out there for those needing this info. I assume you have an open handle to the device GUID before you start your session. Your start session byte array is correct {0,0,0,0,5,0,0,0,0,0,0,0} sent via DeviceIoControl. You then need to read the buffer and check for the session started array. If that is returned by the device it's open for communications. I've had success getting info back from the device for the documented protocols. Now if I can just find info about the undocumented info.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply/Répondre
 Printer Friendly
Jump To:
GpsPasSion Forums © 2002-2013_GpsPasSion/Manzanite Go To Top Of Page
This page was generated in 0,31 seconds. Powered By: Snitz Forums 2000 Version 3.4.05