LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-21-2011, 02:10 AM   #1
Vincent_
LQ Newbie
 
Registered: Sep 2011
Location: Belgium
Distribution: Ubuntu 10.04
Posts: 7

Rep: Reputation: Disabled
Using serial port (tty) even if /dev/ppp driver use it ?


Hello !

I use /dev/ppp driver for connecting a GSM modem to internet via GPRS (this is a home made software).
But I'd like to send SMS, and some AT commands to the modem, without beeing disconnected from GPRS (and avoid my IP address to change).

So, during GPRS session, send "+++" to the modem via tty to put modem through AT mode.

Is it possible to send some "raw" data on serial line without uninstalling or closing /dev/ppp driver ?

Thanks !!
 
Old 09-21-2011, 10:11 AM   #2
qlue
Member
 
Registered: Aug 2009
Location: Umzinto, South Africa
Distribution: Crunchbangified Debian 8 (Jessie)
Posts: 747
Blog Entries: 1

Rep: Reputation: 172Reputation: 172
I'd be interested in this as well. I usually disable mobile broadband to do this and then re-enable it afterwards.
 
Old 09-22-2011, 02:35 AM   #3
Vincent_
LQ Newbie
 
Registered: Sep 2011
Location: Belgium
Distribution: Ubuntu 10.04
Posts: 7

Original Poster
Rep: Reputation: Disabled
Yes, this is the easiest/standard way.

This is what I've tried to do :

1. Disabling /dev/ppp driver without sending PPP protocol disconnection, send AT command through tty, re-enable /pev/ppp and restart a PPP handshake.
It works for 3G modems, but not for the others : if I try to restart a PPP handshake, provider send me (through a PPP/LCP reject) : "PDP context deactivated, no network protocol available".
My point of view : it works for 3G modems, probably because PDP contexts are handled on the UTRAN network, which is obviously separated from standard GSM network. Provider consider the modem still connected, and doesn't see any issue restarting a PPP handshake and giving the same IP address.

2. "Short-circuit" /dev/ppp driver without disabling it, send commands through tty. I've tried many different solutions, without success (nothing on serial line or /dev/ppp crash or ...). It seems ppp driver is not made for handling serial "raw" data. Into the driver source code, the callback function handling serial communication returns an error with this comment : "Write on the tty does nothing, the packets all come in from the ppp generic stuff".
Unfortunately, I don't have time to modify this Linux ppp driver.

This is a pity, because technologically : it works ! I've tested it.
 
  


Reply



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
Is a USBtty (USB serial port) treated the same as tty (normal serial port) in C? spudgunner Programming 1 11-12-2010 01:19 PM
Help: tty console to serial port Rostfrei Linux - General 1 11-03-2010 04:05 AM
Porting Linux, the Serial Port, and TTY Interloper Linux - Software 2 06-25-2009 03:53 AM
TTy driver how to use underlying serial port vicky_driver Linux - Hardware 0 12-26-2008 05:48 AM
unresponsive serial port after ppp timeout? netKat Linux - Networking 0 12-26-2003 02:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:57 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