Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > app that sends data to serial port in OSX (via a usb to serial adaptor) from PHP??

app that sends data to serial port in OSX (via a usb to serial adaptor) from PHP??
Thread Tools
Fresh-Faced Recruit
Join Date: Oct 2005
Status: Offline
Reply With Quote
Oct 12, 2005, 05:16 AM
 
Hi all, this is my first post here, it looks like a pretty cool place, I've been browsing the forums, a good community

I have a question (of course):

I have a PHP app in OSX 10.2 and want to send ANY data to the (installed and workin) serial port.
I have read around and it seems I have a few options. One is to use osascript from within PHP to call an applescript (which MAY or may NOT be able to directly send data to the port) or if applescript cannot do that directly, use osascript to call a small, customised app that opens the port, sends data and then closes the port.

I guess the question(s) are:
1) can applescript directly send ANY data to the serial port?
2) if not, does anyone know of a tiny command line style app that can be executed (and hidden from the user) from osascript via php to send that data?


This is for a POS system btw. A POS drawer (till) is being opened from the serial port.


Any advice GREATLY appreciated

Rob
(Last edited by robstarr; Oct 12, 2005 at 05:27 AM. )
     
Forum Regular
Join Date: May 2005
Status: Offline
Reply With Quote
Oct 12, 2005, 04:10 PM
 
I haven't done any serial control apps in a long time, and I'm not familiar with PHP, but you could use AppleScript to call a bash shell script that would send the data to the port just as you would be sending data to a printer.

Anyone else with some ideas?
Did Schroedinger's cat think outside the box?
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:39 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2