Protecting(monitorring) serial (&usb) ports

Status
Not open for further replies.

BRightBack

Beta member
Messages
4
Hey,

a week ago i received the following assignment:

I had to make sure that the serial ports(& usb later) from a computer were being 'monitort (?)' & if the connection was broke or something a messagebox should be shown on the users screen. This process should (preferrable) run on the background. The goal off this all, is sercuring the serial (usb) ports off the computer, and make sure there is a connection. I searched for solutions for a week (Batchfiles, freeware, ...), but didn't find anything usefull, that's why i need your help. Thanks in advance.

Brecht
 
What is this for? A college course?

We have to run 12 weeks in a company for school. We have several assignments, and this is one i'm having problems to solve myself...I'm studying informatics (system & networking) so it's not really what i should have to do but still they asked me if i could solve it.
 
Just found this:
Serial ( COM ) Port Console Script
Autohotkey is a VERY easy scripting language. It has great forum support as well. I'd suggest taking the program in the link above and simplifying it for your needs. Cut out everything except polling the ports, and if it returns a false value use the MsgBox command to notify the user.
 
Hey,

a week ago i received the following assignment:

I had to make sure that the serial ports(& usb later) from a computer were being 'monitort (?)' & if the connection was broke or something a messagebox should be shown on the users screen. This process should (preferrable) run on the background. The goal off this all, is sercuring the serial (usb) ports off the computer, and make sure there is a connection. I searched for solutions for a week (Batchfiles, freeware, ...), but didn't find anything usefull, that's why i need your help. Thanks in advance.

Brecht

You didn't specify the target operating system or your level of experience with programming. So, I'm making the following assumptions:
- You're working with Windows
- You don't have much experience programming since the solutions you searched for were batch files and freeware

A program that runs in the background without a UI is called a Windows Service. So, you'll need to create a service. I'm going to suggest that you use C# since creating services in .NET is straight forward. Also, serial port communication is a bit easier in .NET than using win32 with C or C++. It's a bit difficult to make any further recommendations without knowing how familiar you are with programming concepts. However, this should be enough to get you started.
 
You didn't specify the target operating system or your level of experience with programming. So, I'm making the following assumptions:
- You're working with Windows
- You don't have much experience programming since the solutions you searched for were batch files and freeware

A program that runs in the background without a UI is called a Windows Service. So, you'll need to create a service. I'm going to suggest that you use C# since creating services in .NET is straight forward. Also, serial port communication is a bit easier in .NET than using win32 with C or C++. It's a bit difficult to make any further recommendations without knowing how familiar you are with programming concepts. However, this should be enough to get you started.

Yep, it's windows XP.
I'm not an experienced programmer, i'm studying informatics: networking.
 
Status
Not open for further replies.
Back
Top Bottom