Click here to Skip to main content
16,007,885 members
Home / Discussions / C#
   

C#

 
GeneralRe: Communicating with an USB Device Pin
haolan3-Jan-08 22:18
haolan3-Jan-08 22:18 
GeneralRe: Communicating with an USB Device Pin
Dave Kreskowiak4-Jan-08 1:52
mveDave Kreskowiak4-Jan-08 1:52 
GeneralRe: Communicating with an USB Device Pin
haolan4-Jan-08 7:31
haolan4-Jan-08 7:31 
GeneralRe: Communicating with an USB Device Pin
Dave Kreskowiak4-Jan-08 12:13
mveDave Kreskowiak4-Jan-08 12:13 
GeneralRe: Communicating with an USB Device Pin
haolan7-Jan-08 0:57
haolan7-Jan-08 0:57 
GeneralRe: Communicating with an USB Device Pin
Dave Kreskowiak7-Jan-08 3:08
mveDave Kreskowiak7-Jan-08 3:08 
GeneralRe: Communicating with an USB Device Pin
haolan9-Jan-08 3:40
haolan9-Jan-08 3:40 
GeneralRe: Communicating with an USB Device Pin
Dave Kreskowiak9-Jan-08 17:00
mveDave Kreskowiak9-Jan-08 17:00 
You can't simply put a Write, then a Read, then a Write for the next command, then a Read, ..., in order an expect it to work. Your design is going to have to be much more flexible, like writing a method to send a command, another method to setup an asynchronous read of the port, another method to handle timeouts. A timer is completely useless to you.


<blockquote class="FQ"><div class="FQA">haolan wrote:</div>Another thing that I am worried about is the COM Port name. It is different for each computer I connect it to..
Is there any way to find out which COM port my device is connected to? </blockquote>

The only way to know is to go through each COM port on the machine and issue some command to it that the device understands and responds to. If the response in what you expect, you found the device. There is no other way to do it.



A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007




GeneralRe: Communicating with an USB Device Pin
haolan10-Jan-08 12:39
haolan10-Jan-08 12:39 
GeneralRe: Communicating with an USB Device Pin
Dave Kreskowiak10-Jan-08 13:19
mveDave Kreskowiak10-Jan-08 13:19 
GeneralRe: Communicating with an USB Device Pin
haolan10-Jan-08 14:09
haolan10-Jan-08 14:09 
GeneralRe: Communicating with an USB Device Pin
Mircea Puiu3-Jan-08 6:39
Mircea Puiu3-Jan-08 6:39 
Generalinheriting from a class and also using a constraint Pin
bwilhite3-Jan-08 4:25
bwilhite3-Jan-08 4:25 
GeneralRe: inheriting from a class and also using a constraint Pin
Pete O'Hanlon3-Jan-08 4:41
mvePete O'Hanlon3-Jan-08 4:41 
GeneralRe: inheriting from a class and also using a constraint Pin
bwilhite3-Jan-08 4:48
bwilhite3-Jan-08 4:48 
GeneralRe: inheriting from a class and also using a constraint Pin
Tim Paaschen3-Jan-08 5:57
Tim Paaschen3-Jan-08 5:57 
GeneralRe: inheriting from a class and also using a constraint Pin
bwilhite3-Jan-08 6:13
bwilhite3-Jan-08 6:13 
Generalstring value in url Pin
eyeseetee3-Jan-08 4:13
eyeseetee3-Jan-08 4:13 
GeneralRe: string value in url Pin
Not Active3-Jan-08 4:50
mentorNot Active3-Jan-08 4:50 
QuestionAdding a RichTextBox to a Tab Page Pin
Programm3r3-Jan-08 4:07
Programm3r3-Jan-08 4:07 
AnswerRe: Adding a RichTextBox to a Tab Page Pin
Programm3r3-Jan-08 4:12
Programm3r3-Jan-08 4:12 
GeneralRe: Adding a RichTextBox to a Tab Page Pin
Justin Perez3-Jan-08 4:14
Justin Perez3-Jan-08 4:14 
GeneralRe: Adding a RichTextBox to a Tab Page Pin
Programm3r3-Jan-08 4:44
Programm3r3-Jan-08 4:44 
GeneralRe: Adding a RichTextBox to a Tab Page Pin
Justin Perez3-Jan-08 5:02
Justin Perez3-Jan-08 5:02 
GeneralCompletely delete a file Pin
Johan Martensson3-Jan-08 2:51
Johan Martensson3-Jan-08 2:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.