![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem while having a communication with serial port????? | arunchaudhary19 | High Level Programming | 9 | 04-17-2008 05:52 PM |
| ip communication through serial connection | pcsaji | IP Networking | 1 | 12-13-2006 11:10 AM |
| serial communication | KrazyGuyPaul | UNIX for Dummies Questions & Answers | 1 | 01-23-2003 02:50 PM |
| Serial Communication in UNIX | Vicky | UNIX for Advanced & Expert Users | 1 | 04-08-2002 01:22 PM |
| Serial port communication | Aretha | UNIX for Dummies Questions & Answers | 1 | 01-25-2002 09:44 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Serial Communication from shell Mac OS X PHP script
Hi again,
I spoke with Keyspan and they assured me the USB to Serial device was working if I could use the Screen tool. I asked why I was unable to redirect stdin/stdout to and from the /dev/tty. device and was told there was no reason I shouldn’t be able to do so. I have tried: #echo “A” > /dev/ tty.USA28Xb2P1.1 The terminal window just hangs. I have also tried #chat and #efax with no luck... Has anyone had any luck with serial port communication from any other shell scripting language on a unix/linux box? Thanks! Corey Subject: [nyphp-talk] Serial communication in Mac OS X To: <talk@lists.nyphp.org> Message-ID: <C42C2CE7.59796%corey@bmfenterprises.com> Content-Type: text/plain; charset="us-ascii" Hi All, I am trying to connect to /dev/tty.USA28Xb2P1.1 which is a Keyspan USB to Serial adapter. I have had success using the screen utility, #screen /dev/tty.USA28Xb2P1.1 but I would like to use PHP to create a web interface to a microcontroller. I have attempted fopen with no luck: > $port = "/dev/tty.USA28Xb2P1.1"; > > $p = fopen($port, 'r+'); > $read = fread($p, filesize($port)); > fclose($p); > > echo $read; > > $p = fopen($port, 'r+'); > fwrite($p, "A"); > fclose($p); I have tried SerProxy but cannot get a connection through telnet. I have also tried LibSerial but could only find version 0.5.2 which does not yet support PHP apparently... I have read about IOKit but I am not sure it will get me where I want to be. Any help would be greatly appreciated. Thank you! Corey |
|
||||
|
I downloaded and compiled kermit on OSX 10.4 for use with the Keyspan connecting through /dev/tty.USA19H1d1P1.1 . In the past I had an entire factory tied together with kermit and scripts. Give it a shot.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|