LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   slmodem on intel modem and no dial tone (https://www.linuxquestions.org/questions/linux-networking-3/slmodem-on-intel-modem-and-no-dial-tone-380287/)

Brian1 11-05-2005 04:21 PM

slmodem on intel modem and no dial tone
 
This is no big deal to me but had some spare time. I decided to to try the winmodem on my notebook. A Prostar 888E. It is an intel one, 00:1f.6 Modem: Intel Corporation 82801CA/CAM AC'97 Modem Controller (rev 02). Compiled the kernel and compiled the slmodemd driver. I start slmodemd as ' slmodemd --alsa '. I then open kppp and querry the modem and reponds back. The issue is it will not open the line to make a connection. The only way I can get this to work is change the Off-hook value of the modem with this command ' amixer -c1 sset Off-hook,1 on '. Then using kppp it detects dial tone and connects. All works fine. But when I disconnect the line does not hang up. I have to issue the command ' amixer -c1 sset Off-hook,1 off '. And of course hit Control-C to stop slmodemd in the terminal.

To make it clearer this is the routine.
Open a terminal and run the command ' slmodemd --alsa '
Open a second terminal and run ' amixer -c1 sset Off-hook,1 on ' (to open the line)
In the same terminal I can run ' kppp -c <connection acount name> '
When done disconnect.
In the second terminal run the command ' amixer -c1 sset Off-hook,1 off ' (to hang up the line)
Then in the first terminal hit the Control-C to stop slmodemd.

I thought easy script writing. So I wrote this. Contents of connect.sh
Code:

#!/bin/bash
/sbin/slmodemd --alsa &
/usr/bin/amixer -c1 sset Off-hook,1 on
/usr/bin/kppp -c hdixon -q
/usr/bin/amixer -c1 sset Off-hook,1 off
sudo /sbin/pkill slmodemd

Here is the catch it will not go past the line with slmodemd in it. In a terminal it runs the slmodemd line then outputs the following.
Code:

SmartLink Soft Modem: version 2.9.10 Oct  6 2005 19:39:57
symbolic link `/dev/ttySL0' -> `/dev/pts/3' created.
modem `modem:1' created. TTY is `/dev/pts/3'
Use `/dev/ttySL0' as modem device, Ctrl+C for termination.

Now here is where it just waits. The script will not continue until I hit Control-C and of course that turns off the modem.

The big question here is there a way to make a script like above but will keep going even though the slmodemd line is waiting for more input?

System specs
Fedora Core 3
Kernel 2.6.14.rc4
KDE 3.4.3
slmodem version 2.9.10
alsa version 1.0.9-rc4

Thank you for your time and help
Brian1

dracolich 11-06-2005 02:34 PM

That is what the script is supposed to do. After this you will have the/dev/modem linked to /dev/ttySL0 (or whatever slmodem created). At this point, if everything works properly, you can open a dialer and connect.

Brian1 11-06-2005 05:14 PM

Thats correct but the script pauses after executing the line /sbin/slmodemd --alsa &. Whether I use & or not. It is waiting for one to hit Control-C key combo. Of course if I do that that deactivtes the slmodemd app and the script continues. But since slmodemd has been stopped there is now no modem. I just need to figure how to enble the line /sbin/slmodemd --alsa & and then keep the script going with the rest of the options till the end with no interaction.

Thanks for your time
Brian1

dracolich 11-07-2005 06:40 AM

I haven't found a way yet to kepp the script running as a background process. If you Ctrl+C it will end the script, so don't do it. Keep it running in a terminal window, then just open your dialer app to make the connection. When you don't need to be online anymore you can then Ctrl+C to stop slmodemd.

Brian1 11-08-2005 04:44 PM

Thanks for your till I can figure out ho or if it can be done to start 2 commands at the same time. If I could do that then I could use it to start 2 scripts at the same time. One cotaining the slmodemd command and the other containing the rest of the commands. For now it will work as two seperate scripts.

Again thanks for your input.
Brian1


All times are GMT -5. The time now is 05:51 PM.