[speedtouch] Re: New driver version 1.3: ANNOUNCEMENT + New FC2
Hi all, Following some problems with my ADSL connection, I installed the new drivers 1.3 on my FC2. I found a great improvement with this version, so thanks Benoit ! :) After that, I updated my RPM of speedtouch to version 1.3 and take advantage of the new improvements. * Sun Jun 20 2004 Frederic RUAUDEL [EMAIL PROTECTED] 1.3-2.GrumZ - Patch the speedtouch-start script to clean the mutex created by modem_run and to skip running modem_run if the firmware is already loaded - Patch the location of pppd pid in speedtouch-stop - Remove the startadsl.sh script - Modify the adsl init script to use speedtouch-start/speedtouch-stop - Add the configuration file speedtouch.conf with the good values - Remove the creation of /etc/speedtouch.conf in %post section - Modify the configure line in the %build section to set the good default path to avoid having the buildroot set in the speedtouch-(start|stop) script As you can see, I've had to patch the start/stop script to make it works smoothly on my FC2. Here are the details : 1) speedtouch_clean_mutex.patch This patch fix a problem with the new mutex system of modem_run. When you stop modem_run, the mutex is not cleaned so when you try to start it up again, modem_run just print in /var/log/messages : modem_run version 1.3 started by root uid 0 and then stop without any clue ! After looking at the code I found that it was the mutex deadbeef ;-) So I had an ipcrm in the speedtouch-start script but this is a dirty hack and I think, if this is a bug and not a feature, that benoit will certainly find a better solution :) 2) speedtouch_check_firmware_load.patch this patch check the state of the ADSL line present in the file /proc/net/atm/speedtch*, and if the line is reported up and the firmware loaded, it skip the launch of modem_run and directly launch pppd instead of failing the load of the firmware and quit. 3) speedtouch_fix_pppd_pid.patch the last one is probably FC2 specific or maybe a missing configuration in my pppd package, but my pppd put its PID in /var/run/ppp0.pid and not in /var/run/ppp-${PPPD_PEER}.pid. So I made this patch to make it work with my current RPMS. Feel free to tell me where I'm wrong, if I am. For other changes, I remove my startadsl.sh script and use the speedtouch-(start|stop) instead and generate a good default speedtouch.conf for the firmware that I provide with my package. The hotplug support works very well for me, another great feature added in 1.3 (I know it's not new, but I never manage to configure it manually ;). And I added a friendly interface to my RPMs repository with a summary of the things to do to installed my RPMS : http://grumz.dyndns.org/ADSL_FC2 Comments and feedback are welcome ! Have a nice day, Fred Benoit PAPILLAULT wrote: = PLEASE, read the file INSTALL or INSTALL.fr in the package to know how to install it. It is VERY different from previous release (and hopefully a lot easier). == A i586 rpm package and source package are now available. Those packages have been compiled on a Mandrake 10.0 system with a Pentium II processor. They are available on the Sourceforge Project Filelist: http://sourceforge.net/project/showfiles.php?group_id=32758 I'd like to have reports from Mandrake users (and other RPM based distro) about their success (failure?) to use it. Benoit PAPILLAULT Liste de diffusion modem ALCATEL SpeedTouch USB Pour se désinscrire : mailto:[EMAIL PROTECTED] -- Attached file included as plaintext by Listar -- -- File: speedtouch_fix_pppd_pid.patch diff -ru speedtouch-1.3/src/speedtouch-stop.in speedtouch.new2/src/speedtouch-stop.in --- speedtouch-1.3/src/speedtouch-stop.in 2004-06-10 18:36:35.0 +0200 +++ speedtouch.new2/src/speedtouch-stop.in 2004-06-20 13:04:42.241448448 +0200 @@ -32,8 +32,10 @@ fi -PID=`head -1 /var/run/ppp-${PPPD_PEER}.pid` -kill -TERM $PID +if [ -f /var/run/ppp0.pid ]; then +PID=`head -1 /var/run/ppp0.pid` +kill -TERM $PID +fi # like we said in speedtouch-start, we don't ever kill modem_run # killall modem_run -- Attached file included as plaintext by Listar -- -- File: speedtouch_clean_mutex.patch diff -ru speedtouch-1.3/src/speedtouch-start.in speedtouch-1.3.new/src/speedtouch-start.in --- speedtouch-1.3/src/speedtouch-start.in 2004-06-10 18:36:35.0 +0200 +++ speedtouch-1.3.new/src/speedtouch-start.in 2004-06-20 12:30:16.679461600 +0200 @@ -18,6 +18,12 @@ exit -1 fi +# cleaning the mutex +ipcs -a | grep 0xdeadbeef /dev/null 21 +if [ $? = 0 ]; then + ipcrm -S 0xdeadbeef +fi + echo Starting ADSL connection... # load usbcore if needed -- Attached file included as plaintext by Listar -- -- File: speedtouch_check_firmware_load.patch diff -ru speedtouch-1.3.new/src/speedtouch-start.in
[speedtouch] Re: New driver version 1.3: ANNOUNCEMENT + New FC2
Hi Frédéric! RUAUDEL Frédéric a écrit : Hi all, Following some problems with my ADSL connection, I installed the new drivers 1.3 on my FC2. I found a great improvement with this version, so thanks Benoit ! :) After that, I updated my RPM of speedtouch to version 1.3 and take advantage of the new improvements. * Sun Jun 20 2004 Frederic RUAUDEL [EMAIL PROTECTED] 1.3-2.GrumZ - Patch the speedtouch-start script to clean the mutex created by modem_run and to skip running modem_run if the firmware is already loaded - Patch the location of pppd pid in speedtouch-stop - Remove the startadsl.sh script - Modify the adsl init script to use speedtouch-start/speedtouch-stop - Add the configuration file speedtouch.conf with the good values - Remove the creation of /etc/speedtouch.conf in %post section - Modify the configure line in the %build section to set the good default path to avoid having the buildroot set in the speedtouch-(start|stop) script As you can see, I've had to patch the start/stop script to make it works smoothly on my FC2. Here are the details : 1) speedtouch_clean_mutex.patch This patch fix a problem with the new mutex system of modem_run. When you stop modem_run, the mutex is not cleaned so when you try to start it up again, modem_run just print in /var/log/messages : You undo my change in a way. The mutex is designed to be kept in memory forever (you can remove it if the modem is unplugged, but this currently lead to some race conditions, so it's never removed). If you remove it, speedtouch-start will not work properly (if your stop the connection with speedtouch-stop and start it again using speedtouch-start, the mutex prevents modem_run from loading the firmware again). modem_run version 1.3 started by root uid 0 and then stop without any clue ! After looking at the code I found that it was the mutex deadbeef ;-) So I had an ipcrm in the speedtouch-start script but this is a dirty hack and I think, if this is a bug and not a feature, that benoit will certainly find a better solution :) What is important is the exit code from modem_run, 0 indicates that the line is OK and -1 indicates that there is some problem. 2) speedtouch_check_firmware_load.patch this patch check the state of the ADSL line present in the file /proc/net/atm/speedtch*, and if the line is reported up and the firmware loaded, it skip the launch of modem_run and directly launch pppd instead of failing the load of the firmware and quit. Redundant with the modem_run's mutex. 3) speedtouch_fix_pppd_pid.patch the last one is probably FC2 specific or maybe a missing configuration in my pppd package, but my pppd put its PID in /var/run/ppp0.pid and not in /var/run/ppp-${PPPD_PEER}.pid. So I made this patch to make it work with my current RPMS. Feel free to tell me where I'm wrong, if I am. Two pid files are generated by pppd: /var/run/pppN.pid /var/run/ppp-${PPPD_PEER}.pid [only if you use the link option in your peer file). The later is easier to locate if you have multiple PPP connections at the same time. For other changes, I remove my startadsl.sh script and use the speedtouch-(start|stop) instead and generate a good default speedtouch.conf for the firmware that I provide with my package. The hotplug support works very well for me, another great feature added in 1.3 (I know it's not new, but I never manage to configure it manually ;). Yes. The hotplug is really a nice feature :-) I impressed some of my friends... since it's not possible to have such feature under Windows (for instance). And I added a friendly interface to my RPMs repository with a summary of the things to do to installed my RPMS : http://grumz.dyndns.org/ADSL_FC2 Comments and feedback are welcome ! Have a nice day, Fred Benoit PAPILLAULT Liste de diffusion modem ALCATEL SpeedTouch USB Pour se désinscrire : mailto:[EMAIL PROTECTED]
[speedtouch] Re: New driver version 1.3: ANNOUNCEMENT + New FC2
Thanks for your feedback. Benoit PAPILLAULT wrote: Hi Frédéric! RUAUDEL Frédéric a écrit : *snip* 1) speedtouch_clean_mutex.patch This patch fix a problem with the new mutex system of modem_run. When you stop modem_run, the mutex is not cleaned so when you try to start it up again, modem_run just print in /var/log/messages : You undo my change in a way. The mutex is designed to be kept in memory forever (you can remove it if the modem is unplugged, but this currently lead to some race conditions, so it's never removed). If you remove it, speedtouch-start will not work properly (if your stop the connection with speedtouch-stop and start it again using speedtouch-start, the mutex prevents modem_run from loading the firmware again). So, it's a feature ;-) Maybe it could be helpful to had a message indicating that modem_run found that the firmware was already loaded and skip its work. After reflexion, I maybe found this solution following a false problem, because my first RPM have replaced my peer file so my login wasn't set and the connection failed. As I didn't notice that first, maybe I was disturbed by this behavior. If I have time, I will try to investigate on this problem to see if it was a false issue or not. But my solution works thanks to the redundant patch :) modem_run version 1.3 started by root uid 0 and then stop without any clue ! After looking at the code I found that it was the mutex deadbeef ;-) So I had an ipcrm in the speedtouch-start script but this is a dirty hack and I think, if this is a bug and not a feature, that benoit will certainly find a better solution :) What is important is the exit code from modem_run, 0 indicates that the line is OK and -1 indicates that there is some problem. 2) speedtouch_check_firmware_load.patch this patch check the state of the ADSL line present in the file /proc/net/atm/speedtch*, and if the line is reported up and the firmware loaded, it skip the launch of modem_run and directly launch pppd instead of failing the load of the firmware and quit. Redundant with the modem_run's mutex. 3) speedtouch_fix_pppd_pid.patch the last one is probably FC2 specific or maybe a missing configuration in my pppd package, but my pppd put its PID in /var/run/ppp0.pid and not in /var/run/ppp-${PPPD_PEER}.pid. So I made this patch to make it work with my current RPMS. Feel free to tell me where I'm wrong, if I am. Two pid files are generated by pppd: /var/run/pppN.pid /var/run/ppp-${PPPD_PEER}.pid [only if you use the link option in your peer file). The later is easier to locate if you have multiple PPP connections at the same time. I didn't know this link option that's why I made this patch, but I was conscious of the problem with multiple PPP connections. So you just had to put 'link' alone on a new line in the peer file to make it works ? If its the case I will fix my RPM ASAP. *snip* Benoit PAPILLAULT Liste de diffusion modem ALCATEL SpeedTouch USB Pour se désinscrire : mailto:[EMAIL PROTECTED] Fred Liste de diffusion modem ALCATEL SpeedTouch USB Pour se désinscrire : mailto:[EMAIL PROTECTED]
[speedtouch] Re: New driver version 1.3: ANNOUNCEMENT + New FC2
Selon RUAUDEL Frédéric [EMAIL PROTECTED]: snip 3) speedtouch_fix_pppd_pid.patch the last one is probably FC2 specific or maybe a missing configuration in my pppd package, but my pppd put its PID in /var/run/ppp0.pid and not in /var/run/ppp-${PPPD_PEER}.pid. So I made this patch to make it work with my current RPMS. Feel free to tell me where I'm wrong, if I am. Two pid files are generated by pppd: /var/run/pppN.pid /var/run/ppp-${PPPD_PEER}.pid [only if you use the link option in your peer file). The later is easier to locate if you have multiple PPP connections at the same time. I didn't know this link option that's why I made this patch, but I was conscious of the problem with multiple PPP connections. So you just had to put 'link' alone on a new line in the peer file to make it works ? If its the case I will fix my RPM ASAP. This is linkname myname It will create /var/run/ppp-myname.pid Gilles Liste de diffusion modem ALCATEL SpeedTouch USB Pour se désinscrire : mailto:[EMAIL PROTECTED]
[speedtouch] Re: New driver version 1.3: ANNOUNCEMENT + New FC2
*snip* This is linkname myname It will create /var/run/ppp-myname.pid Ok thanks ! I will fix this in my RPM and discard the patch Gilles Liste de diffusion modem ALCATEL SpeedTouch USB Pour se désinscrire : mailto:[EMAIL PROTECTED] Liste de diffusion modem ALCATEL SpeedTouch USB Pour se désinscrire : mailto:[EMAIL PROTECTED]