 |
|
 |
Hi there,
I am working in LinQ Technologies as software developer, and since last couple of days I am finding solution for PBX interfacing..for pick up Caller Identification from in comming calls. Thanks to your application to debug serial port communication I enable to find solution.
Its really helpful. thank you very much.
--
Regards,
Haresh Ambaliya.
|
|
|
|
 |
|
 |
Thanks I really appreciate it.
|
|
|
|
 |
|
 |
hi
i just found your application, but i am not a programmer.
i need a small application, where i can set the com-port-parameters (port, baud, parity, etc.) (or pass them on as arguments) (this is needed, because i have to find out by trying- these parameters are not specified).
the application sits in the background of vista64, waiting for a keystroke (p.e. F8 and F9).
when F8 is pressed, a leading "ATD" is sent, then the marked text of the active window is parsed and only the numbers are extracted and sent to the comport, followed by a terminating (cr, lf)).
when parsing a leading + is translated to 00 (zero, twice).
when F9 is pressed, ATH0 and terminating (cr, lf) are sent (hang up)
this steers the isdn-phones connected and dials / hangs up from any window.
i did have a solution from the phone manufacturer, but this one is not supported on win vista 64 any more. the phone manufacturer is not supporting vista 64, and not intending to do so in the future.
if, on the other hand, you can help me to use your code in an access-vb-context, which i know well, this would help me too (access 2003 preferred, 2007 also fine) - in this context, i would need a hint for a way to catch F8/F9, independent of which application is in the foreground.
if you develop a solution, i will be willing to pay for it.
best regards,
david (ds at d-s-c.ch)
|
|
|
|
 |
|
 |
Just what I was looking for. Thanks!
Drew
|
|
|
|
 |
|
 |
Hi,
I need to convert a VB5 project that was using the MScomm ActiveX (If it is one).
Anyway to receive data the soft was sending this command MScomm.Write("P" & $CHAR(13)).
I tried to replace the $CHAR(13) by a \n in C# without any success.
Can you tell me how to send a carriage return the my device via the serial port.
And Thanks for your code it help me a lot..
Have a good one
|
|
|
|
 |
|
 |
\n should be the same as char 13. Why don't you convert the string to bytes and send those bytes then look at the bytes in the debugger and make sure they are correct.
the last bytes should be decimal 13. Line feed is 10
Just thinking off the top of my head.
|
|
|
|
 |
|
 |
I have not added this to the project but to convert to ascii
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
byte[] bytes = encoding.GetBytes(text );
serialPort1.Write(bytes, 0, bytes.Length);
|
|
|
|
 |
|
 |
Hello RJ,
Please accept my sincere thanks for the awesome article, it really works for me.
However Going forward, I have a question:
How should I programatically toggle,receiving of the events?
My requirement is I need to disable/enable Data Received event during the program on user request.
I believe, this should be a property in Serial Port class!!!.
Please guide.
Thanks and Regards.
Amar.
|
|
|
|
 |
|
 |
Hello All,
Can any one tell me how to turn off receiving Serialport.DataReceived events during run time(based on some condition) with handler written for this event?
Thanks and Regards.
Amar.
|
|
|
|
 |
|
 |
You can write custom serialport wrapper class which will fire custom event based on DataReceived event and some other conditions which is suitble for you. But acctually I would take simpler approach - In runtime you can remove Event handler when needed. Example:
SerialPort.DataReceived-=new SerialDataReceivedEventHandler(YourMethod)
|
|
|
|
 |
|
 |
Hi: Your proyect is a very good way to learn about using serialport, but, I just want to receive binary data from the serial port and save it into a binary file, can you help me with the modifications that I have to make in your ComPlay code?. thanks
Mauri
|
|
|
|
 |
|
 |
I have some questions:
a) From the front end, how do you close the port so you can open another port?
b) does it exclusively hold the port open or can it read what another application is doing on the port and not lock the port open?
Thanks for a great app.
|
|
|
|
 |
|
 |
Com ports can only be opened exclusively except maybe some virtual com port software might allow that.
If you change the port and hit connect that should work unless there is a bug in it. The easiest thing to do to close the port it just restart the app. Or you can just drop a button on there, it would be one line of code...
|
|
|
|
 |
|
 |
Could you please confirm if code doesn't work/works for COM Ports such as Blackberry Virtual Serial Port V2?
I connected by Blackberry 8900 on COM3 port. "Enumerate Ports" button click listed COM3 as one of the available ports. So I changed the PortName value from COM1(default in the code) to COM3 and hit the "Connect Now" button. I get an error msg as shown in the second pic.
First pic: details of Com Ports as figured out by this code and device manager too confirmed the same
http://img29.imageshack.us/img29/70/compic1.png[^]
Second pic: Error msg encountered
http://img196.imageshack.us/img196/4827/compic2.png[^]
Appreciate if you can help me get this working with COM3 port.
Thanks
VC
|
|
|
|
 |
|
 |
I have used it with other virtual ports. I have also tried bluetooth virtual port.
|
|
|
|
 |
|
 |
If you want to know what an application is sending you can attach that com to another com on your machine. Thats what I mainly use the tool for.
|
|
|
|
 |
|
 |
Like your app - really great for my experimenting with my son. I want to be able to start and stop the port. I have tried the function below. Sometimes it works but mostly the app just hangs. Thanks! Any ideas? private void buttonStop_Click(object sender, EventArgs e) { try { this.serialPort1.Close(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); return; } MessageBox.Show("COM port closed and successfully."); }
|
|
|
|
 |
|
 |
Thanks
How can i send and Recieve binary file('image file')
thanks for your effort
|
|
|
|
 |
|
 |
On the same machine: Enumerate your ports make sure you have 2. Attach a null cable attached from com 1 - com 2. Run two instances of the program and set them on 1 and two and press connect on both. Set the file to your binary file and hit send.
|
|
|
|
 |
|
 |
I am not able to send the data in hex to the hardwre by using the serila port.
below is the code which i am using.Kindly have look and tell me where i am going.
if (serialPort1.IsOpen == false)
{
this.serialPort1.Open();
}
this.serialPort1.Write("3F");
|
|
|
|
 |
|
 |
Not sure what your trying to do. putting quotes around "3F" would be sending it as a string literal. Therefore you are passing a string. Sounds like you want to send bytes?
|
|
|
|
 |
|
 |
that sould become handy.
Imagination is more important than knowledge...
{Albert Einstein}
|
|
|
|
 |
|
 |
But why couldn't you have posted it a week earlier when I really needed it
|
|
|
|
 |
|
 |
You should have been more patient. :->
BTW, I can't get it running with the "Virtual Serial Ports Driver XP4". I set up virtual COM2 and COM3 ports (as if they were connected with a null modem cable), and after pressing "Test Connect Now", or "Send Text", nothing happens. "Enumerate Ports" works fine. Any suggestions?
|
|
|
|
 |
|
 |
There was a small bug. I am uploading a new version now..
|
|
|
|
 |