Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
AnswerRe: to close connection to database after i use or not ? Pin
PIEBALDconsult28-Mar-11 14:25
mvePIEBALDconsult28-Mar-11 14:25 
QuestionHow to communicate to a device via serial port Pin
_awatts28-Mar-11 6:21
_awatts28-Mar-11 6:21 
GeneralRe: How to communicate to a device via serial port Pin
_awatts28-Mar-11 9:09
_awatts28-Mar-11 9:09 
GeneralRe: How to communicate to a device via serial port Pin
Luc Pattyn28-Mar-11 9:21
sitebuilderLuc Pattyn28-Mar-11 9:21 
GeneralRe: How to communicate to a device via serial port Pin
_awatts28-Mar-11 9:57
_awatts28-Mar-11 9:57 
AnswerRe: How to communicate to a device via serial port Pin
Luc Pattyn28-Mar-11 10:15
sitebuilderLuc Pattyn28-Mar-11 10:15 
GeneralRe: How to communicate to a device via serial port Pin
_awatts28-Mar-11 10:45
_awatts28-Mar-11 10:45 
AnswerRe: How to communicate to a device via serial port Pin
Luc Pattyn28-Mar-11 11:00
sitebuilderLuc Pattyn28-Mar-11 11:00 
Some more ideas:

1. You're obviously an optimist. Any small mistake you will make while implementing some checksum algorithm is bound to go unnoticed and will output a non-matching value for sure.

2. If the device doesn't give any packets by itself, you could again look in the documentation, maybe there are examples.

3. If it is a commercial device, there is bound to be some PC software for it, so using that one could get it to work, then observe the packets that are going back and forth on the cable. If such software were managed code (e.g. C#) you could even use a tool such as Reflector to peek inside it.

4. You can of course look at incoming packets and ignore their checksums if you choose to do so. The data still would be useful most of the time; the checksums are there to protect you against communication mishaps that would yield false packets.

5. You probably do need to provide correct checksums when sending data to the device, although I have met a few systems that accept an "I don't care" value too, which always has been zero in my experience. Note: I do not recommend serial communication without some kind of protection, I'm just pointing a possible and temporary approach that could get you started. Does the documentation state what the device will do when it gets a packet with a bad checksum?

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

GeneralRe: How to communicate to a device via serial port Pin
_awatts28-Mar-11 11:38
_awatts28-Mar-11 11:38 
AnswerRe: How to communicate to a device via serial port Pin
Luc Pattyn28-Mar-11 11:55
sitebuilderLuc Pattyn28-Mar-11 11:55 
AnswerRe: How to communicate to a device via serial port Pin
Pritesh Aryan28-Mar-11 20:55
Pritesh Aryan28-Mar-11 20:55 
AnswerRe: How to communicate to a device via serial port Pin
Ganesh Kumar Kaki13-Apr-11 2:35
Ganesh Kumar Kaki13-Apr-11 2:35 
QuestionDebugging a C# GUI app started via commandline Pin
wizardzz28-Mar-11 5:48
wizardzz28-Mar-11 5:48 
AnswerRe: Debugging a C# GUI app started via commandline Pin
Ian Shlasko28-Mar-11 5:58
Ian Shlasko28-Mar-11 5:58 
GeneralRe: Debugging a C# GUI app started via commandline Pin
wizardzz28-Mar-11 6:15
wizardzz28-Mar-11 6:15 
GeneralRe: Debugging a C# GUI app started via commandline Pin
Ian Shlasko28-Mar-11 6:45
Ian Shlasko28-Mar-11 6:45 
QuestionRead XML Into Class Hierarchy Pin
Kevin Marois28-Mar-11 5:10
professionalKevin Marois28-Mar-11 5:10 
AnswerRe: Read XML Into Class Hierarchy Pin
Ian Shlasko28-Mar-11 5:22
Ian Shlasko28-Mar-11 5:22 
GeneralRe: Read XML Into Class Hierarchy Pin
Kevin Marois28-Mar-11 5:33
professionalKevin Marois28-Mar-11 5:33 
GeneralRe: Read XML Into Class Hierarchy Pin
Ian Shlasko28-Mar-11 5:56
Ian Shlasko28-Mar-11 5:56 
GeneralRe: Read XML Into Class Hierarchy Pin
Not Active28-Mar-11 5:59
mentorNot Active28-Mar-11 5:59 
GeneralRe: Read XML Into Class Hierarchy Pin
SledgeHammer0128-Mar-11 6:10
SledgeHammer0128-Mar-11 6:10 
GeneralRe: Read XML Into Class Hierarchy Pin
Not Active28-Mar-11 6:21
mentorNot Active28-Mar-11 6:21 
GeneralRe: Read XML Into Class Hierarchy Pin
SledgeHammer0128-Mar-11 6:30
SledgeHammer0128-Mar-11 6:30 
GeneralRe: Read XML Into Class Hierarchy Pin
Not Active28-Mar-11 6:43
mentorNot Active28-Mar-11 6:43 

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.