LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 07-03-2005, 12:40 AM   #1
scottie4442
Member
 
Registered: Aug 2003
Location: El Dorado, AR, USA
Distribution: Debian, Mandrake, Suse, Knoppix, Lindows
Posts: 33

Rep: Reputation: 15
FC4 problems compiling the smartlink modem driver on a toshiba satellite


I installed FC4 on my laptop, a toshiba satellite M35X-S114. Everything is fine except when I try to compile the SmartLink modem driver, slmodem-2.9.9d and/or slmodem-2.9.9d-alsa, I get an error. The output of make is:

make -C modem all
make[1]: Entering directory `/home/scottie4442/drivers/slmodem-2.9.9d-alsa/modem'
gcc -Wall -g -O -I. -DCONFIG_DEBUG_MODEM -m32 -DSUPPORT_ALSA=1 -o modem.o -c modem.c
modem.c: In function ‘modem_reset’:
modem.c:1604: error: invalid storage class for function ‘sregs_init’
modem.c:1616: warning: implicit declaration of function ‘sregs_init’
modem.c: At top level:
modem.c:1630: error: static declaration of ‘sregs_init’ follows non-static declaration
modem.c:1616: error: previous implicit declaration of ‘sregs_init’ was here
make[1]: *** [modem.o] Error 1
make[1]: Leaving directory `/home/scottie4442/drivers/slmodem-2.9.9d-alsa/modem'
make: *** [modem] Error 2

I get this when I try to compile either of the drivers. Thanks in advance for any help provided.

Scott Adams
 
Old 07-03-2005, 06:23 PM   #2
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Hi Scott,

I have used this alsa driver in kernels 2.6.10 and 2.6.11 with no compilation problems. Looking at the modem.c source, there is a static declaration prototype of this function in the line 1604 to be used for compilation of the line 1616. Your compilation complained the line 1604 and because of this, assumed an implicit non-static declaration on the line 1616 when this function was referenced.

I would guess it is a compiler issue. I would suggest you to remove the static prototype declaration from the line 1604 and then move the "modem_reset" function, lines 1600-1619 to line1668. Doing this, you won't need the prototype as the function "sregs_init" will be compiled before the first call to it.

Cheers,

Osvaldo.
 
Old 07-04-2005, 12:45 PM   #3
scottie4442
Member
 
Registered: Aug 2003
Location: El Dorado, AR, USA
Distribution: Debian, Mandrake, Suse, Knoppix, Lindows
Posts: 33

Original Poster
Rep: Reputation: 15
thanks for the help, partial fix

I went into the modem.c file and commented out the two references to sregs_init, about line 1605 or so. The make file worked fine. Now when I try to run the initialization command for the modem, '/sin/modprobe slamr' and then '/usr/sbin/slmodemd --country=USA /dev/slamr0', I get the message:

error: mdm setup: cannot open dev `/dev/slamr0': No such device
error: cannot setup device `/dev/slamr0'


I then run 'dmesg | grep slamr' and get the following message:

slamr: SmartLink AMRMO modem.
slamr: device 8086:24c6 is grabbed by another driver


I tried to use the module ungrab_winmodem and it seems to work, at least it does not give any errors.

Any ideas anyone.

Thanks for the help so far,

Scott Adams
 
Old 07-04-2005, 01:57 PM   #4
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Hi Scott,

When you just comment out these lines, you resolve the compilation problems. However, you also break the normal program behavior.

I would recommend you to do the changes as I said yesterday. These changes alter the source construction but maintains the expected logic flow.

Cheers,

Osvaldo.
 
Old 07-04-2005, 09:23 PM   #5
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Hi, I had the same problem with slmodem. The problem is it's a proprietary driver and new kernels refuse it, so you must install a kernel modules named ungrab-winmodem in order to make it work. You can find it here Follow the instructions, you must load the ungrab-winmodem module before loading slamr module. I hope this works.
 
Old 07-05-2005, 04:14 PM   #6
scottie4442
Member
 
Registered: Aug 2003
Location: El Dorado, AR, USA
Distribution: Debian, Mandrake, Suse, Knoppix, Lindows
Posts: 33

Original Poster
Rep: Reputation: 15
fixed part of the problem

talked to a friend of mine that is a programmer and he suggested editing modem.c, under the modem directory, and removing the static declaration from the lines where sregs_init is, about 1700 or so on my copy. I tried this and it compiles fine, but when I was reading through some information found out that I don't need to do the slamr stuff. It says that in kernel-2.6.8 or higher, which FC4 is, can use the built in driver and just go into the modem directory and do a "make SUPPORT_ALSA=1" and then copy slmodemd to the /usr/sbin directory by hand. I then just have to issue this command at the command line: '/usr/sbin/slmodemd --alsa' and so far so good. To use kpp you need to create a symbolic link, 'ln -s /dev/ttySL0 /dev/modem'.

Now when I try to dial out with wvdial or kppp it seems to work but it tells me no dialtone and I cannot hear modem activity. Any help on this?

Scott Adams
 
Old 07-05-2005, 06:36 PM   #7
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Hi what I did is downloaded the slmodem-2.9.9e-pre1.tar.gz which is the most recent release of this driver by limodems, it compiles fine without problems under FC4, which is what I use. You can download it here You will also need the ungrab-winmodem module to make it work.
 
Old 07-08-2005, 03:16 PM   #8
scottie4442
Member
 
Registered: Aug 2003
Location: El Dorado, AR, USA
Distribution: Debian, Mandrake, Suse, Knoppix, Lindows
Posts: 33

Original Poster
Rep: Reputation: 15
finally fixed

[make sure that you have an ALSA usable modem to do this]
(use ScanModem from here )

OK. I got the problem fixed and my modem works great. How I fixed it is:

1. download the slmodem-2.9.9e-pre1-alsa.tar.gz from here

2. untar it

3. cd into the directory

4. make

5. make install

6. /sbin/modprobe [your modem module] : ie. mine is snd-intel8x0m so it would look like
/sbin/modprobe snd-intel8x0m

7. /usr/sbin/slmodem --alsa (must include the alsa)
**do not close the terminal after this is running***

8. open another terminal and run kppp from user account

9. setup kppp to use the ttySL0 modem location ( you can look up how to use kppp in the help)

10. when kppp is setup then click connect and should work.

Hope this helps. BTW, just for information sake this was done on a Toshiba Satellite m35x-s114.

Thanks for all the help.

Scott Adams
 
Old 07-11-2005, 11:25 AM   #9
wneumann
LQ Newbie
 
Registered: Sep 2004
Distribution: Current Fedora Core
Posts: 12

Rep: Reputation: 0
"modprobe ungrab-winmodem" does nothing for me. It loads the module, but if I then do "modprobe slamr" I still get the error about the device being used by another driver.

"slmodemd --alsa" works fine for me, but only if I do it after I have logged on. When I put it in my init script it fails for some reason with the following errors (this is since I upgraded to fc4, it was fine with fc3):

ALSA lib conf.c:1578:(snd_config_load1) _toplevel_:51:23:No such file or directory
ALSA lib conf.c:2823:(snd_config_hook_load) /etc/alsa/cards/aliases.conf may be
old or corrupted: consider to remove or fix it
ALSA lib conf.c:2686:(snd_config_hooks_call) function snd_config_hook_load returned error: No such file or directory
ALSA lib pcm.c:1959:(snd_pcm_open_conf) Invalid type for PCM modem:1 definition
(id: modem, value: cards.pcm.modem)
error: alsa setup: cannot open playback device 'modem:1': Invalid argumenterror: cannot setup device `modem:1'

The alsa modules have already been loaded when slmodemd runs (according to "ls /proc/asound/*), so I am at a loss what this problem is.
 
Old 07-11-2005, 11:49 AM   #10
scottie4442
Member
 
Registered: Aug 2003
Location: El Dorado, AR, USA
Distribution: Debian, Mandrake, Suse, Knoppix, Lindows
Posts: 33

Original Poster
Rep: Reputation: 15
if you are going to use /usr/sbin/slmodemd --alsa, you need to see what alsa calls you modem, mine is setup as an snd-intel8x0m (I went to the sound setup and found out that it listed my modem there, might have been lucky on this). Your problem is that you might be putting the slmodem stuff into the init script before it loads the modem driver. I made a script and put a launcher on my desktop to start it for me, I have three different ways to connect and it depends on where I am as to which I use. When I want to start my modem I just click on the launcher and it runs the slmodem stuff for me and then I have another icon for kppp, I could not find it in the menu anywhere, and tell it to connect. THis works fine for me, the only problem I have noticed is that my modem connection is very slow, but I think this is my ISP not my modem.

Hope this helps,

Scott Adams
 
Old 07-11-2005, 12:25 PM   #11
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
wneeumann, maybe slamr is already loaded when you run 'modprobe ungrab-winmodem', so try this:
Code:
/sbin/modprobe -r slamr
/sbin/modprobe ungrab-winmodem
/sbin/modprobe slamr
/usr/sbin/slmodemd --options device &
If it works, you can put the previous code on /etc/rc.d/rc.local in order to get the module automatically loaded on boot. Note that if you do this, you must add a '&' symbol after the slmodemd command otherwise Fedora will hang on boot. Also note that this works with the slmodem-2.9.9e-pre1.tar.gz which is the proprietary driver. If you're using the alsa driver you won't need the ungrab-winmodem module. BTW the slmodem-2.9.9e-pre1.tar.gz (as well as the alse driver) is the only one you'll be able to compile under FC4 because of the newer gcc version it has.

Last edited by Hungry ghost; 07-11-2005 at 12:41 PM.
 
Old 07-11-2005, 01:51 PM   #12
wneumann
LQ Newbie
 
Registered: Sep 2004
Distribution: Current Fedora Core
Posts: 12

Rep: Reputation: 0
Thanks for the hints.

Scott: I run shmodemd from rc.local which is the last thing loaded. In fact to try to debug it I ran it using the command
"mymodem > /tmp/modemlog" in rc.local and for debugging purposes the mymodem script does "ls -l /proc/asound" and "set" and before running "slmodemd --alsa -p=0666 modem:1&"

I see from the output in modemlog that nothing is different in the environment when the script runs from rc.local than when I run it later from a terminal, but when run from rc.local it fails, while run later from a terminal it works. I've even tried running the script in the background from rc.local and adding "sleep 120" to the script to have it wait until I've logged in before doing anything, but no change. It is no big deal, since I can run load it after I've logged in, but the mystery of it bugs me.

As to trying to use the slamr module -- that was a good hint odiseo77 , but I checked that it was not loaded before doing modprobe ungrab-winmodem, so that is not it.

It seems as if my problems are unique to me, so probably I should just forget it -- after all I can get my modem to work.
 
Old 07-11-2005, 05:10 PM   #13
scottie4442
Member
 
Registered: Aug 2003
Location: El Dorado, AR, USA
Distribution: Debian, Mandrake, Suse, Knoppix, Lindows
Posts: 33

Original Poster
Rep: Reputation: 15
No sure what is going on with your problem, as I said before, I do my with an application launcher intentionally. I am running on a laptop and I turn on my built in ethernet card, wireless card, or modem by hand, depending on where I am. I hate to be a kill-joy but just make a script and run it when you start, I have to make sure to set both my scripts to run as root.

Scott Adams
 
Old 07-11-2005, 10:17 PM   #14
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Just a few questions: what distro are you using? which kernel? which slmodem driver? can you get slmodemd working by hand after boot and are you able to connect manually at least?
 
Old 07-11-2005, 10:38 PM   #15
wneumann
LQ Newbie
 
Registered: Sep 2004
Distribution: Current Fedora Core
Posts: 12

Rep: Reputation: 0
Distro Fedora FC4
Kernels 2.6.11-1.1369_FC4, 2.6.12-1.1387_FC4, and 2.6.12-1.1390_FC4
slmodem-2.9.9e-pre1.tar.gz
(also tried slmodem-2.9.10.tar.gz, but compile problems with FC4)

Yes, as I said in the message, I can get slmodem working with the --alsa option, but only after init has completed, not during init.
 
  


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
Toshiba Satellite Smartlink Modem FC3 phishphan420 Linux - Hardware 3 01-16-2006 09:32 PM
Can anyone help me get my ATI driver working on Toshiba Satellite A60 corstar Linux - Hardware 0 09-27-2005 01:59 PM
Toshiba Satellite 1135 modem driver Syringe Linux - Laptop and Netbook 0 07-27-2004 10:48 AM
Toshiba Satellite 1115SP135 Modem Gerardo Linux - Laptop and Netbook 4 01-26-2004 10:47 PM
compiling SmartLink modem driver problem bugyugo Linux - Laptop and Netbook 1 07-23-2003 09:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

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