FC4 problems compiling the smartlink modem driver on a toshiba satellite
FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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?
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.
"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.
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.
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.
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.
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.