View Single Post
Old 12-15-2009, 12:55 AM  
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
How to send Hex 0x1A via PHP

I am trying to communicate with a modem connected to my com port via a PHP script. I got everything working except for the last command which is supposed to send 0x1A to the modem. I tried a few variations including:

Code:
ser_write(hexdec("0x1A"));
ser_write("\r\n");
but it just types out 26. It is supposed to represent control-Z and in my terminal program (terminal by Br@y) I trigger it with a macro that says "$1A".

Hope someone can help.
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote