|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
control serial port with php?
Is is possible to send commands and receive feedback via a serial port using php? I've got an antenna controller hooked to a PC that is capable of communicating this way and want to do it by web interface. I've found a couple threads that touch on the topic but most say "use another language". Thanks.
__________________
Jeff |
|
#2
|
|||
|
|||
|
if your "antenna controller" is using ascii control commands over the serial line and you are on unix, you can fopen() your /dev/cua device and read/write to it.
but many devices encode their commands with using the serial control lines, i doubt this is possible in PHP without external programs... do you have some more info about the protocol being used?
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#3
|
|||
|
|||
|
Hello M. Hirsch, thanks for the reply, and apologies for the belated follow-up. The documentation for the "controller" states that it conforms to the "SA Bus protocol originally defined by Scientific Atlanta." An example of a response from the device is:
byte 0: ACK byte 1: A (where A is the address of the controller) byte 2: 'CC' (the command code of the msg which triggered the reply) byte3: 'F' (Ascii 'F', for offline) byte 4: ETX So it looks to me like it is using ascii control commands, correct? I'll pursue the fopen() method that you pointed out. |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > control serial port with php? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|