Archive: serial port, how to ?


serial port, how to ?
I've made a custom page to select a serial port.

Then, how can I :
1. test the selected port wether or not connected to a device (e.q Modem) ?
2. automatically load avaliable serial port ?

Thank you.


Have you searched the forum for "port"?

-Stu


Ofcourse stu, i've searched with keyword "port" and "serial port".
Almost all result asking about server port, no one asking serial port. Or could you point me the link ?


Now, my software has to be deployed... So I come with the following solution (though its not satisfying solution) :

1. I've created a custom page, with field to enter the Modem Serial port Number.
2. I've put a note to guide a user how to enter the port number.
3. And put it into a *.ini file after clicking next button.

The above solution is not eficient so I wouldn't call it as a solution, since :

1. The installer cannot check, does the provided port number is the correct port or not.
2. Users can put anything inside the text box, they can put a string inside the text box while it has to be numeric only.

Now, what I'm expecting is like my first post, with combo box option for filling the serial port. The list of combo box is auto detected by installer by scaning available serial port. with a button to check whether a modem connected to selected port or not.

Well, I'm trying but don't know when will I found the right solution as I wanted.
I wonder if some one already has a better solution...

Thanks in advance...


Ahh sorry. I don't think anyone has already done something like this. You might be able to find a command-line executable via Google and catch its output with nsExec::ExecToStack. If you can't find an executable then you'd probably have to write a plugin in C/C++ to do the job.

If you are unsuccessful there, all I can suggest is that you validate the serial port with this:
http://nsis.sourceforge.net/StrCSpn%...for_characters

-Stu


Thanks stu, at least it give me a clue. Though I'm not sure wether or not I can finish it in the near future...
Thanks again...