TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mayank sharma
NA
4
0
Problem readng data from an USB device (Garmin Forerunne 305).plz reply its urgent
Aug 4 2007 1:40 AM
Dear All,
I am developing an application in C#. This application communicates with Garmin Forerunner device. I have developed a demo for it, which shows Device software version. but I am not able to get Device history Data. What should I pass for getting history data.
Below is the code sample which I am using for fetching device information:
// Product data
byte[] theProductPacket = new byte[] { 20, 0, 0, 0, 254, 0, 0, 0, 0, 0, 0, 0 };
byte[] thePacket = new byte[] { };
// For initializing device
initDevice();
//Checking for device availability
if (gHandle.ToInt32() == 0)
{
return "No Device Found";
}
// Sending Packet for starting asession
SendPackets(theProductPacket);
// Infinite loop for Data retreival
for (; ; )
{
// Getting one by one Packets
thePacket = GetPackets2();
if (Convert.ToInt32(thePacket.GetValue(0).ToString()) == 20 && Convert.ToInt32(thePacket.GetValue(4).ToString()) == 255)
{
break;
}
}
string Data = System.Text.ASCIIEncoding.ASCII.GetString(thePacket, 4, thePacket.Length - 4);
bool bSuccess = CloseHandle(gHandle);
I am sure that I have to change following:
// Product data
byte[] theProductPacket = new byte[] { 20, 0, 0, 0, 254, 0, 0, 0, 0, 0, 0, 0 };
I am not asking for providing code, but if anyone can post approach for it then it will be highly appreciated.
Reply
Answers (
0
)
increase procedure parameter length
Re:Threading Problem