problem while having a communication with serial port?????


 
Thread Tools Search this Thread
Top Forums Programming problem while having a communication with serial port?????
# 8  
Old 10-30-2007
but how to dial up modem.........
I had no idea about how to dial.......
how to make it online?????????
# 9  
Old 10-30-2007
You don't have to.

Go through the configuration and remove the modem dialing entries.
# 10  
Old 04-17-2008
Serial Communication with 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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. SCO

Problem finding what is using a serial port

How can I determine what process is currently using a serial port? A good bit of google searching hasn't turned up anything useful, but it seems like there has to be a way to do this without too much difficulty. When I first started looking into this problem, I assumed that when a port was in... (2 Replies)
Discussion started by: jdsnatl
2 Replies

2. Programming

Serial communication failing

edit: never mind; mods please delete. I finally got so frustrated I figured it couldn't be the code and it must be the device on the other end. After pulling it out of its cradle, I realized it was a different model number than the one I was using before, and wasn't accepting my... (1 Reply)
Discussion started by: DreamWarrior
1 Replies

3. Programming

problem in coding for GSM interfacing using serial port

i am having some coding problem in c for interfacing the GSM module through serial port. i want to send/receive sms. i have done all the setting for the port and know the AT command to use in this but i am actually having problem in reading and writing from serial port how to handle the signal when... (1 Reply)
Discussion started by: harsh_it
1 Replies

4. Solaris

Serial port problem

I am working with solaris 9 sparc and I want to connect physical device in serial port but when I am connecting it,It is showing the error window saying-- So can any1 tell me the reason or is there any package I have to add to work with serial port??? (2 Replies)
Discussion started by: smartgupta
2 Replies

5. UNIX for Dummies Questions & Answers

problem with serial port BSD

Hello all , i have change my system debian linux to freebsd( pcBSD) all working as well , but the serial does not work correctly. Under linux the problem does not appears. my problem is than my serial port does work . the first step than i have make is look with dmesg if my serial are... (0 Replies)
Discussion started by: pitbac23
0 Replies

6. Programming

Problem regarding serial port and multithreading

hello, I am creating a application in which I first open the serial port and then create the thread..for reading the data comming through that serial port. from that same thread I create another thread that is write thread means for writing on the serial port... I am continously polling again... (3 Replies)
Discussion started by: arunchaudhary19
3 Replies

7. IP Networking

ip communication through serial connection

I have serial modem connection between two computers. We have to login the remote computer through ip address. How can I get the ip address in this connection? (1 Reply)
Discussion started by: pcsaji
1 Replies

8. UNIX for Dummies Questions & Answers

serial communication

This isn't really a unix question, or even a programming question, but I hope you guys can help. I want to create a program to control the electricity on a model railway. I have created the program to that it sends characters over the serial cable, but now I need to do the switch that will... (1 Reply)
Discussion started by: KrazyGuyPaul
1 Replies

9. UNIX for Advanced & Expert Users

Serial Communication in UNIX

Hi, I am working on serial communication on Unix. Can anyone guide me through it. The steps required for RS 232 communication and can i do serial communication even if i dont have super user previledges. Thankx, Vicky (1 Reply)
Discussion started by: Vicky
1 Replies

10. UNIX for Dummies Questions & Answers

Serial port communication

We're running SCO Unix Openserver 5.05 and I'm having trouble with serial communication between the com2 serial port and a handheld device. Downloading data from Unix to the handheld works perfectly, but the other way around creates a major problem. I don't know whether it's a buffer overflow or... (1 Reply)
Discussion started by: Aretha
1 Replies
Login or Register to Ask a Question