| Versions |
 |
|
| Author |
Topic  |
|
|
haskett
7 Posts |
Posted - 05 mai 2010 : 21:18:08
|
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
|
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 };
|
 |
|
|
milugar
1 Posts |
Posted - 18 août 2010 : 22:05:59
|
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. !!! |
 |
|
|
kpk
USA
4 Posts |
Posted - 20 mars 2013 : 00:26:52
|
| 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. |
 |
|
| |
Topic  |
|
|
|
| This page was generated in 0,31 seconds. |
 |
|