Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 28th, 2003, 02:32 PM
jmiller jmiller is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 35 jmiller User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 30 sec
Reputation Power: 7
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

Reply With Quote
  #2  
Old March 2nd, 2003, 08:09 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 42 m 50 sec
Reputation Power: 185
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.

Reply With Quote
  #3  
Old March 14th, 2003, 11:24 AM
jmiller jmiller is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 35 jmiller User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 30 sec
Reputation Power: 7
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > control serial port with php?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT