LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-26-2007, 10:22 AM   #1
MattFunke
LQ Newbie
 
Registered: Mar 2006
Distribution: TSLinux 3.0, RedHat Enterprise 4
Posts: 16

Rep: Reputation: 0
chat and "inappropriate ioctl for device"


I want to send some characters out the serial port after a PPP link has been established. I put those characters in a chat script and invoked chat in the /etc/ppp/ip-up script. But I get this error in the system log in reply:

chat[327]: Can't get terminal parameters: Inappropriate ioctl for device

Any idea what that might mean? Does anyone have a (working) strategy for sending characters out the serial port once the PPP link comes up?

Thanks for your time and consideration on this one.
 
Old 01-29-2007, 08:07 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by MattFunke
I want to send some characters out the serial port after a PPP link has been established.
I am no guru on this, but Ithink that would seriously screw up the PPP connection. Normally you use a chat script to get to the point where you can start PPP.

Would you care to reveal why you might want to do such a strange thing?
 
Old 01-29-2007, 09:30 AM   #3
MattFunke
LQ Newbie
 
Registered: Mar 2006
Distribution: TSLinux 3.0, RedHat Enterprise 4
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by blackhole54
Would you care to reveal why you might want to do such a strange thing?
If I send some characters after PPP has established the link, like this:

<wait 2 seconds> +++ <wait 2 seconds>

... then I can issue AT commands to the modem. After that, "ATO0" will put it back online.

Issuing AT commands (and reading the responses) is useful because the modem itself is aware of certain things -- signal strength (it's wireless), VSWR, and so on. I'd like the Linux box to be aware of them, too, so asking the modem seems logical enough. You can also send SMS messages using AT commands, which would be a nice feature to incorporate.

Unfortunately, the usual write(fd, txBuf, len) and read(fd, rxBuf, len) procedures don't even work; they return errors (negative numbers). I can't send the characters I want to, even though I know what the characters I need to send should be. If you know of any way to accomplish this successfully, I would be most grateful for your help.
 
Old 01-29-2007, 11:25 PM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Not so strange after all ...

I am not real clear on the internals here, but I would think you would have to get some cooperation from pppd on this, and I am not sure you can do that. First you might need to get pppd to relinquish control of the serial line just so you can send your messages. And then you would have to be sure that what was going on wasn't getting pppd hopelessly confused. I am just thinking out loud here, so use your own judgement. I am wondering if you can learn anything useful from finding out how PPP sessions are suspended for voice phone calls. I know I have seen software for that advertised for MS. I don't know if it has been implemented in Linux. And I don't know that it deals with the problem of getting the serial line relinquished.

Like I said, I am just thinking out load. My hope is my ramblings may spark an idea in you or somebody else. If I have any flashes of inspiration I will post back. It is an interesting problem.

Good luck.

Last edited by blackhole54; 01-29-2007 at 11:26 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird Perl error with "Inappropriate ioctl for device" bnutting Programming 9 03-12-2012 08:25 AM
inappropriate ioctl for device praetorrian Linux - Software 1 05-09-2006 01:11 AM
kismet "channel get ioctl failed...no such device" fatblueduck Linux - Software 0 01-03-2006 02:51 AM
Inappropriate ioctl for device(25) why1957 Linux - Networking 0 08-03-2003 05:45 AM
stty: standard input: Inappropriate ioctl for device fwalthard Linux - General 0 07-14-2003 03:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration