Hi,
I am trying to send information (a simple string of data) from PC out the serial port to a GSM Module and waz wondering does anyone know where i could get code to do this or any tutorials.
Thanks
Stephen
sending data out the serial port
Moderator: General Moderators
-
steverossco
- Forum Newbie
- Posts: 4
- Joined: Thu Apr 13, 2006 11:43 am
For this you need PHP to interoperate with your operating system..
On linux it would be as simple as talking to /dev/ttySX...
For DOS you probably need to open COMX and talk in there..
For windows you'll probably want to implement your own php extension using the info at http://msdn.microsoft.com/library/defau ... serial.asp...
On linux it would be as simple as talking to /dev/ttySX...
For DOS you probably need to open COMX and talk in there..
For windows you'll probably want to implement your own php extension using the info at http://msdn.microsoft.com/library/defau ... serial.asp...
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
I'm interested in this too.... can you just open a handle using fopen() or similar and then fwrite() and fread() from it?timvw wrote:For this you need PHP to interoperate with your operating system..
On linux it would be as simple as talking to /dev/ttySX...
For DOS you probably need to open COMX and talk in there..
For windows you'll probably want to implement your own php extension using the info at http://msdn.microsoft.com/library/defau ... serial.asp...
The what about the privileges of the www user ("nobody" on my setups)? This is completely new ground for me.
Yes.d11wtq wrote: I'm interested in this too.... can you just open a handle using fopen() or similar and then fwrite() and fread() from it?
Well, you can consider the device as a 'file' in the filesystem. Thus all the access rules for accessing a file are also relevant for this particular 'file'.d11wtq wrote: The what about the privileges of the www user ("nobody" on my setups)? This is completely new ground for me.
More (much more) info at http://www.tldp.org/HOWTO/Serial-HOWTO.html