├── b └── drivers │ ├── Makefile.orig │ ├── kernel-ver.c.orig │ ├── kernel-ver.c.rej │ └── Makefile.rej ├── debian ├── compat ├── sl-modem-dkms.docs ├── source │ └── format ├── sl-modem-daemon.manpages ├── sl-modem-daemon.bug-control ├── po │ ├── POTFILES.in │ ├── templates.pot │ ├── id.po │ ├── fi.po │ ├── sk.po │ ├── vi.po │ ├── tr.po │ ├── nl.po │ ├── it.po │ ├── pt.po │ ├── ar.po │ ├── fr.po │ ├── gl.po │ ├── eu.po │ ├── pl.po │ ├── pt_BR.po │ ├── da.po │ ├── ru.po │ ├── de.po │ ├── ja.po │ ├── cs.po │ ├── sv.po │ └── es.po ├── watch ├── sl-modem-source.prerm ├── sl-modem-daemon.install ├── sl-modem-source.lintian-overrides ├── sl-modem-daemon.rules ├── sl-modem-daemon.postrm ├── setcountries.pl ├── sl-modem-daemon.prerm ├── patches │ ├── series │ ├── use_CPPFLAGS.diff │ ├── 11_logfile.diff │ ├── arch64.diff │ ├── support_multiarch.diff │ ├── remove__devinitdata.diff │ ├── debug_level.diff │ ├── support_linux3.diff │ ├── fix_perms.diff │ ├── clean_LFLAGS.diff │ ├── autoload.diff │ ├── modem_group.diff │ ├── 12_ulimit_warn.diff │ ├── 10_drop_privileges.diff │ ├── device_create_changes.diff │ └── 01_Makefile.diff ├── 15sl-modem-daemon ├── sl-modem-daemon.config ├── sl-modem-daemon.preinst ├── sl-modem-daemon.lintian-overrides ├── sl-modem-daemon.templates ├── NEWS ├── sl-modem-daemon.sl-modem.modprobe ├── sl-modem-dkms.dkms ├── sl-modem-dkms.postinst ├── sl-modem-daemon.default ├── rules ├── sl-modem-daemon.README.Debian ├── slmodemd.8 ├── sl-modem-daemon.postinst ├── README.Debian ├── sl-modem-daemon.bug-script ├── source_sl-modem.py ├── copyright └── control ├── drivers ├── Module.markers ├── Module.symvers ├── Modules.symvers ├── amrlibs.o ├── modules.order ├── makefile.0 ├── kernel-ver.c ├── Makefile.orig └── Makefile ├── modem ├── dsplibs.o ├── Makefile ├── Makefile.20080401 ├── modem_timer.h ├── modem_dp.h ├── sysdep_common.c ├── modem_debug.h ├── modem_datafile.c ├── dp_sinus.c ├── modem_homolog.h ├── dp_dummy.c ├── modem_debug.c └── modem_timer.c ├── faxing ├── xtel.diff ├── smartlink.pdf ├── wvdial.conf ├── modem ├── modem.sh ├── xtel.lignes └── 1stRead.txt ├── patches ├── marv.txt ├── sldiffs-20090222 │ ├── Readme.txt │ ├── 03_Makefile_2.6.12.4.diff │ ├── 05_st7554_license.diff │ ├── kernel-ver.diff │ ├── 02_dial_string_size.diff │ ├── fortify_source.diff │ ├── class_device.diff │ ├── README.diff │ └── 06_slmodem-class-simple-to-class-meins.diff ├── no_slusb.txt ├── no_slusb.patch ├── slmodem-2.9.11-20090222.patch ├── slmodem-usb-2.6.16.patch ├── semaphore2011.diff ├── 2.6.33.diff ├── ioctl.diff ├── zello.txt ├── marv.diff ├── modem_20100303.patch └── zello.diff ├── scripts ├── suse │ ├── slmodemd.conf │ └── slmodemd.SUSE ├── slackware │ ├── README │ └── rc.slmodemd ├── slmodemd ├── mandrake │ └── slmodemd ├── debian │ └── slmodemd └── slmodemd.ubuntu.italy ├── Makefile ├── COPYING ├── Documentation ├── ALSA_support.txt └── x86_64.txt └── Changes /b/drivers/Makefile.orig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /drivers/Module.markers: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /drivers/Module.symvers: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /drivers/Modules.symvers: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /b/drivers/kernel-ver.c.orig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /debian/sl-modem-dkms.docs: -------------------------------------------------------------------------------- 1 | README 2 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.manpages: -------------------------------------------------------------------------------- 1 | debian/slmodemd.8 2 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.bug-control: -------------------------------------------------------------------------------- 1 | package-status: sl-modem-dkms 2 | -------------------------------------------------------------------------------- /debian/po/POTFILES.in: -------------------------------------------------------------------------------- 1 | [type: gettext/rfc822deb] sl-modem-daemon.templates 2 | -------------------------------------------------------------------------------- /modem/dsplibs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggewie/pkg-sl-modem/HEAD/modem/dsplibs.o -------------------------------------------------------------------------------- /drivers/amrlibs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggewie/pkg-sl-modem/HEAD/drivers/amrlibs.o -------------------------------------------------------------------------------- /drivers/modules.order: -------------------------------------------------------------------------------- 1 | kernel//usr/src/pkg/smart/slmodem-2.9.11-20100718/drivers/slamr.ko 2 | -------------------------------------------------------------------------------- /faxing/xtel.diff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggewie/pkg-sl-modem/HEAD/faxing/xtel.diff -------------------------------------------------------------------------------- /faxing/smartlink.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggewie/pkg-sl-modem/HEAD/faxing/smartlink.pdf -------------------------------------------------------------------------------- /drivers/makefile.0: -------------------------------------------------------------------------------- 1 | all: 2 | @echo " finished all:" 3 | @echo DEST=${DESTDIR} 4 | @echo RM=${RM} 5 | @echo module-dir=${module-dir} 6 | -------------------------------------------------------------------------------- /debian/watch: -------------------------------------------------------------------------------- 1 | version=3 2 | 3 | opts="uversionmangle=s/-/~/" \ 4 | http://linmodems.technion.ac.il/packages/smartlink/slmodem-([\d.-]+)\.tar\.gz 5 | -------------------------------------------------------------------------------- /debian/sl-modem-source.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # dummy empty prerm script to fix upgrade failures from squeeze 5 | # see #707821 6 | 7 | #DEBHELPER# 8 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.install: -------------------------------------------------------------------------------- 1 | modem/slmodemd usr/sbin/ 2 | debian/15sl-modem-daemon usr/lib/pm-utils/sleep.d/ 3 | debian/source_sl-modem.py usr/share/apport/package-hooks/ 4 | -------------------------------------------------------------------------------- /debian/sl-modem-source.lintian-overrides: -------------------------------------------------------------------------------- 1 | # sl-modem-source's prerm script is a dummy empty script to fix upgrade 2 | # failures from squeeze see #707821 3 | sl-modem-source: maintainer-script-empty prerm 4 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.rules: -------------------------------------------------------------------------------- 1 | # start/stop the daemon when the USB modem is connected 2 | # 3 | # this file does not need to be executable 4 | 5 | KERNEL=="slusb[0-9]*", GROUP="dialout", RUN+="/etc/init.d/sl-modem-daemon" 6 | -------------------------------------------------------------------------------- /patches/marv.txt: -------------------------------------------------------------------------------- 1 | Removes recogntion for a few cards which slamr failed to support, 2 | retaining Zello's proven support for the chipset Motorola 1057:3052 3 | and adding test support for the chipset Silicon Instru. 1543:3052 4 | 5 | Marv Stodolsky 2008-04-01 6 | -------------------------------------------------------------------------------- /scripts/suse/slmodemd.conf: -------------------------------------------------------------------------------- 1 | #/etc/sysconfig/slmodemd 2 | #modem device, default /dev/slamr0, 3 | #for USB take /dev/slusb0 for example 4 | SLMODEMD_DEVICE=/dev/slamr0 5 | 6 | #Your country, try "slmodemd --countrylist" 7 | SLMODEMD_COUNTRY=GERMANY 8 | 9 | 10 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | case "$1" in 5 | purge) 6 | update-rc.d -f sl-modem-daemon remove > /dev/null 2>&1 7 | # Remove log directory 8 | rm -rf /var/log/slmodemd 9 | ;; 10 | esac 11 | 12 | #DEBHELPER# 13 | 14 | exit 0 15 | -------------------------------------------------------------------------------- /debian/setcountries.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | chomp( $list=`modem/slmodemd --countrylist 2>&1`); 4 | $list =~s/\w+: //g; 5 | $list =~s/\n/, /g; 6 | open(t, "+<".$ARGV[0]); 7 | @cont=; 8 | seek(t,0,0); 9 | for(@cont) { 10 | $_=~s/_list_/$list/; 11 | print t $_; 12 | } 13 | close(t); 14 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | if [ -x "/etc/init.d/sl-modem-daemon" ]; then 4 | if which invoke-rc.d > /dev/null; then 5 | invoke-rc.d sl-modem-daemon stop || true 6 | else 7 | /etc/init.d/sl-modem-daemon stop || true 8 | fi 9 | fi 10 | 11 | case "$1" in 12 | remove) 13 | rm -rf /var/lib/slmodem 14 | ;; 15 | esac 16 | #DEBHELPER# 17 | -------------------------------------------------------------------------------- /faxing/wvdial.conf: -------------------------------------------------------------------------------- 1 | 2 | [Dialer Defaults] 3 | Init1 = ATZ 4 | Init2 = ATQ0 M0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 5 | Dial Command = "ATDT" 6 | Modem Type = Analog Modem 7 | ISDN = 0 8 | New PPPD = yes 9 | Carrier Check = no 10 | Modem = /dev/ttySL0 11 | Phone = 0123456789 12 | Username = 13 | Password = 14 | ;Baud = 460800 15 | ;Baud = 115200 16 | Baud = 57600 17 | -------------------------------------------------------------------------------- /patches/sldiffs-20090222/Readme.txt: -------------------------------------------------------------------------------- 1 | 2 | These patches were provided by Ahmed El-Mahmoudy 3 | , applied in the order: 4 | 5 | 02_dial_string_size.diff 6 | 03_Makefile_2.6.12.4.diff 7 | 05_st7554_license.diff 8 | 06_slmodem-class-simple-to-class-meins.diff 9 | kernel-ver.diff 10 | README.diff 11 | class_device.diff 12 | fortify_source.diff 13 | -------------------------------------------------------------------------------- /debian/patches/series: -------------------------------------------------------------------------------- 1 | 01_Makefile.diff 2 | modem_group.diff 3 | 08_ungrab_winmodem.diff 4 | 10_drop_privileges.diff 5 | 11_logfile.diff 6 | debug_level.diff 7 | 12_ulimit_warn.diff 8 | autoload.diff 9 | support_multiarch.diff 10 | clean_LFLAGS.diff 11 | support_linux3.diff 12 | device_create_changes.diff 13 | arch64.diff 14 | use_CPPFLAGS.diff 15 | remove__devinitdata.diff 16 | fix_perms.diff 17 | -------------------------------------------------------------------------------- /debian/15sl-modem-daemon: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Based on patches submitted by: Julien Valroff 3 | # & "Tim Dijkstra \(tdykstra\)" 4 | 5 | . /usr/lib/pm-utils/functions 6 | 7 | case "$1" in 8 | thaw|resume) 9 | invoke-rc.d sl-modem-daemon start 10 | ;; 11 | hibernate|suspend) 12 | invoke-rc.d sl-modem-daemon stop 13 | ;; 14 | *) 15 | ;; 16 | esac 17 | 18 | exit $? 19 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | . /usr/share/debconf/confmodule 5 | 6 | test -r /etc/default/sl-modem-daemon && . /etc/default/sl-modem-daemon 7 | 8 | if test -n "$SLMODEMD_COUNTRY" && test -n "$DEBCONF_RECONFIGURE"; then 9 | #set the default if the old config file exists 10 | db_set sl-modem-daemon/country "$SLMODEMD_COUNTRY" || true 11 | fi 12 | 13 | db_input medium sl-modem-daemon/country || true 14 | db_go 15 | 16 | -------------------------------------------------------------------------------- /debian/patches/use_CPPFLAGS.diff: -------------------------------------------------------------------------------- 1 | Description: Use CPPFLAGS for building slmodemd 2 | Author: أحمد المحمودي (Ahmed El-Mahmoudy) 3 | --- a/modem/Makefile 4 | +++ b/modem/Makefile 5 | @@ -62,7 +62,7 @@ 6 | # 7 | 8 | %.o: %.c .build_profile 9 | - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -o $@ -c $< 10 | + $(CC) $(CFLAGS) $(CPPFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -o $@ -c $< 11 | 12 | dep: generic-dep 13 | generic-dep: 14 | -------------------------------------------------------------------------------- /b/drivers/kernel-ver.c.rej: -------------------------------------------------------------------------------- 1 | --- a/drivers/kernel-ver.c 2 | +++ b/drivers/kernel-ver.c 3 | @@ -5,9 +5,13 @@ 4 | 5 | #include 6 | #include 7 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) 8 | +#include 9 | +#else 10 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) 11 | #include 12 | -#endif 13 | +#endif // KERNEL_VERSION(2,6,18) 14 | +#endif // KERNEL_VERSION(2,6,33) 15 | 16 | int main() 17 | { 18 | -------------------------------------------------------------------------------- /patches/no_slusb.txt: -------------------------------------------------------------------------------- 1 | Blocks compilation of slusb.ko for kernels after 2.6.24 2 | Otherwise a resultant Proprietary License related error would block 3 | compilation of slamr.ko and slmodemd 4 | Thanks to: 5 | Gustavo Fernando Padovan 6 | Engenharia de Computação 2006 7 | LAS - Laboratório de Administração e Segurança de Sistemas 8 | Instituto de Computação - UNICAMP 9 | and Jacques Goldberg, for contributing: 10 | AGE=$(shell if [ "$(SUBLEVEL)" -gt 24 ] ;then echo NEW;fi) 11 | 6/25/2008 12 | -------------------------------------------------------------------------------- /b/drivers/Makefile.rej: -------------------------------------------------------------------------------- 1 | --- a/drivers/Makefile 2 | +++ b/drivers/Makefile 3 | @@ -82,7 +82,7 @@ 4 | $(RM) ${DESTDIR}/dev/slusb$(minor) ; ) echo -n 5 | 6 | else 7 | -ifeq ($(shell grep 'UTS.*"2\.6' $(KERNEL_DIR)/include/linux/utsrelease.h $(KERNEL_DIR)/include/linux/version.h 2>/dev/null),) 8 | +ifeq ($(shell grep 'UTS.*"2\.6' $(KERNEL_DIR)/include/generated/utsrelease.h $(KERNEL_DIR)/include/linux/utsrelease.h $(KERNEL_DIR)/include/linux/version.h 2>/dev/null),) 9 | 10 | slusb-objs:= old_st7554.o 11 | obj:=. 12 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.preinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | if [ "$1" = install ] || [ "$1" = upgrade ]; then 6 | if [ -e "/etc/modprobe.d/sl-modem-daemon.modutils" ]; then 7 | if [ "`md5sum \"/etc/modprobe.d/sl-modem-daemon.modutils\" | sed -e \"s/ .*//\"`" = \ 8 | "`dpkg-query -W -f='${Conffiles}' sl-modem-daemon | sed -n -e \"\\\\' /etc/modprobe.d/sl-modem-daemon.modutils's/.* //p\"`" ] 9 | then 10 | rm -f "/etc/modprobe.d/sl-modem-daemon.modutils" 11 | fi 12 | fi 13 | fi 14 | 15 | #DEBHELPER# 16 | -------------------------------------------------------------------------------- /drivers/kernel-ver.c: -------------------------------------------------------------------------------- 1 | /* 2 | * kernel-ver.c - prints Linux kernel version to stdout and exit. 3 | * 4 | */ 5 | 6 | #include 7 | #include 8 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) 9 | #include 10 | #else 11 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) 12 | #include 13 | #endif // KERNEL_VERSION(2,6,18) 14 | #endif // KERNEL_VERSION(2,6,33) 15 | 16 | int main() 17 | { 18 | printf ("%s\n",UTS_RELEASE); 19 | return 0; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.lintian-overrides: -------------------------------------------------------------------------------- 1 | # The spelling errors are in the upstream binary blob modem/dsplibs.o, which 2 | # cannot be fixed as the original author of this binary blob (Smart Link) 3 | # stopped supporting the software. 4 | sl-modem-daemon: spelling-error-in-binary usr/sbin/slmodemd Recieved Received 5 | sl-modem-daemon: spelling-error-in-binary usr/sbin/slmodemd posible possible 6 | sl-modem-daemon: spelling-error-in-binary usr/sbin/slmodemd choosen chosen 7 | sl-modem-daemon: spelling-error-in-binary usr/sbin/slmodemd treshold threshold 8 | -------------------------------------------------------------------------------- /debian/patches/11_logfile.diff: -------------------------------------------------------------------------------- 1 | Place debug log in /var/log/slmodem.log. 2 | Credit to: Damien BRUCKER 3 | --- sl-modem-2.9.10+2.9.9d+e-pre2.orig/modem/modem_debug.c 4 | +++ sl-modem-2.9.10+2.9.9d+e-pre2/modem/modem_debug.c 5 | @@ -61,7 +61,7 @@ 6 | unsigned int modem_debug_logging; 7 | unsigned int dsplibs_debug_level; 8 | 9 | -static const char *modem_debug_logfile = "slmodem.log"; 10 | +static const char *modem_debug_logfile = "/var/log/slmodemd/slmodem.log"; 11 | 12 | static int modem_log_fd; 13 | 14 | -------------------------------------------------------------------------------- /debian/patches/arch64.diff: -------------------------------------------------------------------------------- 1 | Description: Better arch detection logic 2 | Author: أحمد المحمودي (Ahmed El-Mahmoudy) 3 | Bug-Debian: http://bugs.debian.org/651780 4 | Forwarded: yes 5 | --- a/drivers/Makefile 6 | +++ b/drivers/Makefile 7 | @@ -28,7 +28,11 @@ 8 | 9 | EXTRA_CFLAGS = -I$(obj) -I$(obj)/../modem $(FOUND_CLASS_SIMPLE) 10 | 11 | +ifdef CONFIG_X86_32 12 | +ARCH64:=0 13 | +else 14 | ARCH64:=$(shell uname -m | sed -e '/amd64/s//x86_64/' | grep -c x86_64) 15 | +endif 16 | 17 | ifeq ($(ARCH64), 0) 18 | obj-m:= slamr.o 19 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.templates: -------------------------------------------------------------------------------- 1 | Template: sl-modem-daemon/country 2 | Type: select 3 | Choices: _list_ 4 | _Default: USA [ Enter the country (in uppercase and in English) where your language is mostly spoken, for example FRANCE for French ] 5 | # Translators: Enter the country (in uppercase and in English) where your 6 | # language is mostly spoken, for example FRANCE for French or GERMANY for 7 | # German 8 | _Description: Location of the modem: 9 | Indicate the country in which your modem is located. Please select the 10 | telephone system used in your country. 11 | -------------------------------------------------------------------------------- /patches/no_slusb.patch: -------------------------------------------------------------------------------- 1 | diff --git a/drivers/Makefile b/drivers/Makefile 2 | --- a/drivers/Makefile 3 | +++ b/drivers/Makefile 4 | @@ -22,9 +22,13 @@ EXTRA_CFLAGS = -I$(obj) -I$(obj)/../modem 5 | 6 | ARCH64:=$(shell uname -m | sed -e '/amd64/s//x86_64/' | grep -c x86_64) 7 | 8 | +SUBLEVEL=$(shell uname -r | cut -d. -f3 | cut -d. -f1 | cut -d- -f1) 9 | +AGE=$(shell if [ "$(SUBLEVEL)" -gt 24 ] ;then echo NEW;fi) 10 | +JP=$(shell echo $(AGE)) 11 | ifeq ($(ARCH64), 0) 12 | -obj-m:= slamr.o slusb.o 13 | -else 14 | +obj-m:= slarm.o 15 | +endif 16 | +ifneq ($(AGE),NEW) 17 | 18 | -------------------------------------------------------------------------------- /debian/patches/support_multiarch.diff: -------------------------------------------------------------------------------- 1 | Description: Support multiarch include dirs 2 | libc6 moved arch dependent headers to multiarch include directory 3 | Author: أحمد المحمودي (Ahmed El-Mahmoudy) 4 | --- a/modem/Makefile 5 | +++ b/modem/Makefile 6 | @@ -24,7 +24,7 @@ 7 | 8 | RM:= rm -f 9 | 10 | -CFLAGS+= -Wall -g -O -I. -DCONFIG_DEBUG_MODEM 11 | +CFLAGS+= -Wall -g -O -I. -DCONFIG_DEBUG_MODEM -I/usr/include/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH) 12 | 13 | modem-objs:= \ 14 | modem.o modem_datafile.o modem_at.o modem_timer.o \ 15 | -------------------------------------------------------------------------------- /debian/NEWS: -------------------------------------------------------------------------------- 1 | sl-modem (2.9.11~20090222-1) unstable; urgency=low 2 | 3 | Starting with this version, module-assistant support has been removed. 4 | Building of slamr and slusb modules can either be done automatically using 5 | DKMS, or done manually. 6 | 7 | Also slamr and slusb devices nodes are not created during package install. 8 | They are created automatically when the respective module is loaded. Yet 9 | this works only for one modem on the machine. 10 | 11 | -- أحمد المحمودي (Ahmed El-Mahmoudy) Sun, 19 Jul 2009 17:25:48 +0300 12 | 13 | -------------------------------------------------------------------------------- /scripts/slackware/README: -------------------------------------------------------------------------------- 1 | INSTALLATION 2 | ============= 3 | 4 | Copy rc.slmodemd to /etc/rc.d/ directory. If you want to be started 5 | during boot, append to /etc/rc.d/rc.local line: "/etc/rc.d/rc.slmodemd start" or simply "rc.slmodemd start". 6 | 7 | If you want to customize it, or to direct it to the right device, edit SLMODEMD_DEVICE. 8 | 9 | Script will exec file assuming default location (/usr/sbin/slmodem), so if you placed it somewhere else, 10 | please correct it in rc.slmodemd. 11 | 12 | For problems or something else, please mail me at: 13 | 14 | Sanel Zukan 15 | -------------------------------------------------------------------------------- /patches/slmodem-2.9.11-20090222.patch: -------------------------------------------------------------------------------- 1 | diff -upPr slmodem-2.9.11-20090222-orig/drivers/amrmo_init.c slmodem-2.9.11-20090222/drivers/amrmo_init.c 2 | --- slmodem-2.9.11-20090222-orig/drivers/amrmo_init.c 2008-04-01 13:08:42.000000000 +1100 3 | +++ slmodem-2.9.11-20090222/drivers/amrmo_init.c 2010-01-07 02:14:23.000000000 +1100 4 | @@ -62,6 +62,9 @@ 5 | #include 6 | #include 7 | #include 8 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) 9 | +#include 10 | +#endif 11 | 12 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) 13 | #define OLD_KERNEL 1 14 | -------------------------------------------------------------------------------- /patches/slmodem-usb-2.6.16.patch: -------------------------------------------------------------------------------- 1 | diff -ru slmodem-2.9.11-20051101/drivers/st7554.c slmodem-2.9.11-20051101-new/drivers/st7554.c 2 | --- slmodem-2.9.11-20051101/drivers/st7554.c 2005-11-01 17:31:45.000000000 +0200 3 | +++ slmodem-2.9.11-20051101-new/drivers/st7554.c 2006-01-31 04:08:45.000000000 +0200 4 | @@ -1150,7 +1150,9 @@ 5 | MODULE_DEVICE_TABLE (usb, st7554_ids); 6 | 7 | static struct usb_driver st7554_usb_driver = { 8 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) 9 | .owner = THIS_MODULE, 10 | +#endif 11 | .name = "ST7554 USB Modem", 12 | .probe = st7554_probe, 13 | .disconnect = st7554_disconnect, 14 | 15 | -------------------------------------------------------------------------------- /debian/patches/remove__devinitdata.diff: -------------------------------------------------------------------------------- 1 | Description: Remove __devinitdata, as it is no longer needed, and it causes 2 | build failures on 3.8.x kernels 3 | Author: Marvin Stodolsky 4 | --- a/drivers/amrmo_init.c 5 | +++ b/drivers/amrmo_init.c 6 | @@ -247,7 +247,7 @@ 7 | }; 8 | 9 | 10 | -static struct pci_device_id amrmo_pci_tbl [] __devinitdata = { 11 | +static struct pci_device_id amrmo_pci_tbl [] = { 12 | {PCI_VENDOR_ID_SILICON, PCI_DEVICE_ID_SL1900, /* SiliconInstr SL1543:3052 */ 13 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, SL1543_CARD}, 14 | {PCI_VENDOR_ID_MOTOROLA, PCI_DEVICE_ID_SL1900, /* Motorola 1057:3052 */ 15 | -------------------------------------------------------------------------------- /patches/sldiffs-20090222/03_Makefile_2.6.12.4.diff: -------------------------------------------------------------------------------- 1 | Workaround in drivers/Makefile for a kernel 2.4 check accidentialy matching 2.6.12.4. 2 | Index: slmodem-2.9.11-20080817/drivers/Makefile 3 | =================================================================== 4 | --- slmodem-2.9.11-20080817.orig/drivers/Makefile 2008-09-17 15:15:36.000000000 +0200 5 | +++ slmodem-2.9.11-20080817/drivers/Makefile 2008-09-17 15:17:56.000000000 +0200 6 | @@ -76,7 +76,7 @@ 7 | $(RM) ${DESTDIR}/dev/slusb$(minor) ; ) echo -n 8 | 9 | else 10 | -ifeq ($(findstring 2.4,$(KERNEL_VER)),2.4) 11 | +ifeq ($(shell grep 'UTS.*"2\.6' $(KERNEL_DIR)/include/linux/version.h),) 12 | 13 | slusb-objs:= old_st7554.o 14 | obj:=. 15 | -------------------------------------------------------------------------------- /patches/sldiffs-20090222/05_st7554_license.diff: -------------------------------------------------------------------------------- 1 | Changed the MODULE_LICENSE string to "Dual BSD/GPL" since the license is 2 | actually a BSD license clone. 3 | Index: slmodem-2.9.11-20080817/drivers/st7554.c 4 | =================================================================== 5 | --- slmodem-2.9.11-20080817.orig/drivers/st7554.c 2008-04-18 04:56:46.000000000 +0200 6 | +++ slmodem-2.9.11-20080817/drivers/st7554.c 2008-09-17 15:18:14.000000000 +0200 7 | @@ -1414,5 +1414,6 @@ 8 | 9 | MODULE_AUTHOR("Smart Link Ltd."); 10 | MODULE_DESCRIPTION("ST7554 USB Smart Link Soft Modem driver."); 11 | -MODULE_LICENSE("Smart Link Ltd."); 12 | +//MODULE_LICENSE("Smart Link Ltd."); 13 | +MODULE_LICENSE("Dual BSD/GPL"); 14 | 15 | -------------------------------------------------------------------------------- /debian/patches/debug_level.diff: -------------------------------------------------------------------------------- 1 | Debug log file is not for end users. Users shall use -l . 2 | By: Eduard Bloch 3 | --- sl-modem-2.9.9d+e-pre2.orig/modem/modem_debug.c 2008-09-17 10:43:09.000000000 +0200 4 | +++ sl-modem-2.9.9d+e-pre2/modem/modem_debug.c 2008-09-17 10:18:39.000000000 +0200 5 | @@ -57,9 +57,9 @@ 6 | #include 7 | #include 8 | 9 | -unsigned int modem_debug_level; 10 | -unsigned int modem_debug_logging; 11 | -unsigned int dsplibs_debug_level; 12 | +unsigned int modem_debug_level=0; 13 | +unsigned int modem_debug_logging=0; 14 | +unsigned int dsplibs_debug_level=0; 15 | 16 | static const char *modem_debug_logfile = "/var/log/slmodemd/slmodem.log"; 17 | 18 | -------------------------------------------------------------------------------- /patches/sldiffs-20090222/kernel-ver.diff: -------------------------------------------------------------------------------- 1 | Workaround for pre-2.6.18 kernels. 2 | Index: slmodem-2.9.11-20080817/drivers/Makefile 3 | =================================================================== 4 | --- slmodem-2.9.11-20080817.orig/drivers/Makefile 2008-09-18 05:35:21.000000000 +0200 5 | +++ slmodem-2.9.11-20080817/drivers/Makefile 2008-09-18 08:35:18.000000000 +0200 6 | @@ -78,7 +78,7 @@ 7 | $(RM) ${DESTDIR}/dev/slusb$(minor) ; ) echo -n 8 | 9 | else 10 | -ifeq ($(shell grep 'UTS.*"2\.6' $(KERNEL_DIR)/include/linux/version.h),) 11 | +ifeq ($(shell grep 'UTS.*"2\.6' $(KERNEL_DIR)/include/linux/utsrelease.h $(KERNEL_DIR)/include/linux/version.h 2>/dev/null),) 12 | 13 | slusb-objs:= old_st7554.o 14 | obj:=. 15 | -------------------------------------------------------------------------------- /debian/patches/support_linux3.diff: -------------------------------------------------------------------------------- 1 | Description: Support for linux 3.x series in build system 2 | Author: أحمد المحمودي (Ahmed El-Mahmoudy) 3 | Bug-Debian: http://bugs.debian.org/641151 4 | --- a/drivers/Makefile 5 | +++ b/drivers/Makefile 6 | @@ -82,7 +82,7 @@ 7 | $(RM) ${DESTDIR}/dev/slusb$(minor) ; ) echo -n 8 | 9 | else 10 | -ifeq ($(shell grep 'UTS.*"2\.6' $(KERNEL_DIR)/include/generated/utsrelease.h $(KERNEL_DIR)/include/linux/utsrelease.h $(KERNEL_DIR)/include/linux/version.h 2>/dev/null),) 11 | +ifeq ($(shell grep 'UTS.*"\(2\.6\|3\)' $(KERNEL_DIR)/include/generated/utsrelease.h $(KERNEL_DIR)/include/linux/utsrelease.h $(KERNEL_DIR)/include/linux/version.h 2>/dev/null),) 12 | 13 | slusb-objs:= old_st7554.o 14 | obj:=. 15 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.sl-modem.modprobe: -------------------------------------------------------------------------------- 1 | install slamr /sbin/modprobe -qb ungrab-winmodem; /sbin/modprobe --ignore-install slamr; test -e /dev/slamr0 && (chmod 660 /dev/slamr0 && chgrp dialout /dev/slamr0) || (/bin/mknod -m 660 /dev/slamr0 c 242 0 2>/dev/null && chgrp dialout /dev/slamr0) 2 | remove slamr /sbin/modprobe --remove --ignore-remove slamr; test -e /dev/slamr0 && /bin/rm -f /dev/slamr0 2>/dev/null 3 | 4 | install slusb /sbin/modprobe -qb ungrab-winmodem; /sbin/modprobe --ignore-install slusb; test -e /dev/slusb0 && (chmod 660 /dev/slusb0 && chgrp dialout /dev/slusb0) || (/bin/mknod -m 660 /dev/slusb0 c 243 0 2>/dev/null && chgrp dialout /dev/slusb0) 5 | remove slusb /sbin/modprobe --remove --ignore-remove slusb; test -e /dev/slusb0 && /bin/rm -f /dev/slusb0 2>/dev/null 6 | -------------------------------------------------------------------------------- /patches/sldiffs-20090222/02_dial_string_size.diff: -------------------------------------------------------------------------------- 1 | Enlarge dial string buffer to 128 bytes. Some dial strings that include calling 2 | card numbers can be longer than the previously allowed 32 characters, causing 3 | them to be truncated. 4 | Index: slmodem-2.9.11-20080817/modem/modem.h 5 | =================================================================== 6 | --- slmodem-2.9.11-20080817.orig/modem/modem.h 2008-03-29 14:04:16.000000000 +0200 7 | +++ slmodem-2.9.11-20080817/modem/modem.h 2008-09-17 15:17:49.000000000 +0200 8 | @@ -301,7 +301,7 @@ 9 | void *cid; 10 | #endif 11 | /* dialer */ 12 | - char dial_string[32]; 13 | + char dial_string[128]; 14 | /* escape counter */ 15 | unsigned escape_count; 16 | unsigned long last_esc_check; 17 | -------------------------------------------------------------------------------- /debian/patches/fix_perms.diff: -------------------------------------------------------------------------------- 1 | Description: Fix permissions in module_param call 2 | Author: أحمد المحمودي (Ahmed El-Mahmoudy) 3 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/1362764 4 | --- a/drivers/amrmo_init.c 5 | +++ b/drivers/amrmo_init.c 6 | @@ -735,7 +735,7 @@ 7 | * module stuff 8 | */ 9 | 10 | -module_param(debug, int, 1); 11 | +module_param(debug, int, S_IXUSR | S_IXGRP | S_IXOTH); 12 | MODULE_PARM_DESC(debug,"debug level: 0-3 (default=0)"); 13 | 14 | MODULE_AUTHOR("Smart Link Ltd."); 15 | --- a/drivers/st7554.c 16 | +++ b/drivers/st7554.c 17 | @@ -76,7 +76,7 @@ 18 | 19 | static int debug = 0; 20 | 21 | -module_param(debug, int, 1); 22 | +module_param(debug, int, S_IXUSR | S_IXGRP | S_IXOTH); 23 | MODULE_PARM_DESC(debug,"Debug level: 0-3 (default=0)"); 24 | 25 | /* st7554 IDs */ 26 | -------------------------------------------------------------------------------- /patches/sldiffs-20090222/fortify_source.diff: -------------------------------------------------------------------------------- 1 | Fix FTBFS with -D_FORTIFY_SOURCE=2 compile flag. 2 | Index: slmodem-2.9.11-20080817/modem/modem_datafile.c 3 | =================================================================== 4 | --- slmodem-2.9.11-20080817.orig/modem/modem_datafile.c 2008-09-21 10:47:22.000000000 +0200 5 | +++ slmodem-2.9.11-20080817/modem/modem_datafile.c 2008-09-21 11:05:13.000000000 +0200 6 | @@ -48,6 +48,8 @@ 7 | #include 8 | #include 9 | #include 10 | +#include 11 | +#include 12 | 13 | #include 14 | #include 15 | @@ -111,7 +113,7 @@ 16 | int ret = -1; 17 | int fd; 18 | 19 | - fd = open(file_name,O_CREAT|O_WRONLY); 20 | + fd = open(file_name,O_CREAT|O_WRONLY,(S_IRUSR|S_IWUSR)); 21 | if(fd < 0) 22 | return -errno; 23 | 24 | -------------------------------------------------------------------------------- /debian/sl-modem-dkms.dkms: -------------------------------------------------------------------------------- 1 | PACKAGE_NAME="sl-modem" 2 | PACKAGE_VERSION="#MODULE_VERSION#" 3 | CLEAN="make -C drivers clean; make -C ungrab-winmodem clean" 4 | BUILT_MODULE_NAME[0]="slusb" 5 | BUILT_MODULE_LOCATION[0]="drivers" 6 | MAKE[0]="cd ${dkms_tree}/sl-modem/#MODULE_VERSION#/build; make -C drivers USB=1 KERNEL_DIR=$kernel_source_dir KERNEL_VER=$kernelver; make -C ungrab-winmodem KERNEL_DIR=$kernel_source_dir KERNEL_VER=$kernelver; cd .." 7 | DEST_MODULE_LOCATION[0]="/kernel/drivers/misc" 8 | BUILT_MODULE_NAME[1]="ungrab-winmodem" 9 | BUILT_MODULE_LOCATION[1]="ungrab-winmodem" 10 | #MAKE[1]="make -C ungrab-winmodem KERNEL_DIR=$kernel_source_dir KVERS=$kernelver" 11 | DEST_MODULE_LOCATION[1]="/kernel/drivers/misc" 12 | if grep -q ^CONFIG_X86_32=y $kernel_source_dir/.config; then 13 | BUILT_MODULE_NAME[2]="slamr" 14 | BUILT_MODULE_LOCATION[2]="drivers" 15 | DEST_MODULE_LOCATION[2]="/kernel/drivers/misc" 16 | fi 17 | AUTOINSTALL="yes" 18 | -------------------------------------------------------------------------------- /debian/patches/clean_LFLAGS.diff: -------------------------------------------------------------------------------- 1 | Description: Just set LFLAGS to -lasound, also rename it to LDFLAGS 2 | Forwarded: yes 3 | Author: أحمد المحمودي (Ahmed El-Mahmoudy) 4 | --- a/modem/Makefile 5 | +++ b/modem/Makefile 6 | @@ -41,19 +41,14 @@ 7 | 8 | ifdef SUPPORT_ALSA 9 | CFLAGS+= -DSUPPORT_ALSA=1 10 | -ifeq ($(ARCH64), 0) 11 | -LFLAGS+= /usr/lib/libasound.so 12 | -else 13 | -# LFLAGS+= /usr/lib32/libasound.so , replaced by -l commands search for asound 14 | -LFLAGS+= -lasound 15 | -endif 16 | +LDFLAGS+= -lasound 17 | endif 18 | 19 | slmodemd: 20 | - $(CC) -o slmodemd modem_main.o $(all-objs) $(LFLAGS) 21 | + $(CC) -o slmodemd modem_main.o $(all-objs) $(LDFLAGS) 22 | 23 | modem_test: 24 | - $(CC) -o modem_test modem_test.o $(all-objs) $(LFLAGS) 25 | + $(CC) -o modem_test modem_test.o $(all-objs) $(LDFLAGS) 26 | 27 | clean: 28 | $(RM) slmodemd modem_test modem_main.o modem_cmdline.o modem_test.o $(modem-objs) $(dp-objs) $(sysdep-objs) 29 | -------------------------------------------------------------------------------- /patches/semaphore2011.diff: -------------------------------------------------------------------------------- 1 | Description: Fix compilation of slusb with 2.6.37 2 | *_MUTEX got deprecated since kernel 2.6.37 3 | Author: أحمد المحمودي (Ahmed El-Mahmoudy) 4 | Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=613906 5 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/737650 6 | --- a/drivers/st7554.c 7 | +++ b/drivers/st7554.c 8 | @@ -233,7 +233,11 @@ 9 | static struct class *st7554_class; 10 | #endif 11 | 12 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) 13 | static DECLARE_MUTEX(open_sem); 14 | +#else 15 | +static DEFINE_SEMAPHORE(open_sem); 16 | +#endif 17 | 18 | /* --------------------------------------------------------------------- */ 19 | 20 | @@ -1234,7 +1238,11 @@ 21 | memset(s, 0, sizeof(*s)); 22 | 23 | spin_lock_init(&s->lock); 24 | +#ifdef init_MUTEX 25 | init_MUTEX (&s->sem); 26 | +#else 27 | + sema_init (&s->sem, 1); 28 | +#endif 29 | init_waitqueue_head(&s->wait); 30 | 31 | s->name = "ST7554 USB Modem"; 32 | -------------------------------------------------------------------------------- /faxing/modem: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test "$1" = "" 4 | then 5 | echo "Usage du script 'modem' :" 6 | echo "Configuration : modem [sm56] [olitec]" 7 | echo "Appel PPP : modem ppp" 8 | echo "" 9 | echo "En l'état, suppression de la configuration du modem ..." 10 | sudo /usr/bin/modem.sh 11 | echo "" 12 | exit 13 | fi 14 | 15 | if test "$1" = "sm56" 16 | then 17 | echo "Configuration 'sm56' comme modem de Classe 1 ..." 18 | echo "CLASS=1" > ~/.xfaxcfg 19 | echo "RESET=\"-kZ -kX3\"" >> ~/.xfaxcfg 20 | sudo /usr/bin/modem.sh sm56 21 | exit 22 | fi 23 | 24 | if test "$1" = "olitec" 25 | then 26 | echo "Configuration 'olitec' comme modem de Classe 2 ..." 27 | echo "CLASS=2" > ~/.xfaxcfg 28 | sudo /usr/bin/modem.sh olitec 29 | exit 30 | fi 31 | 32 | if test "$1" = "ppp" 33 | then 34 | if [ -r /etc/wvdial.conf ] 35 | then 36 | sudo /usr/bin/modem.sh ppp 37 | wvdial 38 | else 39 | echo "Sélectionner d'abord le modem : modem [sm56] [olitec] !!" 40 | fi 41 | exit 42 | fi 43 | -------------------------------------------------------------------------------- /debian/patches/autoload.diff: -------------------------------------------------------------------------------- 1 | Description: Export the right aliases for auto-load on open. 2 | Author: Scott James Remnant 3 | --- a/drivers/old_st7554.c 4 | +++ b/drivers/old_st7554.c 5 | @@ -1386,4 +1386,5 @@ 6 | MODULE_AUTHOR("Smart Link Ltd."); 7 | MODULE_DESCRIPTION("ST7554 USB Smart Link Soft Modem driver."); 8 | MODULE_LICENSE("Smart Link Ltd."); 9 | +MODULE_ALIAS_CHARDEV_MAJOR(MY_MAJOR); 10 | 11 | --- a/drivers/st7554.c 12 | +++ b/drivers/st7554.c 13 | @@ -1442,3 +1442,4 @@ 14 | MODULE_DESCRIPTION("ST7554 USB Smart Link Soft Modem driver."); 15 | //MODULE_LICENSE("Smart Link Ltd."); 16 | MODULE_LICENSE("Dual BSD/GPL"); 17 | +MODULE_ALIAS_CHARDEV_MAJOR(243); 18 | --- a/drivers/amrmo_init.c 19 | +++ b/drivers/amrmo_init.c 20 | @@ -741,6 +741,7 @@ 21 | MODULE_AUTHOR("Smart Link Ltd."); 22 | MODULE_DESCRIPTION("SmartLink HAMR5600,SmartPCI56/561 based modem driver"); 23 | MODULE_LICENSE("Smart Link Ltd."); 24 | +MODULE_ALIAS_CHARDEV_MAJOR(AMRMO_MAJOR); 25 | 26 | 27 | static int __init amrmo_init(void) 28 | -------------------------------------------------------------------------------- /debian/sl-modem-dkms.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | #DEBHELPER# 5 | 6 | daemon_stop () { 7 | if [ -e /var/run/slmodemd.pid ] ; then 8 | invoke-rc.d sl-modem-daemon stop || true 9 | sleep 1 10 | fi 11 | } 12 | 13 | case "$1" in 14 | configure) 15 | if [ -x /usr/lib/dkms/common.postinst ]; then 16 | # Check if slmodemd is running: 17 | if [ -e /var/run/slmodemd.pid ] ; then 18 | SLMODEMD_RUNNING=1 19 | fi 20 | # If either slamr or slusb module is actually in use, stop slmodemd, and 21 | # remove the respective module: 22 | for module in slamr slusb ; do 23 | if grep -q "$module" /proc/modules 2>/dev/null ; then 24 | daemon_stop 25 | rmmod $module || true 26 | fi 27 | done 28 | modprobe slamr 2>/dev/null || modprobe slusb 2>/dev/null || true 29 | 30 | # If slmodemd was running and we are upgrading, then restart slmodemd: 31 | if [ -n "$SLMODEMD_RUNNING" -a -n "$2" ]; then 32 | invoke-rc.d sl-modem-daemon restart || true 33 | fi 34 | 35 | fi 36 | ;; 37 | esac 38 | 39 | 40 | -------------------------------------------------------------------------------- /faxing/modem.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test "$1" = "" 4 | then 5 | if test `ps aux | grep -c -e "[s]lmodemd"` = "1" 6 | then 7 | killall -9 slmodemd 8 | fi 9 | rm -f /dev/modem 10 | rm -f /etc/wvdial.conf 11 | exit 12 | fi 13 | 14 | if test "$1" = "sm56" 15 | then 16 | if test `ps aux | grep -c -e "[s]lmodemd"` = "1" 17 | then 18 | killall -9 slmodemd 19 | fi 20 | /usr/sbin/slmodemd -c FRANCE --alsa hw:0,6 & 21 | cd /etc 22 | rm -f /etc/wvdial.conf 23 | ln -s wvdial/wvdial.conf.sm56 wvdial.conf 24 | cd /dev 25 | rm -f /dev/modem 26 | sleep 1 27 | FILE=`ls -al ttySL0 | cut -d">" -f 2` 28 | FILE=`echo $FILE` 29 | echo "chmod a+rw $FILE" 30 | chmod a+rw $FILE ; ln -s ttySL0 modem 31 | exit 32 | fi 33 | 34 | if test "$1" = "olitec" 35 | then 36 | if test `ps aux | grep -c -e "[s]lmodemd"` = "1" 37 | then 38 | killall -9 slmodemd 39 | fi 40 | cd /etc 41 | rm -f /etc/wvdial.conf 42 | ln -s wvdial/wvdial.conf.olitec wvdial.conf 43 | cd /dev 44 | rm -f /dev/modem 45 | chmod a+rw ttyUSB0 ; ln -s ttyUSB0 modem 46 | exit 47 | fi 48 | 49 | if test "$1" = "ppp" 50 | then 51 | /sbin/ifconfig wlan0 down 52 | fi 53 | 54 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.default: -------------------------------------------------------------------------------- 1 | # NOTE: settings in /etc/defautls/slmodemd are used too 2 | 3 | # set this to 1 to never run the daemon from the init script 4 | # you can set it if you have an USB device, than the init script won't 5 | # be started at boot (but when the USB device is plugged on) 6 | DONTSTART=0 7 | 8 | # This is the default configuration for the slmodem driver daemon 9 | # running on Debian systems. 10 | # 11 | # Edit device node and country code here ... 12 | # 13 | # possible country codes are: 14 | # 15 | # USA 16 | # GERMANY 17 | # BELGIUM 18 | # etc. 19 | # 20 | # use 'slmodemd --countrylist' to check out other countries 21 | # 22 | # 23 | #SLMODEMD_DEVICE=slamr0 24 | #SLMODEMD_COUNTRY=GERMANY 25 | 26 | SLMODEMD_DEVICE=auto 27 | SLMODEMD_COUNTRY=USA 28 | 29 | # 30 | # Additional options for slmodemd, see "slmodemd -h" output for details. 31 | # Do NOT set country or device name here! 32 | 33 | OPTS="" 34 | 35 | # force the start of the daemon even if old type modules seem to be 36 | # installed (set it to 1) 37 | 38 | FORCESTART=0 39 | 40 | # set this to not see any hints of the init script on startup 41 | 42 | # BEQUIET=1 43 | 44 | # set this to not create the /dev/modem symlink 45 | 46 | # NOSYMLINK=1 47 | -------------------------------------------------------------------------------- /patches/2.6.33.diff: -------------------------------------------------------------------------------- 1 | Description: Path of utsrelease.h changed to 2 | $(KERNEL_DIR)/generated/utsrelease.h in linux kernel >= 2.6.33 3 | Credits to Harald Jenny for the heads up 4 | Forwarded: yes 5 | Author: أحمد المحمودي (Ahmed El-Mahmoudy) 6 | --- a/drivers/Makefile 7 | +++ b/drivers/Makefile 8 | @@ -82,7 +82,7 @@ 9 | $(RM) ${DESTDIR}/dev/slusb$(minor) ; ) echo -n 10 | 11 | else 12 | -ifeq ($(shell grep 'UTS.*"2\.6' $(KERNEL_DIR)/include/linux/utsrelease.h $(KERNEL_DIR)/include/linux/version.h 2>/dev/null),) 13 | +ifeq ($(shell grep 'UTS.*"2\.6' $(KERNEL_DIR)/include/generated/utsrelease.h $(KERNEL_DIR)/include/linux/utsrelease.h $(KERNEL_DIR)/include/linux/version.h 2>/dev/null),) 14 | 15 | slusb-objs:= old_st7554.o 16 | obj:=. 17 | --- a/drivers/kernel-ver.c 18 | +++ b/drivers/kernel-ver.c 19 | @@ -5,9 +5,13 @@ 20 | 21 | #include 22 | #include 23 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) 24 | +#include 25 | +#else 26 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) 27 | #include 28 | -#endif 29 | +#endif // KERNEL_VERSION(2,6,18) 30 | +#endif // KERNEL_VERSION(2,6,33) 31 | 32 | int main() 33 | { 34 | -------------------------------------------------------------------------------- /patches/ioctl.diff: -------------------------------------------------------------------------------- 1 | Description: Fix compilation of slamr module with 2.6.36 2 | ioctl got deprecated since kernel 2.6.36 3 | Origin: http://bugs.gentoo.org/attachment.cgi?id=259296 4 | Bug-Gentoo: http://bugs.gentoo.org/show_bug.cgi?id=302456 5 | Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=613906 6 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/737650 7 | --- a/drivers/amrmo_init.c 2011-01-06 20:12:59.000000000 +0100 8 | +++ b/drivers/amrmo_init.c 2011-01-06 20:12:34.000000000 +0100 9 | @@ -437,11 +437,11 @@ static unsigned int amrmo_poll(struct fi 10 | 11 | 12 | 13 | -static int amrmo_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long parg) 14 | +static long amrmo_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long parg) 15 | { 16 | struct amrmo_struct *amrmo = (struct amrmo_struct *)file->private_data; 17 | unsigned long flags; 18 | - int ret; 19 | + long ret; 20 | unsigned stat; 21 | unsigned long arg=0; 22 | 23 | @@ -514,7 +514,7 @@ static struct file_operations amrmo_fops 24 | .read = amrmo_read, 25 | .write = amrmo_write, 26 | .poll = amrmo_poll, 27 | - .ioctl = amrmo_ioctl, 28 | + .unlocked_ioctl = amrmo_unlocked_ioctl, 29 | .open = amrmo_open, 30 | .release = amrmo_release, 31 | }; 32 | -------------------------------------------------------------------------------- /patches/zello.txt: -------------------------------------------------------------------------------- 1 | ======== 2 | 20080331 3 | ======== 4 | 5 | What's been changed: 6 | -------------------- 7 | 8 | - in kernel 2.6.24 the macro SA_SHIRQ is undefined (it was deprecated - and 9 | redefined to IRQF_SHARED - since some previous kernel, I think 2.6.22). 10 | The code now use IRQF_SHARED if it's defined, and fall back to SA_SHIRQ if 11 | IRQF_SHARED is undef 12 | 13 | - every use of pci_find_device function has been replaced with the pair 14 | pci_get_device/pci_dev_put. pci_get_device is the recommended way to look 15 | for a pci device since some earlier 2.6.x kernel, and pci_find_device has 16 | been left for backward compatibility, but may be removed in some next 17 | kernel version. The side effect is that you don't need to have 18 | CONFIG_PCI_LEGACY defined in your kernel .config (choice Bus 19 | Options->Enable deprecated pci_find_* API). 20 | 21 | - some explicit casts have been added to prevent some signedness mismatch 22 | warnings when compiling 23 | 24 | How to patch 25 | ------------ 26 | 27 | Put the diff file in the directory created untarring 28 | slmodem-2.9.11-20070813. At the shell prompt, type: 29 | cat FILENAME.DIFF | patch -p1 30 | where FILENAME.DIFF is the name of the diff file. 31 | 32 | -- 33 | zello 34 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | export KVERS 4 | 5 | CVERSION := $(shell dpkg-parsechangelog | grep '^Version:' | cut -d' ' -f2 | cut -d- -f1) 6 | 7 | %: 8 | dh $@ --with dkms 9 | 10 | override_dh_auto_build: 11 | ifeq (i386,$(shell dpkg-architecture -qDEB_BUILD_ARCH)) 12 | $(MAKE) SUPPORT_ALSA=1 13 | # Mark slmodemd as not requiring executable stack (LP: #537650) 14 | PATH=/usr/sbin:/sbin:$$PATH execstack -c modem/slmodemd 15 | 16 | # Make 15sl-modem-daemon executable before install: 17 | chmod +x debian/15sl-modem-daemon 18 | endif 19 | 20 | override_dh_auto_install: 21 | mkdir -p debian/sl-modem-dkms/usr/src/sl-modem-$(CVERSION) 22 | 23 | # Copy only the driver source to the proper location 24 | tar -c --exclude ".svn" modem/modem_defs.h drivers patches ungrab-winmodem | tar x -C debian/sl-modem-dkms/usr/src/sl-modem-$(CVERSION) 25 | chmod -R a+r debian/sl-modem-dkms/ 26 | 27 | override_dh_installchangelogs: 28 | dh_installchangelogs Changes 29 | 30 | override_dh_installdebconf: 31 | dh_installdebconf 32 | perl debian/setcountries.pl debian/sl-modem-daemon/DEBIAN/templates 33 | 34 | override_dh_installinit: 35 | dh_installinit -n 36 | 37 | override_dh_installmodules: 38 | dh_installmodules --name=sl-modem 39 | 40 | override_dh_dkms: 41 | dh_dkms -V 42 | -------------------------------------------------------------------------------- /patches/sldiffs-20090222/class_device.diff: -------------------------------------------------------------------------------- 1 | Since 2.6.25 class_device_add() and class_device_destroy() has been renamed, 2 | modified st7554.c accordingly. 3 | Index: slmodem-2.9.11-20080817/drivers/st7554.c 4 | =================================================================== 5 | --- slmodem-2.9.11-20080817.orig/drivers/st7554.c 2008-10-04 01:02:35.000000000 +0200 6 | +++ slmodem-2.9.11-20080817/drivers/st7554.c 2008-10-04 00:32:21.000000000 +0200 7 | @@ -220,11 +220,15 @@ 8 | #define CLASS_CREATE(owner, name) class_simple_create(owner, name) 9 | static struct class_simple *st7554_class; 10 | #else 11 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) 12 | +#define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) device_create(class, dev, device, fmt, rest) 13 | +#define CLASS_DEVICE_DESTROY(class, dev) device_destroy(class, dev) 14 | +#else 15 | #include 16 | - 17 | #define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_device_create(class, dev, device, fmt, rest) 18 | -#define CLASS_DESTROY(class) class_destroy(class) 19 | #define CLASS_DEVICE_DESTROY(class, dev) class_device_destroy(class, dev) 20 | +#endif 21 | +#define CLASS_DESTROY(class) class_destroy(class) 22 | #define CLASS_CREATE(owner, name) class_create(owner, name) 23 | static struct class *st7554_class; 24 | #endif 25 | -------------------------------------------------------------------------------- /faxing/xtel.lignes: -------------------------------------------------------------------------------- 1 | # 2 | # Fichier xtel.lignes 3 | # 4 | # Config V.23, modem OLITEC generique 5 | #modem0,/dev/modem,1200,7,E,\dat\r OK atm0b2\r OK atdt\T\r CONNECT,30 6 | 7 | # Config V.23, modem Motorola SM56 8 | modem0,/dev/modem,1200,7,E,\dat\r OK atm0x3+ms=23\r OK atdt\T\r CONNECT,30 9 | 10 | # Config V.23, modem HAYES generique 11 | #modem0,/dev/modem,1200,7,E,\dat\r OK atm1b2\r OK atdt\T\r CONNECT,30 12 | 13 | # Config TVR, Djinn-Flash 9600 14 | #le_tvr,/dev/modem,9600,8,N,\dat&fm1e0&k3+xm3\r OK atdt\T\r CONNECT,30 15 | 16 | # Ce meme Djinn-Flash en mode V.23 17 | #modem0,/dev/modem,38400,7,E,\dat&fm1e0&k3f3\r OK atdt\T\r CONNECT,30 18 | 19 | # Modems USR 28800/33600 (a choisir) 20 | #modem0,/dev/modem,1200,7,E,\dat\r OK ATM1S34=8&N2\r OK atdt\T\r CONNECT,30 21 | #modem0,/dev/modem,1200,7,E,\dat\r OK ATM1S34=14&N2\r OK atdt\T\r CONNECT,3 22 | #modem0,/dev/modem,1200,7,E,\dat\r OK ATM1S27.4=1&N2\r OK atdt\T\r CONNECT,3 23 | #modem0,/dev/modem,1200,7,E,\dat\r OK ATM1S27=16&N2S40=1S9=100&N2\r OK atdt\T\r CONNECT,30 24 | 25 | # Modem USR Sporter 56K 26 | #modem0,/dev/modem,1200,7,E,\dat\r OK AT&F1M1S27=16S34=8S40=6&N2S9=100&B2\r OK atdt\T\r CONNECT,30 27 | 28 | #Modem USR Courier I-modem externe bios 2.50 29 | #modem0,/dev/modem,38400,7,E,\dat\r OK AT&f1m1l1b0*v2=3s34=8&n2s27=16s40=1s9=100&b2\r OK atdt\T\r CONNECT,30 30 | 31 | # Minitel 1 32 | #modem0,/dev/modem,1200,7,E,minitel1,30 33 | -------------------------------------------------------------------------------- /patches/sldiffs-20090222/README.diff: -------------------------------------------------------------------------------- 1 | Dropped the TROUBLESHOOTING section from README and adapted the feedback 2 | section, mentioned the transfer of the modem business to Conexant. 3 | Index: slmodem-2.9.11-20080817/README 4 | =================================================================== 5 | --- slmodem-2.9.11-20080817.orig/README 2008-09-18 08:38:11.000000000 +0200 6 | +++ slmodem-2.9.11-20080817/README 2008-09-18 08:38:31.000000000 +0200 7 | @@ -239,21 +239,13 @@ 8 | Note: When using ALSA modem driver you don't need to load other 9 | modules ('slamr'). 10 | 11 | - 12 | -Troubleshooting 13 | -=============== 14 | - 15 | -If you get an error message during installation/configuration or loading 16 | -the modules try to see it in FAQ file. 17 | - 18 | -Please report the problem to your modem provider or to us 19 | -(linux-support@smlink.com). 20 | - 21 | - 22 | Feedback 23 | ======== 24 | 25 | -Please send any feedbacks to Smart Link. See the Smart Link 26 | -web site for contact information (www.smlink.com) or to 27 | -linux-support@smlink.com. 28 | +This software has been originaly created and distributed by Smart Link. 29 | +However, Smart Link stopped supported them and apparently left the modem 30 | +business. See http://www.smlink.com/smlink.asp for further information and 31 | +contact data. 32 | 33 | +--- 34 | +File modified by Eduard Bloch , 2006 35 | -------------------------------------------------------------------------------- /scripts/slackware/rc.slmodemd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # rc.slmodemd 4 | # 5 | # Start slmodemd daemon for SmartLink 6 | # 7 | 8 | SLMODEMD_DEVICE=/dev/slusb0 9 | 10 | slmodemd_start() 11 | { 12 | if [ -x /usr/sbin/slmodemd ]; then 13 | echo -n "Starting SmartLink modem daemon: " 14 | echo "/usr/sbin/slmodemd" 15 | /usr/sbin/slmodemd $SLMODEMD_DEVICE 1>/dev/null 2>/dev/null & 16 | fi 17 | } 18 | 19 | slmodemd_stop() 20 | { 21 | echo "Shutting down SmartLink modem daemon" 22 | killall slmodemd 23 | } 24 | 25 | slmodemd_restart() 26 | { 27 | slmodemd_stop 28 | sleep 1 29 | slmodemd_start 30 | } 31 | 32 | 33 | if [ "$SLMODEMD_DEVICE" ]; then readonly SLMODEMD_DEVICE; fi 34 | 35 | if [ -z $SLMODEMD_DEVICE ]; then 36 | echo "slmodemd: SLMODEMD_DEVICE not set. You can set it in /etc/rc.d/rc.slmodemd file or as environment variable." 37 | exit 5 38 | fi 39 | 40 | case `echo "$SLMODEMD_DEVICE"|cut -c6-10` in 41 | slamr) 42 | grep -q 'slamr\..*o' /lib/modules/`uname -r`/modules.dep ||\ 43 | { echo "slmodemd: kernel module slamr.(k)o missing"; exit 1; } 44 | ;; 45 | slusb) 46 | grep -q 'slusb\..*o' /lib/modules/`uname -r`/modules.dep ||\ 47 | { echo "slmodemd: kernel module slusb.(k)o missing"; exit 1; } 48 | ;; 49 | *) 50 | echo "slmodemd: no kernel module for $SLMODEMD_DEVICE - broken config?" 51 | exit 1 52 | ;; 53 | esac 54 | 55 | case "$1" in 56 | 'start') 57 | slmodemd_start 58 | ;; 59 | 'stop') 60 | slmodemd_stop 61 | ;; 62 | 'restart') 63 | slmodemd_restart 64 | ;; 65 | *) 66 | echo "usage $0 start|stop|restart" 67 | esac 68 | -------------------------------------------------------------------------------- /debian/patches/modem_group.diff: -------------------------------------------------------------------------------- 1 | Set the default device group to "dialout". 2 | By: Eduard Bloch 3 | Index: slmodem-2.9.11-20080817/modem/modem_cmdline.c 4 | =================================================================== 5 | --- slmodem-2.9.11-20080817.orig/modem/modem_cmdline.c 2008-03-29 14:04:16.000000000 +0200 6 | +++ slmodem-2.9.11-20080817/modem/modem_cmdline.c 2008-09-17 15:17:37.000000000 +0200 7 | @@ -74,8 +74,8 @@ 8 | unsigned int ring_detector = 0; 9 | #endif 10 | unsigned int use_alsa = 0; 11 | +const char *modem_group = "dialout"; 12 | unsigned int use_short_buffer = 0; 13 | -const char *modem_group = "uucp"; 14 | mode_t modem_perm = 0660; 15 | 16 | 17 | @@ -113,14 +113,14 @@ 18 | {'c',"country","default modem country name",MANDATORY,STRING,"USA"}, 19 | { 0 ,"countrylist","show list of supported countries"}, 20 | {'a',"alsa","ALSA mode (see README for howto)"}, 21 | - {'g',"group","Modem TTY group",MANDATORY,STRING,"uucp"}, 22 | + {'g',"group","Modem TTY group",MANDATORY,STRING,"dialout"}, 23 | {'p',"perm","Modem TTY permission",MANDATORY,INTEGER,"0660"}, 24 | #ifdef MODEM_CONFIG_RING_DETECTOR 25 | {'r',"ringdetector","with internal ring detector (software)"}, 26 | #endif 27 | {'n',"nortpriority","run with regular priority"}, 28 | {'s',"shortbuffer","use short buffer (4 periods length)"}, 29 | - {'d',"debug","debug level",OPTIONAL,INTEGER,"0"}, 30 | + {'d',"debug","debug level (developers only, for ./sl...)",OPTIONAL,INTEGER,"0"}, 31 | {'l',"log","logging mode",OPTIONAL,INTEGER,"5"}, 32 | {} 33 | }; 34 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | ########################################################################### 2 | # 3 | # 4 | # Makefile -- modem Makefile. 5 | # 6 | # Copyright(c) 2003, Smart Link Ltd. (www.smlink.com) 7 | # All rights reserved. 8 | # 9 | # Author: Sasha K (sashak@smlink.com) 10 | # 11 | # 12 | ########################################################################### 13 | # 14 | ########################################################################### 15 | 16 | KERNEL_DIR:=/lib/modules/$(shell uname -r)/build 17 | 18 | # tools 19 | INSTALL:=install 20 | 21 | all: modem 22 | 23 | modem: 24 | $(MAKE) -C $@ all 25 | 26 | install: all 27 | 28 | ifndef SUPPORT_ALSA 29 | all: drivers 30 | install: install-drivers 31 | uninstall: uninstall-drivers 32 | endif 33 | 34 | install: 35 | $(INSTALL) -D -m 755 modem/slmodemd ${DESTDIR}/usr/sbin/slmodemd 36 | $(RM) -rf ${DESTDIR}/var/lib/slmodem 37 | $(INSTALL) -d -D -m 755 ${DESTDIR}/var/lib/slmodem 38 | 39 | uninstall:uninstall-drivers 40 | $(RM) ${DESTDIR}/usr/sbin/slmodemd 41 | $(RM) -rf ${DESTDIR}/var/lib/slmodem 42 | 43 | drivers: 44 | $(MAKE) -C drivers KERNEL_DIR=$(KERNEL_DIR) 45 | 46 | install-drivers: drivers 47 | $(MAKE) install -C drivers KERNEL_DIR=$(KERNEL_DIR) 48 | uninstall-drivers: 49 | $(MAKE) uninstall -C drivers KERNEL_DIR=$(KERNEL_DIR) 50 | 51 | # misc rules 52 | sub-dirs:= modem drivers 53 | .PHONY: $(sub-dirs) all old clean dep install 54 | clean dep: %: %-sub-dirs 55 | %-sub-dirs: 56 | $(foreach dir,$(sub-dirs),$(MAKE) -C $(dir) $(patsubst %-sub-dirs,%,$@) && ) echo "done." 57 | 58 | -------------------------------------------------------------------------------- /debian/po/templates.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the sl-modem package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 11 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=CHARSET\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #. Type: select 20 | #. Default 21 | #: ../sl-modem-daemon.templates:1001 22 | msgid "" 23 | "USA [ Enter the country (in uppercase and in English) where your language is " 24 | "mostly spoken, for example FRANCE for French ]" 25 | msgstr "" 26 | 27 | #. Type: select 28 | #. Description 29 | #. Translators: Enter the country (in uppercase and in English) where your 30 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 31 | #. German 32 | #: ../sl-modem-daemon.templates:1002 33 | msgid "Location of the modem:" 34 | msgstr "" 35 | 36 | #. Type: select 37 | #. Description 38 | #. Translators: Enter the country (in uppercase and in English) where your 39 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 40 | #. German 41 | #: ../sl-modem-daemon.templates:1002 42 | msgid "" 43 | "Indicate the country in which your modem is located. Please select the " 44 | "telephone system used in your country." 45 | msgstr "" 46 | -------------------------------------------------------------------------------- /debian/patches/12_ulimit_warn.diff: -------------------------------------------------------------------------------- 1 | Patch that checks the current limit and makes slmodemd warn & die if the limit 2 | is judged to be too low (< 8 MB). 3 | By: Corey Hickey 4 | Index: sl-modem-2.9.11~20080817/modem/modem_main.c 5 | =================================================================== 6 | --- sl-modem-2.9.11~20080817.orig/modem/modem_main.c 2009-02-25 16:14:25.000000000 +0200 7 | +++ sl-modem-2.9.11~20080817/modem/modem_main.c 2009-02-25 16:19:11.000000000 +0200 8 | @@ -53,6 +53,8 @@ 9 | #include 10 | #include 11 | #include 12 | +#include 13 | +#include 14 | #include 15 | #include 16 | #include 17 | @@ -78,6 +80,8 @@ 18 | 19 | 20 | #define SLMODEMD_USER "Slmodemd" 21 | +#define LOCKED_MEM_MIN_KB (8UL * 1024) 22 | +#define LOCKED_MEM_MIN (LOCKED_MEM_MIN_KB * 1024) 23 | 24 | #define CLOSE_COUNT_MAX 100 25 | 26 | @@ -989,6 +993,22 @@ 27 | signal(SIGTERM, mark_termination); 28 | 29 | #ifdef SLMODEMD_USER 30 | + if (need_realtime) { 31 | + struct rlimit limit; 32 | + if (getrlimit(RLIMIT_MEMLOCK, &limit)) { 33 | + ERR("getrlimit failed to read RLIMIT_MEMLOCK\n"); 34 | + exit(-1); 35 | + } 36 | + if (limit.rlim_cur != RLIM_INFINITY && 37 | + limit.rlim_cur < LOCKED_MEM_MIN) { 38 | + ERR("locked memory limit too low:\n"); 39 | + ERR("need %lu bytes, have %lu bytes\n", LOCKED_MEM_MIN, 40 | + (unsigned long)limit.rlim_cur); 41 | + ERR("try 'ulimit -l %lu'\n", LOCKED_MEM_MIN_KB); 42 | + exit(-1); 43 | + } 44 | + } 45 | + 46 | pwd = getpwnam(SLMODEMD_USER); 47 | if (!pwd) { 48 | ERR("getpwnam " SLMODEMD_USER ": %s\n",strerror(errno)); 49 | -------------------------------------------------------------------------------- /debian/po/id.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: sl-modem\n" 4 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 5 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 6 | "PO-Revision-Date: \n" 7 | "Last-Translator: Mahyuddin Susanto \n" 8 | "Language-Team: Debian Indonesia Translator \n" 9 | "Language: \n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "X-Poedit-Language: Indonesian\n" 14 | "X-Poedit-Country: INDONESIA\n" 15 | 16 | #. Type: select 17 | #. Default 18 | #: ../sl-modem-daemon.templates:1001 19 | msgid "USA [ Enter the country (in uppercase and in English) where your language is mostly spoken, for example FRANCE for French ]" 20 | msgstr "USA [masukkan negara (dalam huruf besar dan dalam bahasa Inggris) dimana bahasa anda diucapkan, contoh FRANCE untuk Perancis]" 21 | 22 | #. Type: select 23 | #. Description 24 | #. Translators: Enter the country (in uppercase and in English) where your 25 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 26 | #. German 27 | #: ../sl-modem-daemon.templates:1002 28 | msgid "Location of the modem:" 29 | msgstr "Lokasi modem:" 30 | 31 | #. Type: select 32 | #. Description 33 | #. Translators: Enter the country (in uppercase and in English) where your 34 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 35 | #. German 36 | #: ../sl-modem-daemon.templates:1002 37 | msgid "Indicate the country in which your modem is located. Please select the telephone system used in your country." 38 | msgstr "Tunjukkan negara modem anda berada. Silakan pilih sistem telepon yang digunakan di negara anda" 39 | 40 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.README.Debian: -------------------------------------------------------------------------------- 1 | sl-modem-daemon for Debian 2 | -------------------------- 3 | 4 | The driver daemon needs kernel modules to access the hardware. This can 5 | be done either with the kernel driver provided by SmartLink or trough 6 | ALSA in recent kernel versions. The SmartLink driver needs to be 7 | compiled as additional module (which requires kernel headers for your 8 | kernel version), but should work more stable and provide more features. 9 | 10 | By default, the init script is configured to detect the available driver 11 | (see /etc/default/sl-modem-daemon) and run the daemon for the first 12 | available modem(compatbile). If you wish to specify the device manually, 13 | edit the config file. 14 | 15 | To use SmartLink modules, create the drivers package using the separate 16 | sl-modem-dkms package (see its README.Debian for details). 17 | 18 | When done, use "dpkg-reconfigure sl-modem-daemon -plow" to choose your 19 | country or edit the file /etc/defaults/sl-modem-daemon manually. 20 | 21 | To use ALSA modules, make sure that you have a recent kernel (>= 2.6.4) and 22 | the intel8x0m module available. If the driver is not detected by the 23 | init script, edit the file /etc/defaults/sl-modem-daemon script and set 24 | the SLMODEMD_DEVICE to the ALSA conventional device name ('hw:0' or 25 | 'hw:1' for instance) 26 | 27 | Why is sl-modem-daemon in non-free? 28 | ----------------------------------- 29 | 30 | Because one part of the source is not available. Instead, a precompiled binary 31 | object is provided (probably to protect the Intellectual Property of the 32 | vendor). If you don't like it, feel free to buy a conventional external modem. 33 | 34 | -- Eduard Bloch -- Fri, 13 Apr 2007 18:51:51 +0200 35 | -------------------------------------------------------------------------------- /debian/slmodemd.8: -------------------------------------------------------------------------------- 1 | .TH slmodemd "8" "October 23 2005" "2.9.9" "User Commands" 2 | .SH NAME 3 | slmodemd \- manual page for SmartLink Soft Modem daemon 4 | .SH SYNOPSIS 5 | .B slmodemd 6 | [\fIoption\fR...] [\fIdevice\fR] 7 | .SH DESCRIPTION 8 | This is Smart Link Soft Modem for Linux and provides 9 | full-featured 56K Voice Fax Modem. 10 | .P 11 | \fBdevice\fR name of modem device (default `/dev/slamr0') 12 | .TP 13 | \fB\-h\fR, \fB\-u\fR,\fB\-\-help\fR, \fB\-\-usage\fR 14 | usage info 15 | .TP 16 | \fB\-v\fR, \fB\-\-version\fR 17 | show version and exit 18 | .TP 19 | \fB\-c\fR, \fB\-\-country\fR=\fIVAL\fR 20 | default modem country name (default `USA') 21 | .TP 22 | \fB\-\-countrylist\fR 23 | show list of supported countries 24 | .TP 25 | \fB\-a\fR, \fB\-\-alsa\fR 26 | ALSA mode (see README for howto) 27 | .TP 28 | \fB\-g\fR, \fB\-\-group\fR=\fIVAL\fR 29 | Modem TTY group (default `dialout') 30 | .TP 31 | \fB\-p\fR, \fB\-\-perm\fR=\fIVAL\fR 32 | Modem TTY permission (default `0660') 33 | .TP 34 | \fB\-r\fR, \fB\-\-ringdetector\fR 35 | with internal ring detector (software) 36 | .TP 37 | \fB\-n\fR, \fB\-\-nortpriority\fR 38 | run with regular priority 39 | .TP 40 | \fB\-d\fR, \fB\-\-debug\fR=\fIVAL\fR 41 | debug level, prints log mesages to stderr (0 \- 12, default `0') 42 | .TP 43 | \fB\-l\fR, \fB\-\-log\fR=\fIVAL\fR 44 | logging mode, prints log messages to log file (0 \- 12, default `5') 45 | .SH FILES 46 | .TP 47 | \fB/etc/default/sl-modem-daemon\fR 48 | configuration file 49 | .TP 50 | \fB/etc/init.d/sl-modem-daemon\fR 51 | daemon start\-stop\-script 52 | .SH AUTHOR 53 | slmodend was written by Sasha K . 54 | .PP 55 | This manual page was written by Erik Schanze , 56 | for the Debian project (but may be used by others). 57 | 58 | -------------------------------------------------------------------------------- /debian/po/fi.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: sl-modem\n" 4 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 5 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 6 | "PO-Revision-Date: 2008-10-09 20:24+0200\n" 7 | "Last-Translator: Esko Arajärvi \n" 8 | "Language-Team: Finnish \n" 9 | "Language: fi\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "X-Poedit-Language: Finnish\n" 14 | "X-Poedit-Country: FINLAND\n" 15 | 16 | #. Type: select 17 | #. Default 18 | #: ../sl-modem-daemon.templates:1001 19 | msgid "" 20 | "USA [ Enter the country (in uppercase and in English) where your language is " 21 | "mostly spoken, for example FRANCE for French ]" 22 | msgstr "FINLAND" 23 | 24 | #. Type: select 25 | #. Description 26 | #. Translators: Enter the country (in uppercase and in English) where your 27 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 28 | #. German 29 | #: ../sl-modem-daemon.templates:1002 30 | msgid "Location of the modem:" 31 | msgstr "Modeemin sijainti:" 32 | 33 | #. Type: select 34 | #. Description 35 | #. Translators: Enter the country (in uppercase and in English) where your 36 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 37 | #. German 38 | #: ../sl-modem-daemon.templates:1002 39 | #, fuzzy 40 | #| msgid "" 41 | #| "In which country is your modem located? Please select the telephone " 42 | #| "system used in your country." 43 | msgid "" 44 | "Indicate the country in which your modem is located. Please select the " 45 | "telephone system used in your country." 46 | msgstr "" 47 | "Missä maassa modeemi sijaitsee? Valitse maassa käytetty puhelinjärjestelmä." 48 | 49 | #~ msgid "USA" 50 | #~ msgstr "FINLAND" 51 | -------------------------------------------------------------------------------- /debian/po/sk.po: -------------------------------------------------------------------------------- 1 | # Slovak debconf translation of sl-modem 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the sl-modem package. 4 | # Ivan Masár , 2009. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: sl-modem\n" 9 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 11 | "PO-Revision-Date: 2009-02-07 00:14+0100\n" 12 | "Last-Translator: Ivan Masár \n" 13 | "Language-Team: Slovak \n" 14 | "Language: sk\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=utf-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #. Type: select 20 | #. Default 21 | #: ../sl-modem-daemon.templates:1001 22 | msgid "" 23 | "USA [ Enter the country (in uppercase and in English) where your language is " 24 | "mostly spoken, for example FRANCE for French ]" 25 | msgstr "SLOVENSKO" 26 | 27 | #. Type: select 28 | #. Description 29 | #. Translators: Enter the country (in uppercase and in English) where your 30 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 31 | #. German 32 | #: ../sl-modem-daemon.templates:1002 33 | msgid "Location of the modem:" 34 | msgstr "Kde sa modem nachádza:" 35 | 36 | #. Type: select 37 | #. Description 38 | #. Translators: Enter the country (in uppercase and in English) where your 39 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 40 | #. German 41 | #: ../sl-modem-daemon.templates:1002 42 | msgid "" 43 | "Indicate the country in which your modem is located. Please select the " 44 | "telephone system used in your country." 45 | msgstr "" 46 | "Zadajte krajinu, kde sa nachádza váš modem. Prosím, vyberte telefónny " 47 | "systém, ktorý sa vo vašej krajine používa." 48 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * 4 | * Copyright (c) 2001, Smart Link Ltd. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above 14 | * copyright notice, this list of conditions and the following 15 | * disclaimer in the documentation and/or other materials provided 16 | * with the distribution. 17 | * 3. Neither the name of the Smart Link Ltd. nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | * 33 | */ 34 | 35 | -------------------------------------------------------------------------------- /debian/po/vi.po: -------------------------------------------------------------------------------- 1 | # Vietnamese translation for SLModem. 2 | # Copyright © 2009 Free Software Foundation, Inc. 3 | # Clytie Siddall , 2009. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: sl-modem 2.9.11~20080817-2\n" 8 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 10 | "PO-Revision-Date: 2009-02-01 23:16+1030\n" 11 | "Last-Translator: Clytie Siddall \n" 12 | "Language-Team: Vietnamese \n" 13 | "Language: vi\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=1; plural=0;\n" 18 | "X-Generator: LocFactoryEditor 1.8\n" 19 | 20 | #. Type: select 21 | #. Default 22 | #: ../sl-modem-daemon.templates:1001 23 | msgid "" 24 | "USA [ Enter the country (in uppercase and in English) where your language is " 25 | "mostly spoken, for example FRANCE for French ]" 26 | msgstr "VIETNAM" 27 | 28 | #. Type: select 29 | #. Description 30 | #. Translators: Enter the country (in uppercase and in English) where your 31 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 32 | #. German 33 | #: ../sl-modem-daemon.templates:1002 34 | msgid "Location of the modem:" 35 | msgstr "Vị trí của bộ điều giải:" 36 | 37 | #. Type: select 38 | #. Description 39 | #. Translators: Enter the country (in uppercase and in English) where your 40 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 41 | #. German 42 | #: ../sl-modem-daemon.templates:1002 43 | msgid "" 44 | "Indicate the country in which your modem is located. Please select the " 45 | "telephone system used in your country." 46 | msgstr "" 47 | "Ngụ ý bộ điều giải (modem) của bạn ở quốc gia nào. Hãy chọn hệ thống điện " 48 | "thoại dùng trong nước này." 49 | -------------------------------------------------------------------------------- /debian/po/tr.po: -------------------------------------------------------------------------------- 1 | # Turkish translation of sl-modem package 2 | # Copyright (C) 2014 Mert Dirik 3 | # This file is distributed under the same license as the sl-modem package. 4 | # Mert Dirik , 2014. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: sl-modem\n" 9 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 11 | "PO-Revision-Date: 2014-08-01 15:16+0200\n" 12 | "Last-Translator: Mert Dirik \n" 13 | "Language-Team: Debian L10n Turkish \n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "X-Generator: Poedit 1.5.4\n" 18 | "Language: tr\n" 19 | 20 | #. Type: select 21 | #. Default 22 | #: ../sl-modem-daemon.templates:1001 23 | msgid "" 24 | "USA [ Enter the country (in uppercase and in English) where your language is " 25 | "mostly spoken, for example FRANCE for French ]" 26 | msgstr "TURKEY" 27 | 28 | #. Type: select 29 | #. Description 30 | #. Translators: Enter the country (in uppercase and in English) where your 31 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 32 | #. German 33 | #: ../sl-modem-daemon.templates:1002 34 | msgid "Location of the modem:" 35 | msgstr "Modemin bulunduğu konum:" 36 | 37 | #. Type: select 38 | #. Description 39 | #. Translators: Enter the country (in uppercase and in English) where your 40 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 41 | #. German 42 | #: ../sl-modem-daemon.templates:1002 43 | msgid "" 44 | "Indicate the country in which your modem is located. Please select the " 45 | "telephone system used in your country." 46 | msgstr "" 47 | "Lütfen modeminizin içinde bulunduğu ülkeyi belirtin ve ülkenizde kullanılan " 48 | "telefon sistemini seçin." 49 | -------------------------------------------------------------------------------- /debian/po/nl.po: -------------------------------------------------------------------------------- 1 | # Dutch translation of sl-modem debconf templates. 2 | # Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the sl-modem package. 4 | # Jeroen Schot , 2012. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: sl-modem 2.9.11~20110321-6\n" 9 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 11 | "PO-Revision-Date: 2012-01-05 16:11+0100\n" 12 | "Last-Translator: Jeroen Schot \n" 13 | "Language-Team: Debian l10n Dutch \n" 14 | "Language: nl\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #. Type: select 20 | #. Default 21 | #: ../sl-modem-daemon.templates:1001 22 | msgid "" 23 | "USA [ Enter the country (in uppercase and in English) where your language is " 24 | "mostly spoken, for example FRANCE for French ]" 25 | msgstr "NETHERLANDS" 26 | 27 | #. Type: select 28 | #. Description 29 | #. Translators: Enter the country (in uppercase and in English) where your 30 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 31 | #. German 32 | #: ../sl-modem-daemon.templates:1002 33 | msgid "Location of the modem:" 34 | msgstr "Lokatie van de moden:" 35 | 36 | #. Type: select 37 | #. Description 38 | #. Translators: Enter the country (in uppercase and in English) where your 39 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 40 | #. German 41 | #: ../sl-modem-daemon.templates:1002 42 | msgid "" 43 | "Indicate the country in which your modem is located. Please select the " 44 | "telephone system used in your country." 45 | msgstr "" 46 | "Geef aan in welk land uw modem zich bevind. Kies het telefoonsysteem dat in " 47 | "uw land wordt gebruikt." 48 | -------------------------------------------------------------------------------- /debian/patches/10_drop_privileges.diff: -------------------------------------------------------------------------------- 1 | slmodemd privilege dropping patch. 2 | By: Ian Jackson, Ubuntu. 3 | Index: slmodem-2.9.11-20080817/modem/modem_main.c 4 | =================================================================== 5 | --- slmodem-2.9.11-20080817.orig/modem/modem_main.c 2008-09-18 08:19:43.000000000 +0200 6 | +++ slmodem-2.9.11-20080817/modem/modem_main.c 2008-09-18 08:20:24.000000000 +0200 7 | @@ -57,6 +57,7 @@ 8 | #include 9 | #include 10 | #include 11 | +#include 12 | 13 | #ifdef SUPPORT_ALSA 14 | #define ALSA_PCM_NEW_HW_PARAMS_API 1 15 | @@ -76,6 +77,8 @@ 16 | #define DBG(fmt,args...) dprintf("main: " fmt, ##args) 17 | 18 | 19 | +#define SLMODEMD_USER "Slmodemd" 20 | + 21 | #define CLOSE_COUNT_MAX 100 22 | 23 | 24 | @@ -936,6 +939,7 @@ 25 | struct modem *m; 26 | int pty; 27 | int ret = 0; 28 | + struct passwd *pwd; 29 | 30 | modem_debug_init(basename(dev_name)); 31 | 32 | @@ -984,6 +988,30 @@ 33 | signal(SIGINT, mark_termination); 34 | signal(SIGTERM, mark_termination); 35 | 36 | +#ifdef SLMODEMD_USER 37 | + pwd = getpwnam(SLMODEMD_USER); 38 | + if (!pwd) { 39 | + ERR("getpwnam " SLMODEMD_USER ": %s\n",strerror(errno)); 40 | + exit(-1); 41 | + } 42 | + 43 | + ret = (setgroups(1,&pwd->pw_gid) || 44 | + setgid(pwd->pw_gid) || 45 | + setuid(pwd->pw_uid)); 46 | + if (ret) { 47 | + ERR("setgroups or setgid %ld or setuid %ld failed: %s\n", 48 | + (long)pwd->pw_gid,(long)pwd->pw_uid,strerror(errno)); 49 | + exit(-1); 50 | + } 51 | + 52 | + if (setuid(0) != -1) { 53 | + ERR("setuid 0 succeeded after dropping privileges!\n"); 54 | + exit(-1); 55 | + } 56 | + DBG("dropped privileges to %ld.%ld\n", 57 | + (long)pwd->pw_gid,(long)pwd->pw_uid); 58 | +#endif 59 | + 60 | INFO("Use `%s' as modem device, Ctrl+C for termination.\n", 61 | *link_name ? link_name : m->pty_name); 62 | 63 | -------------------------------------------------------------------------------- /debian/po/it.po: -------------------------------------------------------------------------------- 1 | # Italian (it) translation of debconf templates for sl-modem 2 | # Copyright (C) 2007 Free Software Foundation, Inc. 3 | # This file is distributed under the same license as the sl-modem package. 4 | # Luca Monducci , 2007 - 2009. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: sl-modem 2.9.11~20080817-2 italian debconf templates\n" 9 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 11 | "PO-Revision-Date: 2009-01-31 14:52+0100\n" 12 | "Last-Translator: Luca Monducci \n" 13 | "Language-Team: Italian \n" 14 | "Language: it\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #. Type: select 20 | #. Default 21 | #: ../sl-modem-daemon.templates:1001 22 | msgid "" 23 | "USA [ Enter the country (in uppercase and in English) where your language is " 24 | "mostly spoken, for example FRANCE for French ]" 25 | msgstr "ITALY" 26 | 27 | #. Type: select 28 | #. Description 29 | #. Translators: Enter the country (in uppercase and in English) where your 30 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 31 | #. German 32 | #: ../sl-modem-daemon.templates:1002 33 | msgid "Location of the modem:" 34 | msgstr "Ubicazione del modem:" 35 | 36 | #. Type: select 37 | #. Description 38 | #. Translators: Enter the country (in uppercase and in English) where your 39 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 40 | #. German 41 | #: ../sl-modem-daemon.templates:1002 42 | msgid "" 43 | "Indicate the country in which your modem is located. Please select the " 44 | "telephone system used in your country." 45 | msgstr "" 46 | "Inserire in quale paese è situato il modem. Scegliere il sistema telefonico " 47 | "usato nel proprio paese." 48 | -------------------------------------------------------------------------------- /debian/po/pt.po: -------------------------------------------------------------------------------- 1 | # translation of sl-modem debconf to Portuguese 2 | # Copyright (C) 2007 the sl-modem's copyright holder 3 | # This file is distributed under the same license as the sl-modem package. 4 | # 5 | # Américo Monteiro , 2007, 2008, 2009. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: sl-modem 2.9.11~20080817-2\n" 9 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 11 | "PO-Revision-Date: 2009-01-28 07:44+0000\n" 12 | "Last-Translator: Américo Monteiro \n" 13 | "Language-Team: Portuguese \n" 14 | "Language: pt\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: KBabel 1.11.4\n" 19 | 20 | #. Type: select 21 | #. Default 22 | #: ../sl-modem-daemon.templates:1001 23 | msgid "" 24 | "USA [ Enter the country (in uppercase and in English) where your language is " 25 | "mostly spoken, for example FRANCE for French ]" 26 | msgstr "PORTUGAL" 27 | 28 | #. Type: select 29 | #. Description 30 | #. Translators: Enter the country (in uppercase and in English) where your 31 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 32 | #. German 33 | #: ../sl-modem-daemon.templates:1002 34 | msgid "Location of the modem:" 35 | msgstr "Localização do modem:" 36 | 37 | #. Type: select 38 | #. Description 39 | #. Translators: Enter the country (in uppercase and in English) where your 40 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 41 | #. German 42 | #: ../sl-modem-daemon.templates:1002 43 | msgid "" 44 | "Indicate the country in which your modem is located. Please select the " 45 | "telephone system used in your country." 46 | msgstr "" 47 | "Indique o país em que o seu modem está localizado. Por favor seleccione o " 48 | "sistema telefónico usado no seu país." 49 | -------------------------------------------------------------------------------- /debian/po/ar.po: -------------------------------------------------------------------------------- 1 | # translation of ar.po to Arabic 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the sl-modem package. 4 | # 5 | # Ossama M. Khayat , 2008, 2009. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ar\n" 9 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 11 | "PO-Revision-Date: 2009-01-28 10:23+0300\n" 12 | "Last-Translator: Ossama M. Khayat \n" 13 | "Language-Team: Arabic \n" 14 | "Language: ar\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: KBabel 1.11.4\n" 19 | "Plural-Forms: nplurals=4; plural=(n == 1? 0 : (n == 2? 1 : (n <= 10? 2 : " 20 | "3)))\n" 21 | 22 | #. Type: select 23 | #. Default 24 | #: ../sl-modem-daemon.templates:1001 25 | msgid "" 26 | "USA [ Enter the country (in uppercase and in English) where your language is " 27 | "mostly spoken, for example FRANCE for French ]" 28 | msgstr "KUWAIT" 29 | 30 | #. Type: select 31 | #. Description 32 | #. Translators: Enter the country (in uppercase and in English) where your 33 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 34 | #. German 35 | #: ../sl-modem-daemon.templates:1002 36 | msgid "Location of the modem:" 37 | msgstr "موضع المودم:" 38 | 39 | #. Type: select 40 | #. Description 41 | #. Translators: Enter the country (in uppercase and in English) where your 42 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 43 | #. German 44 | #: ../sl-modem-daemon.templates:1002 45 | msgid "" 46 | "Indicate the country in which your modem is located. Please select the " 47 | "telephone system used in your country." 48 | msgstr "" 49 | "حدد الدولية التي يوجد فيها جهاز المودم الخاص بك. رجاء اختر نظام الهاتف " 50 | "المستخدم في دولتك." 51 | -------------------------------------------------------------------------------- /debian/po/fr.po: -------------------------------------------------------------------------------- 1 | # Translation of sl-modem debconf templates to French 2 | # Copyright (c) 2008 Jean-Luc Coulon (f5ibh) 3 | # This file is distributed under the same licence as the sl-modem package. 4 | # 5 | # Jean-Luc Coulon (f5ibh) , 2009. 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: sl-modem 2.9.11\n" 10 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 11 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 12 | "PO-Revision-Date: 2009-02-06 16:49+0100\n" 13 | "Last-Translator: Jean-Luc Coulon (f5ibh) \n" 14 | "Language-Team: French \n" 15 | "Language: fr\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=utf-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. Type: select 21 | #. Default 22 | #: ../sl-modem-daemon.templates:1001 23 | msgid "" 24 | "USA [ Enter the country (in uppercase and in English) where your language is " 25 | "mostly spoken, for example FRANCE for French ]" 26 | msgstr "FRANCE" 27 | 28 | #. Type: select 29 | #. Description 30 | #. Translators: Enter the country (in uppercase and in English) where your 31 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 32 | #. German 33 | #: ../sl-modem-daemon.templates:1002 34 | msgid "Location of the modem:" 35 | msgstr "Emplacement du modem :" 36 | 37 | #. Type: select 38 | #. Description 39 | #. Translators: Enter the country (in uppercase and in English) where your 40 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 41 | #. German 42 | #: ../sl-modem-daemon.templates:1002 43 | msgid "" 44 | "Indicate the country in which your modem is located. Please select the " 45 | "telephone system used in your country." 46 | msgstr "" 47 | "Veuillez indiquer le pays dans lequel se trouve votre modem. Vous devriez " 48 | "choisir le système téléphonique en usage dans votre pays." 49 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | . /usr/share/debconf/confmodule 5 | 6 | # Reset country setting 7 | db_get sl-modem-daemon/country || true 8 | 9 | if test -n "$RET" ; then 10 | perl -pe "s,^SLMODEMD_COUNTRY.*,SLMODEMD_COUNTRY=$RET," -i /etc/default/sl-modem-daemon 11 | fi 12 | 13 | # We don't use udev anymore, let's get rid of the old rules 14 | if test -r /etc/udev/sl-modem-daemon.rules; then 15 | rm /etc/udev/sl-modem-daemon.rules 16 | fi 17 | 18 | if test -L /etc/udev/rules.d/030_sl-modem-daemon.rules ; then 19 | rm /etc/udev/rules.d/030_sl-modem-daemon.rules 20 | fi 21 | 22 | # Remove old modutils file 23 | test -r /etc/modutils/sl-modem-daemon.modutils && rm /etc/modutils/sl-modem-daemon.modutils 24 | test -r /etc/modprobe.d/sl-modem-daemon.modutils && rm /etc/modprobe.d/sl-modem-daemon.modutils 25 | 26 | case "$1" in 27 | configure) 28 | 29 | # Create user and group 30 | adduser --system --home /var/log/slmodemd --no-create-home --group \ 31 | --gecos 'Smart Link Modem Server' --force-badname \ 32 | Slmodemd 33 | 34 | # Create the data directory with right permissions 35 | install -d -oSlmodemd -gadm -m0755 /var/lib/slmodem 36 | 37 | # Create the log directory with right permissions 38 | install -d -oSlmodemd -gadm -m0750 /var/log/slmodemd 39 | 40 | # Older versions of sl-modem used to set home dir of Slmoded to /, so we 41 | # fix that during upgrade: 42 | if dpkg --compare-versions "$2" lt "2.9.11~20080817-2" ; then 43 | usermod --home /var/log/slmodemd Slmodemd 44 | fi 45 | ;; 46 | esac 47 | 48 | if [ -x "/etc/init.d/sl-modem-daemon" ]; then 49 | update-rc.d sl-modem-daemon defaults 12 >/dev/null 50 | if which invoke-rc.d > /dev/null; then 51 | invoke-rc.d sl-modem-daemon start || true 52 | else 53 | /etc/init.d/sl-modem-daemon start || true 54 | fi 55 | fi 56 | 57 | #DEBHELPER# 58 | 59 | exit 0 60 | -------------------------------------------------------------------------------- /debian/po/gl.po: -------------------------------------------------------------------------------- 1 | # Galician translation of sl-modem's debconf templates 2 | # This file is distributed under the same license as the sl-modem package. 3 | # Jacobo Tarrio , 2008. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: sl-modem\n" 8 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 10 | "PO-Revision-Date: 2008-05-18 17:33+0100\n" 11 | "Last-Translator: Jacobo Tarrio \n" 12 | "Language-Team: Galician \n" 13 | "Language: gl\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | 18 | #. Type: select 19 | #. Default 20 | #: ../sl-modem-daemon.templates:1001 21 | msgid "" 22 | "USA [ Enter the country (in uppercase and in English) where your language is " 23 | "mostly spoken, for example FRANCE for French ]" 24 | msgstr "SPAIN" 25 | 26 | #. Type: select 27 | #. Description 28 | #. Translators: Enter the country (in uppercase and in English) where your 29 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 30 | #. German 31 | #: ../sl-modem-daemon.templates:1002 32 | msgid "Location of the modem:" 33 | msgstr "Ubicación do módem:" 34 | 35 | #. Type: select 36 | #. Description 37 | #. Translators: Enter the country (in uppercase and in English) where your 38 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 39 | #. German 40 | #: ../sl-modem-daemon.templates:1002 41 | #, fuzzy 42 | #| msgid "" 43 | #| "In which country is your modem located? Please select the telephone " 44 | #| "system used in your country." 45 | msgid "" 46 | "Indicate the country in which your modem is located. Please select the " 47 | "telephone system used in your country." 48 | msgstr "" 49 | "¿En que país está situado o seu módem? Escolla o sistema telefónico " 50 | "empregado no seu país." 51 | 52 | #~ msgid "USA" 53 | #~ msgstr "SPAIN" 54 | -------------------------------------------------------------------------------- /debian/po/eu.po: -------------------------------------------------------------------------------- 1 | # translation of sl-modem-eu.po to Euskara 2 | # xabier bilbao , 2008. 3 | # Piarres Beobide , 2008, 2009. 4 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 5 | # This file is distributed under the same license as the sl-modem package. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: sl-modem-eu\n" 9 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 11 | "PO-Revision-Date: 2009-01-28 14:50+0100\n" 12 | "Last-Translator: Piarres Beobide \n" 13 | "Language-Team: Euskara \n" 14 | "Language: \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | "X-Generator: KBabel 1.11.4\n" 20 | 21 | #. Type: select 22 | #. Default 23 | #: ../sl-modem-daemon.templates:1001 24 | msgid "" 25 | "USA [ Enter the country (in uppercase and in English) where your language is " 26 | "mostly spoken, for example FRANCE for French ]" 27 | msgstr "SPAIN" 28 | 29 | #. Type: select 30 | #. Description 31 | #. Translators: Enter the country (in uppercase and in English) where your 32 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 33 | #. German 34 | #: ../sl-modem-daemon.templates:1002 35 | msgid "Location of the modem:" 36 | msgstr "Modemaren kokalekua:" 37 | 38 | #. Type: select 39 | #. Description 40 | #. Translators: Enter the country (in uppercase and in English) where your 41 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 42 | #. German 43 | #: ../sl-modem-daemon.templates:1002 44 | msgid "" 45 | "Indicate the country in which your modem is located. Please select the " 46 | "telephone system used in your country." 47 | msgstr "" 48 | "Zehaztu modem-a kokaturik dagoen estatua. Mesedez hautatu zure estatuan " 49 | "erabiltzen den telefono-sistema." 50 | -------------------------------------------------------------------------------- /debian/po/pl.po: -------------------------------------------------------------------------------- 1 | # Translation of sl-modem debconf templates to Polish. 2 | # Copyright (C) 2009 3 | # This file is distributed under the same license as the sl-modem package. 4 | # 5 | # Michał Kułach , 2012. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: \n" 9 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 11 | "PO-Revision-Date: 2012-04-01 20:57+0200\n" 12 | "Last-Translator: Michał Kułach \n" 13 | "Language-Team: Polish \n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Language: pl\n" 18 | "X-Generator: Lokalize 1.2\n" 19 | "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " 20 | "|| n%100>=20) ? 1 : 2);\n" 21 | 22 | #. Type: select 23 | #. Default 24 | #: ../sl-modem-daemon.templates:1001 25 | msgid "" 26 | "USA [ Enter the country (in uppercase and in English) where your language is " 27 | "mostly spoken, for example FRANCE for French ]" 28 | msgstr "POLAND" 29 | 30 | #. Type: select 31 | #. Description 32 | #. Translators: Enter the country (in uppercase and in English) where your 33 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 34 | #. German 35 | #: ../sl-modem-daemon.templates:1002 36 | msgid "Location of the modem:" 37 | msgstr "Położenie modemu:" 38 | 39 | #. Type: select 40 | #. Description 41 | #. Translators: Enter the country (in uppercase and in English) where your 42 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 43 | #. German 44 | #: ../sl-modem-daemon.templates:1002 45 | msgid "" 46 | "Indicate the country in which your modem is located. Please select the " 47 | "telephone system used in your country." 48 | msgstr "" 49 | "Proszę wybrać kraj położenia modemu. Proszę wybrać system telefoniczny " 50 | "używany w kraju użytkownika." 51 | 52 | -------------------------------------------------------------------------------- /debian/po/pt_BR.po: -------------------------------------------------------------------------------- 1 | # sl-modem Brazilian Portuguese translation. 2 | # Copyright (C) 2010 sl-modem COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the sl-modem package. 4 | # Marco Juliano e Silva , 2011. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: sl-modem 2.9.11~20110321-4\n" 9 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 11 | "PO-Revision-Date: 2011-11-09 08:58-0200\n" 12 | "Last-Translator: Marco Juliano e Silva \n" 13 | "Language-Team: Brazilian Portuguese \n" 15 | "Language: pt_BR\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=2; plural=(n!=1);\n" 20 | 21 | #. Type: select 22 | #. Default 23 | #: ../sl-modem-daemon.templates:1001 24 | msgid "" 25 | "USA [ Enter the country (in uppercase and in English) where your language is " 26 | "mostly spoken, for example FRANCE for French ]" 27 | msgstr "" 28 | "BRAZIL" 29 | 30 | #. Type: select 31 | #. Description 32 | #. Translators: Enter the country (in uppercase and in English) where your 33 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 34 | #. German 35 | #: ../sl-modem-daemon.templates:1002 36 | msgid "Location of the modem:" 37 | msgstr "Localização do modem:" 38 | 39 | #. Type: select 40 | #. Description 41 | #. Translators: Enter the country (in uppercase and in English) where your 42 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 43 | #. German 44 | #: ../sl-modem-daemon.templates:1002 45 | msgid "" 46 | "Indicate the country in which your modem is located. Please select the " 47 | "telephone system used in your country." 48 | msgstr "" 49 | "Indique o país no qual seu modem está localizado. Por favor, selecione o " 50 | "sistema de telefonia usado em seu país." 51 | -------------------------------------------------------------------------------- /debian/po/da.po: -------------------------------------------------------------------------------- 1 | # Danish translation sl-modem. 2 | # Copyright (C) 2010 sl-modem & nedenstående oversættere. 3 | # This file is distributed under the same license as the sl-modem package. 4 | # Morten Brix Pedersen , 2004. 5 | # Joe Hansen , 2010. 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: sl-modem\n" 10 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 11 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 12 | "PO-Revision-Date: 2010-06-17 17:30+01:00\n" 13 | "Last-Translator: Joe Hansen \n" 14 | "Language-Team: Danish \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. Type: select 21 | #. Default 22 | #: ../sl-modem-daemon.templates:1001 23 | msgid "" 24 | "USA [ Enter the country (in uppercase and in English) where your language is " 25 | "mostly spoken, for example FRANCE for French ]" 26 | msgstr "" 27 | "USA [ Indtast landet (med store bogstaver og på engelsk) hvor dit sprog er " 28 | "mest udbredt, for eksempel FRANCE for fransk ]" 29 | 30 | #. Type: select 31 | #. Description 32 | #. Translators: Enter the country (in uppercase and in English) where your 33 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 34 | #. German 35 | #: ../sl-modem-daemon.templates:1002 36 | msgid "Location of the modem:" 37 | msgstr "Placering af modemmet:" 38 | 39 | #. Type: select 40 | #. Description 41 | #. Translators: Enter the country (in uppercase and in English) where your 42 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 43 | #. German 44 | #: ../sl-modem-daemon.templates:1002 45 | msgid "" 46 | "Indicate the country in which your modem is located. Please select the " 47 | "telephone system used in your country." 48 | msgstr "" 49 | "I hvilket land er dette modem placeret? Vælg telefonsystemet brugt i dit " 50 | "land." 51 | -------------------------------------------------------------------------------- /patches/marv.diff: -------------------------------------------------------------------------------- 1 | --- drivers/amrmo_init.c.orig 2008-03-31 01:43:53.000000000 -0400 2 | +++ drivers/amrmo_init.c 2008-03-31 01:39:39.000000000 -0400 3 | @@ -159,16 +159,11 @@ 4 | #define PCI_VENDOR_ID_PCTEL 0x134d 5 | #define PCI_DEVICE_ID_HSP1688 0x2189 6 | 7 | -/* Analogue Devices Inc. 11d4:1805, Motorola proxy */ 8 | -#define PCI_VENDOR_ID_ANALOGUE 0x11d4 9 | -#define PCI_DEVICE_ID_ANALOGUE 0x1805 10 | - /* 14e4:4212 BROADCOM */ 11 | -#define PCI_VENDOR_ID_BROADCOM 0x14e4 12 | -#define PCI_DEVICE_ID_BROADCOM 0x4212 13 | - 14 | /* Motorola section */ 15 | -#define PCI_VENDOR_ID_MOTOROLA 0x1057 16 | -#define PCI_DEVICE_ID_MOTOROLA 0x5600 17 | +#define PCI_VENDOR_ID_MOTOROLA 0x1057 18 | + 19 | +/* Silicon Instruments */ 20 | +#define PCI_VENDOR_ID_SILICON 0x1543 21 | 22 | enum { 23 | ALS300_CARD = 1, 24 | @@ -185,7 +180,8 @@ 25 | SL1500_CARD, 26 | SL1801_CARD, 27 | SL1900_CARD, 28 | - SL2800_CARD 29 | + SL2800_CARD, 30 | + SL1543_CARD 31 | }; 32 | 33 | 34 | @@ -243,17 +239,14 @@ 35 | "SL1500", 36 | "ALI545A", 37 | "SL1900", 38 | - "SL2800" 39 | + "SL2800", 40 | + "SL1543" 41 | }; 42 | 43 | 44 | static struct pci_device_id amrmo_pci_tbl [] __devinitdata = { 45 | - {PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BROADCOM, /* Broadcom 14e4:4212 */ 46 | - PCI_ANY_ID, PCI_ANY_ID, 0, 0, SL1900_CARD}, 47 | - {PCI_VENDOR_ID_ANALOGUE, PCI_DEVICE_ID_ANALOGUE, /* Analogue 11d4:1805 */ 48 | - PCI_ANY_ID, PCI_ANY_ID, 0, 0, SL1900_CARD}, 49 | - {PCI_VENDOR_ID_MOTOROLA, PCI_DEVICE_ID_MOTOROLA, /* Motorola 1057:5600 */ 50 | - PCI_ANY_ID, PCI_ANY_ID, 0, 0, SL1900_CARD}, 51 | + {PCI_VENDOR_ID_SILICON, PCI_DEVICE_ID_SL1900, /* SiliconInstr SL1543:3052 */ 52 | + PCI_ANY_ID, PCI_ANY_ID, 0, 0, SL1543_CARD}, 53 | {PCI_VENDOR_ID_MOTOROLA, PCI_DEVICE_ID_SL1900, /* Motorola 1057:3052 */ 54 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, SL1900_CARD}, 55 | {PCI_VENDOR_ID_SMARTLINK_1, PCI_DEVICE_ID_SL1900, /* 163c:3052 */ 56 | -------------------------------------------------------------------------------- /debian/po/ru.po: -------------------------------------------------------------------------------- 1 | # translation of ru.po to Russian 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the sl-modem package. 4 | # 5 | # Yuri Kozlov , 2008. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: sl-modem 2.9.11~20080817-2\n" 9 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 11 | "PO-Revision-Date: 2009-01-29 19:31+0300\n" 12 | "Last-Translator: Sergey Alyoshin \n" 13 | "Language-Team: Russian \n" 14 | "Language: ru\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: KBabel 1.11.4\n" 19 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 20 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 21 | 22 | #. Type: select 23 | #. Default 24 | #: ../sl-modem-daemon.templates:1001 25 | msgid "" 26 | "USA [ Enter the country (in uppercase and in English) where your language is " 27 | "mostly spoken, for example FRANCE for French ]" 28 | msgstr "RUSSIA" 29 | 30 | #. Type: select 31 | #. Description 32 | #. Translators: Enter the country (in uppercase and in English) where your 33 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 34 | #. German 35 | #: ../sl-modem-daemon.templates:1002 36 | msgid "Location of the modem:" 37 | msgstr "Местонахождение модема:" 38 | 39 | #. Type: select 40 | #. Description 41 | #. Translators: Enter the country (in uppercase and in English) where your 42 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 43 | #. German 44 | #: ../sl-modem-daemon.templates:1002 45 | msgid "" 46 | "Indicate the country in which your modem is located. Please select the " 47 | "telephone system used in your country." 48 | msgstr "" 49 | "Указывает страну, в которой находится модем. Выберите систему телефонии, " 50 | "используемую в вашей стране." 51 | -------------------------------------------------------------------------------- /debian/po/de.po: -------------------------------------------------------------------------------- 1 | # Translation of sl-modem debconf templates to German 2 | # Copyright (C) Eduard Bloch 3 | # Copyright (C) Helge Kreutzmann , 2007, 2008. 4 | # This file is distributed under the same license as the caudium package. 5 | # 6 | # Thomas Mueller , 2009. 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: de\n" 10 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 11 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 12 | "PO-Revision-Date: 2009-01-28 10:20+0100\n" 13 | "Last-Translator: Thomas Mueller \n" 14 | "Language-Team: deutsch \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. Type: select 21 | #. Default 22 | #: ../sl-modem-daemon.templates:1001 23 | msgid "" 24 | "USA [ Enter the country (in uppercase and in English) where your language is " 25 | "mostly spoken, for example FRANCE for French ]" 26 | msgstr "" 27 | "GERMANY [ Geben Sie den Namen des Landes ein (in Großbuchstaben und auf " 28 | "Englisch), in dem Ihre Sprache hauptsächlich gesprochen wird. Z.B. GERMANY " 29 | "für Deutsch." 30 | 31 | #. Type: select 32 | #. Description 33 | #. Translators: Enter the country (in uppercase and in English) where your 34 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 35 | #. German 36 | #: ../sl-modem-daemon.templates:1002 37 | msgid "Location of the modem:" 38 | msgstr "Standort des Modems:" 39 | 40 | #. Type: select 41 | #. Description 42 | #. Translators: Enter the country (in uppercase and in English) where your 43 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 44 | #. German 45 | #: ../sl-modem-daemon.templates:1002 46 | msgid "" 47 | "Indicate the country in which your modem is located. Please select the " 48 | "telephone system used in your country." 49 | msgstr "" 50 | "Geben Sie an, in welchem Land sich Ihr Modem befindet. Bitte wählen Sie das " 51 | "Telefon-System Ihres Landes aus." 52 | -------------------------------------------------------------------------------- /debian/patches/device_create_changes.diff: -------------------------------------------------------------------------------- 1 | Description: Fix device_create call for linux kernel >= 2.6.27 2 | * Also fixed device_create call for linux kernel >= 2.6.25 (two arguments were switched together !!!) 3 | * Used proper indentation to make things clear 4 | Author: أحمد المحمودي (Ahmed El-Mahmoudy) 5 | Bug-Debian: http://bugs.debian.org/651781 6 | Forwarded: yes 7 | --- a/drivers/st7554.c 8 | +++ b/drivers/st7554.c 9 | @@ -219,19 +219,23 @@ 10 | #define CLASS_DEVICE_DESTROY(class, dev) class_simple_device_remove(dev) 11 | #define CLASS_CREATE(owner, name) class_simple_create(owner, name) 12 | static struct class_simple *st7554_class; 13 | -#else 14 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) 15 | -#define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) device_create(class, dev, device, fmt, rest) 16 | +#else /* ! FOUND_CLASS_SIMPLE */ 17 | +# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) 18 | +# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) 19 | +#define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) device_create(class, device, dev, NULL, fmt, rest) 20 | +# else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) */ 21 | +#define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) device_create(class, device, dev, fmt, rest) 22 | +# endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) */ 23 | #define CLASS_DEVICE_DESTROY(class, dev) device_destroy(class, dev) 24 | -#else 25 | +# else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) */ 26 | #include 27 | #define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_device_create(class, dev, device, fmt, rest) 28 | #define CLASS_DEVICE_DESTROY(class, dev) class_device_destroy(class, dev) 29 | -#endif 30 | +# endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) */ 31 | #define CLASS_DESTROY(class) class_destroy(class) 32 | #define CLASS_CREATE(owner, name) class_create(owner, name) 33 | static struct class *st7554_class; 34 | -#endif 35 | +#endif /* FOUND_CLASS_SIMPLE */ 36 | 37 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) 38 | static DECLARE_MUTEX(open_sem); 39 | -------------------------------------------------------------------------------- /scripts/slmodemd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # slmodemd: Starts the SmartLink Modem Daemon 4 | # 5 | # chkconfig: 345 90 10 6 | # description: This is the user space part of the SmartLink Modem driver 7 | # processname: slmodemd 8 | # config: /etc/sysconfig/slmodem 9 | 10 | # Source function library. 11 | . /etc/init.d/functions 12 | 13 | prog=slmodemd 14 | RETVAL=0 15 | 16 | # Default configuration 17 | SLMODEMD_DEVICE=slamr0 18 | SLMODEMD_COUNTRY=USA 19 | 20 | # Source configuration 21 | CONFIG=/etc/sysconfig/$prog 22 | if [ -f $CONFIG ]; then 23 | . $CONFIG 24 | # override default group and permissions if defined in $CONFIG; 25 | # other valid options also can be put into SLMODEMD_OPTS variable 26 | [ "$GROUP" ] && SLMODEMD_OPTS="$SLMODEMD_OPTS --group=$GROUP" 27 | [ "$PERMS" ] && SLMODEMD_OPTS="$SLMODEMD_OPTS --perm=$PERMS" 28 | fi 29 | 30 | # uncomment this if you want this feature (if necessary edit module pattern): 31 | # do not try to start on a kernel which does not support it 32 | # grep -q 'slamr\..*o' /lib/modules/`uname -r`/modules.dep || exit 0 33 | 34 | start() { 35 | echo -n "Starting SmartLink Modem driver for $SLMODEMD_DEVICE: " 36 | $prog /dev/null 2>/dev/null \ 37 | --country=$SLMODEMD_COUNTRY $SLMODEMD_OPTS /dev/$SLMODEMD_DEVICE & 38 | RETVAL=$? 39 | [ $RETVAL -eq 0 ] && success $"$prog startup" || failure $"$prog startup" 40 | echo 41 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog 42 | return $RETVAL 43 | } 44 | 45 | stop() { 46 | echo -n "Shutting down SmartLink Modem driver: " 47 | killproc $prog 48 | RETVAL=$? 49 | [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog 50 | return $RETVAL 51 | } 52 | 53 | # See how we were called. 54 | case "$1" in 55 | start) 56 | start 57 | ;; 58 | stop) 59 | stop 60 | ;; 61 | status) 62 | status $prog 63 | RETVAL=$? 64 | ;; 65 | restart|reload) 66 | stop 67 | start 68 | RETVAL=$? 69 | ;; 70 | condrestart) 71 | if [ -f /var/lock/subsys/$prog ]; then 72 | stop 73 | start 74 | RETVAL=$? 75 | fi 76 | ;; 77 | *) 78 | echo "*** Usage: $prog {start|stop|status|restart|condrestart}" 79 | exit 1 80 | esac 81 | 82 | exit $RETVAL 83 | 84 | -------------------------------------------------------------------------------- /debian/po/ja.po: -------------------------------------------------------------------------------- 1 | # 2 | # Translators, if you are not familiar with the PO format, gettext 3 | # documentation is worth reading, especially sections dedicated to 4 | # this format, e.g. by running: 5 | # info -n '(gettext)PO Files' 6 | # info -n '(gettext)Header Entry' 7 | # 8 | # Some information specific to po-debconf are available at 9 | # /usr/share/doc/po-debconf/README-trans 10 | # or http://www.debian.org/intl/l10n/po-debconf/README-trans 11 | # 12 | # Developers do not need to manually edit POT or PO files. 13 | # 14 | # 15 | msgid "" 16 | msgstr "" 17 | "Project-Id-Version: 2.9.11~20080817-4\n" 18 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 19 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 20 | "PO-Revision-Date: 2009-03-07 12:20+0900\n" 21 | "Last-Translator: Hideki Yamane (Debian-JP) \n" 22 | "Language-Team: Japanese \n" 23 | "Language: ja\n" 24 | "MIME-Version: 1.0\n" 25 | "Content-Type: text/plain; charset=UTF-8\n" 26 | "Content-Transfer-Encoding: 8bit\n" 27 | 28 | #. Type: select 29 | #. Default 30 | #: ../sl-modem-daemon.templates:1001 31 | msgid "" 32 | "USA [ Enter the country (in uppercase and in English) where your language is " 33 | "mostly spoken, for example FRANCE for French ]" 34 | msgstr "" 35 | "JAPAN [ 例えばフランス語の場合は FRANCE というように、良く話されている言語 の" 36 | "国を (英語、アルファベット大文字で) 入力してください ]" 37 | 38 | #. Type: select 39 | #. Description 40 | #. Translators: Enter the country (in uppercase and in English) where your 41 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 42 | #. German 43 | #: ../sl-modem-daemon.templates:1002 44 | msgid "Location of the modem:" 45 | msgstr "モデムの設置場所:" 46 | 47 | #. Type: select 48 | #. Description 49 | #. Translators: Enter the country (in uppercase and in English) where your 50 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 51 | #. German 52 | #: ../sl-modem-daemon.templates:1002 53 | msgid "" 54 | "Indicate the country in which your modem is located. Please select the " 55 | "telephone system used in your country." 56 | msgstr "" 57 | "モデムが設置されている国を大文字のアルファベットで指定してください (例: " 58 | "JAPAN)。あなたの国で利用されている電話通信システムを選んでください。" 59 | -------------------------------------------------------------------------------- /debian/README.Debian: -------------------------------------------------------------------------------- 1 | sl-modem for Debian 2 | ------------------- 3 | 4 | Please see README for a description of the sl-modem software. 5 | 6 | The Debian sl-modem source package provides the package sl-modem-dkms, which 7 | provides the source for the kernel modules 8 | 9 | If your system got DKMS, then the final modules from sl-modem-dkms are 10 | automatically built and there is no need to go in the following section. 11 | 12 | -- أحمد المحمودي (Ahmed El-Mahmoudy) Sat, 21 Oct 2008 17:32:22 +0200 13 | 14 | To manually build the final modules from sl-modem-dkms, change to the 15 | /usr/src/sl-modem- directory and build as the README file instructs 16 | using "make; make install". This will build and install a module specific to 17 | the system you are building on and is not under control of the packaging 18 | system. 19 | 20 | Why is sl-modem-dkms in non-free? 21 | ----------------------------------- 22 | 23 | Because one part of the driver source is not available. Instead, a 24 | precompiled binary object is provided (probably to protect the 25 | Intellectual Property of the vendor). If you don't like it, feel free to 26 | use the ALSA driver which is based on the publicly available 27 | specification. Though, some features are not supported there (no 28 | ability to detect ring, speaker does not work, etc.). 29 | 30 | -- Eduard Bloch Wed, 14 Apr 2004 11:23:41 +0200 31 | 32 | Troubleshooting 33 | --------------- 34 | 35 | If the modem seems to respond to AT commands but fails to connect, the reason 36 | could be that ACPI disabled its interrupt during the boot process. Try to look 37 | in your dmesg: if you'll find a line like this 38 | 39 | ACPI: PCI interrupt for device 0000:00:1f.6 disabled 40 | 41 | verify with lspci -n that the device matches your modem. If it matches you're 42 | very likely experiencing this issue: the kernel has loaded the slamr module at 43 | boot, before the interrupt was disabled. 44 | 45 | A workaround consists in blacklisting the slamr module - please see 46 | modprobe.conf (5) - thus avoiding automatic module load at boot: the 47 | initscript will care module loading later. 48 | 49 | -- Maurizio Avogadro Fri, 03 Oct 2008 15:23:53 +0100 50 | -------------------------------------------------------------------------------- /debian/po/cs.po: -------------------------------------------------------------------------------- 1 | # 2 | # Translators, if you are not familiar with the PO format, gettext 3 | # documentation is worth reading, especially sections dedicated to 4 | # this format, e.g. by running: 5 | # info -n '(gettext)PO Files' 6 | # info -n '(gettext)Header Entry' 7 | # 8 | # Some information specific to po-debconf are available at 9 | # /usr/share/doc/po-debconf/README-trans 10 | # or http://www.debian.org/intl/l10n/po-debconf/README-trans 11 | # 12 | # Developers do not need to manually edit POT or PO files. 13 | # 14 | msgid "" 15 | msgstr "" 16 | "Project-Id-Version: sl-modem\n" 17 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 18 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 19 | "PO-Revision-Date: 2009-01-31 17:08+0100\n" 20 | "Last-Translator: Miroslav Kure \n" 21 | "Language-Team: Czech \n" 22 | "Language: cs\n" 23 | "MIME-Version: 1.0\n" 24 | "Content-Type: text/plain; charset=UTF-8\n" 25 | "Content-Transfer-Encoding: 8bit\n" 26 | 27 | #. Type: select 28 | #. Default 29 | #: ../sl-modem-daemon.templates:1001 30 | msgid "" 31 | "USA [ Enter the country (in uppercase and in English) where your language is " 32 | "mostly spoken, for example FRANCE for French ]" 33 | msgstr "CZECH REPUBLIC" 34 | 35 | #. Type: select 36 | #. Description 37 | #. Translators: Enter the country (in uppercase and in English) where your 38 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 39 | #. German 40 | #: ../sl-modem-daemon.templates:1002 41 | msgid "Location of the modem:" 42 | msgstr "Geografická poloha modemu:" 43 | 44 | #. Type: select 45 | #. Description 46 | #. Translators: Enter the country (in uppercase and in English) where your 47 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 48 | #. German 49 | #: ../sl-modem-daemon.templates:1002 50 | msgid "" 51 | "Indicate the country in which your modem is located. Please select the " 52 | "telephone system used in your country." 53 | msgstr "" 54 | "Vyberte zemi, ve které je tento modem umístěn. Vyberte prosím telefonní " 55 | "systém používaný ve vaší zemi." 56 | 57 | #~ msgid "USA" 58 | #~ msgstr "USA" 59 | 60 | #~ msgid "_list_" 61 | #~ msgstr "_list_" 62 | -------------------------------------------------------------------------------- /debian/po/sv.po: -------------------------------------------------------------------------------- 1 | # translation of sl-modem_2.9.9d+e-pre2-11.1_sv.po to swedish 2 | # Translators, if you are not familiar with the PO format, gettext 3 | # documentation is worth reading, especially sections dedicated to 4 | # this format, e.g. by running: 5 | # info -n '(gettext)PO Files' 6 | # info -n '(gettext)Header Entry' 7 | # Some information specific to po-debconf are available at 8 | # /usr/share/doc/po-debconf/README-trans 9 | # or http://www.debian.org/intl/l10n/po-debconf/README-trans 10 | # Developers do not need to manually edit POT or PO files. 11 | # 12 | # Martin Bagge , 2008. 13 | msgid "" 14 | msgstr "" 15 | "Project-Id-Version: sl-modem_2.9.9d+e-pre2-11.1_sv\n" 16 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 17 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 18 | "PO-Revision-Date: 2009-01-31 13:33+0100\n" 19 | "Last-Translator: Martin Bagge \n" 20 | "Language-Team: swedish \n" 21 | "Language: \n" 22 | "MIME-Version: 1.0\n" 23 | "Content-Type: text/plain; charset=UTF-8\n" 24 | "Content-Transfer-Encoding: 8bit\n" 25 | "X-Generator: KBabel 1.11.4\n" 26 | 27 | #. Type: select 28 | #. Default 29 | #: ../sl-modem-daemon.templates:1001 30 | msgid "" 31 | "USA [ Enter the country (in uppercase and in English) where your language is " 32 | "mostly spoken, for example FRANCE for French ]" 33 | msgstr "SWEDEN" 34 | 35 | #. Type: select 36 | #. Description 37 | #. Translators: Enter the country (in uppercase and in English) where your 38 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 39 | #. German 40 | #: ../sl-modem-daemon.templates:1002 41 | msgid "Location of the modem:" 42 | msgstr "Plats för modemet:" 43 | 44 | #. Type: select 45 | #. Description 46 | #. Translators: Enter the country (in uppercase and in English) where your 47 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 48 | #. German 49 | #: ../sl-modem-daemon.templates:1002 50 | msgid "" 51 | "Indicate the country in which your modem is located. Please select the " 52 | "telephone system used in your country." 53 | msgstr "Välj det telefonsystem som används i det land modemet befinner sig." 54 | 55 | #~ msgid "USA" 56 | #~ msgstr "USA" 57 | -------------------------------------------------------------------------------- /debian/sl-modem-daemon.bug-script: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | WvDialConf=/etc/wvdial.conf 4 | Fax= 5 | Dialup= 6 | 7 | yesno "Is there a problem with dialup ? [y/N] " nop 8 | [ $REPLY = "nop" ] || Dialup=1 9 | yesno "Is there a problem with fax ? [y/N] " nop 10 | [ $REPLY = "nop" ] || Fax=1 11 | 12 | if [ $Fax ]; then 13 | [ ! -r /etc/default/sl-modem-daemon ] || . /etc/default/sl-modem-daemon 14 | # Check if sl-modem is configured for ALSA mode: 15 | if echo $SLMODEMD_DEVICE | grep : > /dev/null \ 16 | || echo $OPTS | grep alsa > /dev/null; then 17 | printf "\nsl-modem is configured for ALSA mode, yet fax does not work with ALSA mode\n\n" 18 | [ -z $Dialup ] || exit 1; 19 | fi 20 | if ! lsmod | grep '\(slamr\|slusb\)' > /dev/null \ 21 | && [ $SLMODEMD_DEVICE = "auto" ]; then 22 | printf \ 23 | " 24 | SLMODEM_DEVICE is set to auto, and neither slamr nor slusb is loaded, please 25 | explicitly set SLMODEM_DEVICE to slamr ( or slusb if you are using a USB 26 | modem), and try again before continuing with this bug report. 27 | 28 | " 29 | fi 30 | fi 31 | 32 | if [ $Dialup ]; then 33 | printf "\nIt is recommended to test with wvdial before continuing with this bug report\n" 34 | yesno "Did you try dialup using wvdial utility ? [y/N] " nop 35 | if [ $REPLY = "yep" ]; then 36 | printf \ 37 | " 38 | Please enter the path to wvdial configuration file, by default it is 39 | /etc/wvdial.conf, note that this file will be included in the bug report after 40 | removing Username and Password fields 41 | " 42 | read 43 | [ -z $REPLY ] || [ ! -r $REPLY ] || WvDialConf=$REPLY 44 | fi 45 | fi 46 | 47 | [ -z $Dialup ] || echo "Problem with dialup" >&3 48 | [ -z $Fax ] || echo "Problem with fax" >&3 49 | 50 | for f in /proc/version_signature /etc/default/sl-modem-daemon /proc/asound/* /var/log/slmodem.log; do 51 | echo ============ $f =============== 52 | cat $f 53 | done >&3 54 | 55 | for c in 'lspci -vvnn' 'lsmod' 'lsusb' \ 56 | 'ls -l /dev/ttySL* /dev/pts/* /dev/slamr* /dev/slusb*'; do 57 | echo ============ "$c" =============== 58 | $c 59 | done >&3 60 | 61 | if [ $Dialup -a -r $WvDialConf ]; then 62 | echo ============ WvDial Conf =============== >&3 63 | sed -e '/^\s*\(Password\|Username\)/ d' $WvDialConf >&3 64 | fi 65 | -------------------------------------------------------------------------------- /scripts/mandrake/slmodemd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # slmodemd: Starts the SmartLink Modem Daemon 4 | # 5 | # chkconfig: 345 90 10 6 | # description: SmartLink Modem : Autoload slarm + slmodem 7 | # processname: slmodemd 8 | # config: /etc/sysconfig/slmodem 9 | 10 | # Source function library. 11 | . /etc/init.d/functions 12 | 13 | prog=slmodemd 14 | RETVAL=0 15 | 16 | # Default configuration 17 | SLMODEMD_DEVICE=slamr0 18 | SLMODEMD_COUNTRY=ITALY 19 | 20 | # Source configuration 21 | CONFIG=/etc/sysconfig/$prog 22 | if [ -f $CONFIG ]; then 23 | . $CONFIG 24 | fi 25 | 26 | # uncomment this if you want this feature (if necessary edit module pattern): 27 | # do not try to start on a kernel which does not support it 28 | # grep -q 'slamr\.o' /lib/modules/`uname -r`/modules.dep || exit 0 29 | 30 | start() { 31 | cat /proc/modules | grep 'slamr' >/dev/null || { 32 | echo -n "Loading SmartLink Modem driver into kernel ... " 33 | modprobe slamr && echo "done." || { 34 | echo "failed." 35 | exit -1 36 | } 37 | } 38 | echo -n "Starting SmartLink Modem driver for $SLMODEMD_DEVICE: " 39 | # if you want ALSA comment next line and uncomment last 40 | $prog /dev/null 2>/dev/null --country=$SLMODEMD_COUNTRY /dev/$SLMODEMD_DEVICE & 41 | # $prog /dev/null 2>/dev/null --country=$SLMODEMD_COUNTRY --alsa /dev/$SLMODEMD_DEVICE & 42 | RETVAL=$? 43 | [ $RETVAL -eq 0 ] && success $"$prog startup" || failure $"$prog startup" 44 | echo 45 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog 46 | return $RETVAL 47 | } 48 | 49 | stop() { 50 | echo -n "Shutting down SmartLink Modem driver: " 51 | killproc $prog 52 | RETVAL=$? 53 | modprobe -r slamr slusb 54 | echo 55 | [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog 56 | return $RETVAL 57 | } 58 | 59 | # See how we were called. 60 | case "$1" in 61 | start) 62 | start 63 | ;; 64 | stop) 65 | stop 66 | ;; 67 | status) 68 | status $prog 69 | RETVAL=$? 70 | ;; 71 | restart|reload) 72 | stop 73 | start 74 | RETVAL=$? 75 | ;; 76 | condrestart) 77 | if [ -f /var/lock/subsys/$prog ]; then 78 | stop 79 | start 80 | RETVAL=$? 81 | fi 82 | ;; 83 | *) 84 | echo "*** Usage: $prog {start|stop|status|restart|condrestart}" 85 | exit 1 86 | esac 87 | 88 | exit $RETVAL 89 | -------------------------------------------------------------------------------- /debian/patches/01_Makefile.diff: -------------------------------------------------------------------------------- 1 | Cleanup to not loose the user-specified version string and blindly try include 2 | modversions.h 3 | By: Eduard Bloch 4 | Index: sl-modem-2.9.11~20090222/Makefile 5 | =================================================================== 6 | --- sl-modem-2.9.11~20090222.orig/Makefile 2008-03-29 14:04:16.000000000 +0200 7 | +++ sl-modem-2.9.11~20090222/Makefile 2009-02-26 08:37:16.000000000 +0200 8 | @@ -13,11 +13,15 @@ 9 | # 10 | ########################################################################### 11 | 12 | -KERNEL_DIR:=/lib/modules/$(shell uname -r)/build 13 | +KERNEL_DIR?=/lib/modules/$(shell uname -r)/build 14 | 15 | # tools 16 | INSTALL:=install 17 | - 18 | +# Definitions 19 | +MODULES_DIR = /lib/modules/$(KVERS)/misc 20 | +MODEM_DEV := ttySL0 21 | +MODEM_LINK := modem 22 | +MODULES_CONF:= /etc/modules.conf 23 | all: modem 24 | 25 | modem: 26 | Index: sl-modem-2.9.11~20090222/drivers/Makefile 27 | =================================================================== 28 | --- sl-modem-2.9.11~20090222.orig/drivers/Makefile 2009-02-23 00:20:58.000000000 +0200 29 | +++ sl-modem-2.9.11~20090222/drivers/Makefile 2009-02-26 08:37:16.000000000 +0200 30 | @@ -45,8 +45,14 @@ 31 | ifndef KERNELRELEASE 32 | ifndef KERNEL_VER 33 | 34 | + 35 | +KVERS?=$(shell ./kernel-ver) 36 | + 37 | + 38 | + 39 | all install uninstall: kernel-ver 40 | - $(MAKE) $@ KERNEL_VER=$(shell ./kernel-ver) 41 | + $(MAKE) $@ KERNEL_VER=$(KVERS) 42 | +# $(MAKE) $@ KERNEL_VER=$(shell ./kernel-ver) 43 | 44 | install: install-devices 45 | uninstall: remove-devices 46 | @@ -80,9 +86,9 @@ 47 | 48 | slusb-objs:= old_st7554.o 49 | obj:=. 50 | -module-dir:=${DESTDIR}/lib/modules/$(KERNEL_VER)/misc 51 | +module-dir ?= ${DESTDIR}/lib/modules/$(KERNEL_VER)/misc 52 | 53 | -CFLAGS:= -Wall -pipe -O3 -fomit-frame-pointer -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DMODVERSIONS --include $(KERNEL_DIR)/include/linux/modversions.h -I$(KERNEL_DIR)/include $(FOUND_CLASS_SIMPLE) 54 | +CFLAGS:= -Wall -pipe -O3 -fomit-frame-pointer -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB `test -f $(KERNEL_DIR)/include/linux/modversions.h && echo -DMODVERSIONS --include $(KERNEL_DIR)/include/linux/modversions.h -I$(KERNEL_DIR)/include` $(FOUND_CLASS_SIMPLE) 55 | 56 | all: $(obj-m) 57 | 58 | -------------------------------------------------------------------------------- /faxing/1stRead.txt: -------------------------------------------------------------------------------- 1 | 2 | The scripts in this folder were provided by Jean-Pierre Demailly. 3 | The test modem is on a High Definition Audio card: 4 | Class 0403: 8086:284b Audio device: Intel Corporation 82801H 5 | Primary PCI_id 8086:284b 6 | Subsystem PCI_id 103c:30cc 7 | hosting Motorola chip 0x1057305 8 | 9 | The software for Microsoft provided by Motorola has a sm56 designation. 10 | However the applicability of the Jean-Pierre's scripts most likely extends 11 | to any modem supportable with the slmodemd helper utility. 12 | Some modifications of the scripts may be necessary for these other modems. 13 | -------------- 14 | http://linmodems.technion.ac.il/bigarch/archive-eighth/msg00594.html 15 | 16 | Hi: 17 | 18 | Thanks to your previous help, I have been able to get my winmodem 19 | Smartlink SM56 to work at least partially on my x86_64 laptop 20 | (with a 64 bit kernel). However, some tweaks were necessary : 21 | 22 | 1. The slmodem package fails to compile properly from scratch because 23 | * the Makefile forgets to uses the -m32 option to force compilation 24 | in 32 bit (necessary because of needed ld with 32 bit blobs) 25 | * the slamr driver which is pure 32 bit cannot be compiled on a 26 | a 64 bit machine, and so the Makefile should disable this 27 | automatically. I enclose a Makefile which includes this test. 28 | 29 | 2. After tweaking as in 1), compilation of slmodemd in 32bit mode is 30 | successful and I could call 31 | slmodem -c FRANCE --alsa hw:0,6 32 | (as this seems to be appropriate in my case). 33 | Then device /dev/ttySL0 is created 34 | 35 | However, when trying using to use the modem, I first got an error 36 | period size 48 not supported by playback (64) 37 | (already reported by many people). Things improved a lot by using 38 | the "Hell labs patch" enclosed - it seems that a test fax (class 1) 39 | was succesfully sent. Maybe the change should be implemented in the 40 | next iteration of slmodemd and enabled/disabled through the use of an 41 | ad hoc option. 42 | 43 | I also got French Minitel (V23 mode) almost working - the initializing 44 | escape code is probably still not OK as the echo of keys was garbled. 45 | In addition, there is not sound on dialing - maybe the hell labs patch 46 | simply disables error after failure of using ALSA. Alsa support 47 | obviously has to be fixed for SM56 on 64 bit machines. 48 | 49 | Here is where I am - it seems pretty close to be made to work, but not 50 | there yet ! 51 | 52 | Regards, 53 | Jean-Pierre Demailly 54 | -------------------------------------------------------------------------------- /modem/Makefile: -------------------------------------------------------------------------------- 1 | ########################################################################### 2 | # 3 | # 4 | # Makefile -- modem application Makefile. 5 | # 6 | # Copyright(c) 2003, Smart Link Ltd. (www.smlink.com) 7 | # All rights reserved. 8 | # 9 | # Author: Sasha K (sashak@smlink.com) 10 | # 11 | # 12 | ########################################################################### 13 | # 14 | ########################################################################### 15 | 16 | ARCH64:=$(shell uname -m | sed -e '/amd64/s//x86_64/' | grep -c x86_64) 17 | 18 | ifeq ($(ARCH64), 0) 19 | CC:= gcc 20 | else 21 | # SUPPORT_ALSA:=1 22 | CC:= gcc -m32 23 | endif 24 | 25 | RM:= rm -f 26 | 27 | CFLAGS+= -Wall -g -O -I. -DCONFIG_DEBUG_MODEM 28 | 29 | modem-objs:= \ 30 | modem.o modem_datafile.o modem_at.o modem_timer.o \ 31 | modem_pack.o modem_ec.o modem_comp.o \ 32 | modem_param.o modem_debug.o homolog_data.o 33 | dp-objs:= dp_sinus.o dp_dummy.o 34 | sysdep-objs:= sysdep_common.o 35 | all-objs:= modem_cmdline.o $(modem-objs) $(dp-objs) dsplibs.o $(sysdep-objs) 36 | 37 | all: slmodemd modem_test 38 | 39 | slmodemd: modem_main.o $(all-objs) 40 | modem_test: modem_test.o $(all-objs) 41 | 42 | ifdef SUPPORT_ALSA 43 | CFLAGS+= -DSUPPORT_ALSA=1 44 | ifeq ($(ARCH64), 0) 45 | LFLAGS+= /usr/lib/libasound.so 46 | else 47 | # LFLAGS+= /usr/lib32/libasound.so , replaced by -l commands search for asound 48 | LFLAGS+= -lasound 49 | endif 50 | endif 51 | 52 | slmodemd: 53 | $(CC) -o slmodemd modem_main.o $(all-objs) $(LFLAGS) 54 | 55 | modem_test: 56 | $(CC) -o modem_test modem_test.o $(all-objs) $(LFLAGS) 57 | 58 | clean: 59 | $(RM) slmodemd modem_test modem_main.o modem_cmdline.o modem_test.o $(modem-objs) $(dp-objs) $(sysdep-objs) 60 | $(RM) *~ *.orig *.rej 61 | 62 | .PHONY: all dep generic-dep clean clean-build-profile 63 | 64 | 65 | # 66 | # rules 67 | # 68 | 69 | %.o: %.c .build_profile 70 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -o $@ -c $< 71 | 72 | dep: generic-dep 73 | generic-dep: 74 | $(RM) .depend 75 | $(foreach src,$(wildcard *.c),$(CC) -M $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(src:.c=.o)) -c $(src) >> .depend ;) 76 | 77 | -include .depend 78 | 79 | # build_profile 80 | -include .build_profile 81 | 82 | .build_profile:: 83 | ifneq ($(CFLAGS),$(PROFILE_CFLAGS)) 84 | @if [ "$(CFLAGS) $(EXTRA_CFLAGS)" != "$(PROFILE_CFLAGS)" ] ; then \ 85 | echo "rebuild profile..." ; \ 86 | echo "PROFILE_CFLAGS=$(CFLAGS) $(EXTRA_CFLAGS)" > $(@) ; fi 87 | endif 88 | 89 | clean: clean-build-profile 90 | clean-build-profile: 91 | @$(RM) -f .build_profile 92 | 93 | -------------------------------------------------------------------------------- /modem/Makefile.20080401: -------------------------------------------------------------------------------- 1 | ########################################################################### 2 | # 3 | # 4 | # Makefile -- modem application Makefile. 5 | # 6 | # Copyright(c) 2003, Smart Link Ltd. (www.smlink.com) 7 | # All rights reserved. 8 | # 9 | # Author: Sasha K (sashak@smlink.com) 10 | # 11 | # 12 | ########################################################################### 13 | # 14 | ########################################################################### 15 | 16 | ARCH64:=$(shell uname -m | sed -e '/amd64/s//x86_64/' | grep -c x86_64) 17 | 18 | ifeq ($(ARCH64), 0) 19 | CC:= gcc 20 | else 21 | # SUPPORT_ALSA:=1 22 | CC:= gcc -m32 23 | endif 24 | 25 | RM:= rm -f 26 | 27 | CFLAGS+= -Wall -g -O -I. -DCONFIG_DEBUG_MODEM 28 | 29 | modem-objs:= \ 30 | modem.o modem_datafile.o modem_at.o modem_timer.o \ 31 | modem_pack.o modem_ec.o modem_comp.o \ 32 | modem_param.o modem_debug.o homolog_data.o 33 | dp-objs:= dp_sinus.o dp_dummy.o 34 | sysdep-objs:= sysdep_common.o 35 | all-objs:= modem_cmdline.o $(modem-objs) $(dp-objs) dsplibs.o $(sysdep-objs) 36 | 37 | all: slmodemd modem_test 38 | 39 | slmodemd: modem_main.o $(all-objs) 40 | modem_test: modem_test.o $(all-objs) 41 | 42 | ifdef SUPPORT_ALSA 43 | CFLAGS+= -DSUPPORT_ALSA=1 44 | ifeq ($(ARCH64), 0) 45 | LFLAGS+= /usr/lib/libasound.so 46 | else 47 | # LFLAGS+= /usr/lib32/libasound.so , replaced by -l commands search for asound 48 | LFLAGS+= -lasound 49 | endif 50 | endif 51 | 52 | slmodemd: 53 | $(CC) -o slmodemd modem_main.o $(all-objs) $(LFLAGS) 54 | 55 | modem_test: 56 | $(CC) -o modem_test modem_test.o $(all-objs) $(LFLAGS) 57 | 58 | clean: 59 | $(RM) slmodemd modem_test modem_main.o modem_cmdline.o modem_test.o $(modem-objs) $(dp-objs) $(sysdep-objs) 60 | $(RM) *~ *.orig *.rej 61 | 62 | .PHONY: all dep generic-dep clean clean-build-profile 63 | 64 | 65 | # 66 | # rules 67 | # 68 | 69 | %.o: %.c .build_profile 70 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -o $@ -c $< 71 | 72 | dep: generic-dep 73 | generic-dep: 74 | $(RM) .depend 75 | $(foreach src,$(wildcard *.c),$(CC) -M $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(src:.c=.o)) -c $(src) >> .depend ;) 76 | 77 | -include .depend 78 | 79 | # build_profile 80 | -include .build_profile 81 | 82 | .build_profile:: 83 | ifneq ($(CFLAGS),$(PROFILE_CFLAGS)) 84 | @if [ "$(CFLAGS) $(EXTRA_CFLAGS)" != "$(PROFILE_CFLAGS)" ] ; then \ 85 | echo "rebuild profile..." ; \ 86 | echo "PROFILE_CFLAGS=$(CFLAGS) $(EXTRA_CFLAGS)" > $(@) ; fi 87 | endif 88 | 89 | clean: clean-build-profile 90 | clean-build-profile: 91 | @$(RM) -f .build_profile 92 | 93 | -------------------------------------------------------------------------------- /modem/modem_timer.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * 4 | * Copyright (c) 2002, Smart Link Ltd. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above 14 | * copyright notice, this list of conditions and the following 15 | * disclaimer in the documentation and/or other materials provided 16 | * with the distribution. 17 | * 3. Neither the name of the Smart Link Ltd. nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | * 33 | */ 34 | 35 | /* 36 | * 37 | * modem_timer.h -- definitions for simple timer. 38 | * 39 | * Author: Sasha K (sashak@smlink.com) 40 | * 41 | * 42 | */ 43 | 44 | #ifndef __MODEM_TIMER_H__ 45 | #define __MODEM_TIMER_H__ 46 | 47 | 48 | #define MODEM_HZ 100 49 | 50 | struct timer { 51 | struct timer *next; 52 | unsigned added; 53 | unsigned expires; 54 | void (*func)(void *); 55 | void *data; 56 | }; 57 | 58 | 59 | #define time_before(t1,t2) ((long)((t2)-(t1)) > 0) 60 | #define time_after(t1,t2) (!time_before(t1,t2)) 61 | 62 | unsigned long get_time(void); 63 | 64 | extern void timer_init(struct timer *t); 65 | extern int timer_add(struct timer *t); 66 | extern int timer_del(struct timer *t); 67 | 68 | extern int modem_timer_init(void); 69 | 70 | #endif /* __MODEM_TIMER_H__ */ 71 | -------------------------------------------------------------------------------- /scripts/suse/slmodemd.SUSE: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ### BEGIN INIT INFO 4 | # Provides: slmodemd 5 | # Required-Start: $syslog $remote_fs 6 | # Required-Stop: $syslog 7 | # Default-Start: 3 5 8 | # Default-Stop: 0 1 2 6 9 | # Short-Description: slmodem daemon 10 | # Description: Start slmodem daemon for smartlink 11 | # softmodem driver. 12 | ### END INIT INFO 13 | 14 | # Check for missing daemon 15 | SLMODEMD_BIN=/usr/sbin/slmodemd 16 | if [ ! -x $SLMODEMD_BIN ]; then 17 | echo "slmodemd: $SLMODEMD_BIN not found" 18 | exit 5 19 | fi 20 | 21 | # Check for config file in /etc/sysconfig 22 | # if not using default config 23 | SLMODEMD_CONFIG=/etc/sysconfig/slmodemd 24 | if [ ! -r $SLMODEMD_CONFIG ]; then 25 | echo "slmodemd: $SLMODEMD_CONFIG not found - using default config" 26 | SLMODEMD_DEVICE=/dev/slamr0 27 | SLMODEMD_COUNTRY=GERMANY 28 | else 29 | . $SLMODEMD_CONFIG 30 | fi 31 | 32 | # Check for kernel modules 33 | case `echo "$SLMODEMD_DEVICE"|cut -c6-10` in 34 | slamr) 35 | grep -q 'slamr\..*o' /lib/modules/`uname -r`/modules.dep || \ 36 | { echo "slmodemd: kernel module slamr.(k)o missing"; exit 1; } 37 | ;; 38 | slusb) 39 | grep -q 'slusb\..*o' /lib/modules/`uname -r`/modules.dep || \ 40 | { echo "slmodemd: kernel module slusb.(k)o missing"; exit 1; } 41 | ;; 42 | *) 43 | echo "slmodemd: no kernel module for $SLMODEMD_DEVICE - broken config?" 44 | exit 1 45 | ;; 46 | esac 47 | 48 | 49 | # Source SUSE rc functions and reset 50 | . /etc/rc.status 51 | rc_reset 52 | 53 | case "$1" in 54 | start) 55 | echo -n "Starting slmodemd" 56 | # loading modules also required for restart 57 | if [ "`echo "$SLMODEMD_DEVICE"|cut -c6-10`" == "slamr" ]; then 58 | modprobe slamr 59 | else 60 | modprobe slusb 61 | fi 62 | startproc $SLMODEMD_BIN --country=$SLMODEMD_COUNTRY $SLMODEMD_DEVICE > /dev/null 2>&1 63 | rc_status -v 64 | ;; 65 | stop) 66 | echo -n "Shutting down slmodemd" 67 | killproc -TERM $SLMODEMD_BIN 68 | modprobe -r slamr slusb 69 | rc_status -v 70 | ;; 71 | reload|restart) 72 | $0 stop 73 | $0 start 74 | rc_status 75 | ;; 76 | try-restart) 77 | # only restart if already running 78 | if [ "`$0 status > /dev/null 2>&1`" == "0" ]; then 79 | $0 restart 80 | else 81 | echo "slmodemd not running" 82 | fi 83 | rc_status 84 | ;; 85 | status) 86 | echo -n "slmodemd is:" 87 | checkproc $SLMODEMD_BIN 88 | rc_status -v 89 | ;; 90 | *) 91 | echo "Usage: $0 {start|stop|reload|restart|try-restart|status}" 92 | exit 1 93 | ;; 94 | esac 95 | rc_exit 96 | 97 | 98 | -------------------------------------------------------------------------------- /debian/source_sl-modem.py: -------------------------------------------------------------------------------- 1 | 2 | def add_info(report, ui): 3 | tags = [] 4 | WvDialConf = None 5 | Dialup = ui.yesno("Is there a problem with dialup ?") 6 | Fax = ui.yesno("Is there a problem with fax ?") 7 | 8 | if Fax == True: 9 | tags.append("fax") 10 | SLModemdDevice = command_output(['[ ! -r /etc/default/sl-modem-daemon ] || (. /etc/default/sl-modem-daemon ; echo $SLMODEMD_DEVICE)']) 11 | SLModemdOpts = command_output(['[ ! -r /etc/default/sl-modem-daemon ] || (. /etc/default/sl-modem-daemon ; echo $OPTS)']) 12 | if (':' in SLModemdDevice) or ('alsa' in SLModemdOpts): 13 | ui.information("sl-modem is configured for ALSA mode, yet fax does not work with ALSA mode") 14 | # If there isn't a problem with dialup, then abort the bug report: 15 | if Dialup != True: 16 | raise StopIteration 17 | 18 | lsmod_out = command_output(['lsmod']) 19 | if not 'slusb' in lsmod_out and not 'slamr' in lsmod_out and SLModemdDevice == 'auto': 20 | ui.information("SLMODEM_DEVICE is set to auto, and neither slamr nor slusb is loaded, please explicitly set SLMODEM_DEVICE to slamr ( or slusb if you are using a USB modem), and try again before continuing with this bug report.") 21 | 22 | 23 | if Dialup == True: 24 | tags.append("dialup") 25 | response = ui.yesno("It is recommended to test with wvdial before continuing with this bug report. Did you try dialup using wvdial utility ?") 26 | 27 | if response == True: 28 | WvDialConf = ui.file("Please enter the path to wvdial configuration file, by default it is /etc/wvdial.conf, note that this file will be included in the bug report after removing Username and Password fields") 29 | if WvDialConf == None: #user cancelled 30 | if os.path.isfile('/etc/wvdial.conf'): 31 | WvDialConf = '/etc/wvdial.conf' 32 | 33 | report.setdefault('Tags', '') 34 | report['Tags'] += ' ' + ' '.join(tags) 35 | 36 | attach_conffiles(report, 'sl-modem-daemon') 37 | attach_alsa(report) 38 | attach_related_packages(report, [ 39 | "sl-modem-dkms" 40 | ]) 41 | report['Lsmod'] = command_output(['lsmod']) 42 | attach_file_if_exists(report, "/var/log/slmodemd/slmodem.log") 43 | report['Lspci'] = command_output(['lspci','-vvnn']) 44 | report['Lsusb'] = command_output(['lsusb']) 45 | attach_file(report, '/proc/version_signature', 'ProcVersionSignature') 46 | report['DevNodes'] = command_output(['sh', '-c', 47 | 'ls -l /dev/ttySL* /dev/pts/* /dev/slamr* /dev/slusb*']) 48 | 49 | if Dialup == True and WvDialConf != None: 50 | report['WvDialConf'] = command_output(['sed', '-e', 51 | '/^\s*\(Password\|Username\)/ d', WvDialConf]) 52 | 53 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 2 | Upstream-Name: slmodem 3 | Upstream-Contact: Marvin Stodolsky 4 | Source: http://linmodems.technion.ac.il/packages/smartlink/ 5 | Comment: 6 | This package ships two 32-bit binary blobs (modem/dsplibs.o and 7 | drivers/amrlibs.o) for which no source is provided. Consequently, 8 | the package is in non-free in Debian. Sl-Modem is released under BSD 9 | and there should not be any legal issues with autobuilding the package. 10 | cf. http://lists.debian.org/debian-devel-announce/2006/11/msg00012.html 11 | 12 | Files: * 13 | Copyright: 2002, Smart Link Ltd. 14 | License: BSD-3-clause 15 | 16 | Files: debian/* 17 | Copyright: 2003-2008 Eduard Bloch 18 | 2008-2015 أحمد المحمودي (Ahmed El-Mahmoudy) 19 | 2010 Rolf Leggewie 20 | License: BSD-3-clause 21 | 22 | License: BSD-3-clause 23 | Copyright (c) 2002, Smart Link Ltd. 24 | All rights reserved. 25 | . 26 | Redistribution and use in source and binary forms, with or without 27 | modification, are permitted provided that the following conditions 28 | are met: 29 | . 30 | 1. Redistributions of source code must retain the above copyright 31 | notice, this list of conditions and the following disclaimer. 32 | 2. Redistributions in binary form must reproduce the above 33 | copyright notice, this list of conditions and the following 34 | disclaimer in the documentation and/or other materials provided 35 | with the distribution. 36 | 3. Neither the name of the Smart Link Ltd. nor the names of its 37 | contributors may be used to endorse or promote products derived 38 | from this software without specific prior written permission. 39 | . 40 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 41 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 42 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 43 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 44 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 46 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 47 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 48 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 49 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 50 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 51 | 52 | -------------------------------------------------------------------------------- /debian/po/es.po: -------------------------------------------------------------------------------- 1 | # sl-modem po-debconf translation to Spanish 2 | # Copyright (C) 2008, 2010 Software in the Public Interest 3 | # This file is distributed under the same license as the sl-modem package. 4 | # 5 | # Changes: 6 | # - Initial translation 7 | # Maximiliano Marin Bustos , 2008 8 | # 9 | # - Updates 10 | # Francisco Javier Cuadrado , 2010 11 | # 12 | # Traductores, si no conocen el formato PO, merece la pena leer la 13 | # documentación de gettext, especialmente las secciones dedicadas a este 14 | # formato, por ejemplo ejecutando: 15 | # info -n '(gettext)PO Files' 16 | # info -n '(gettext)Header Entry' 17 | # 18 | # Equipo de traducción al español, por favor lean antes de traducir 19 | # los siguientes documentos: 20 | # 21 | # - El proyecto de traducción de Debian al español 22 | # http://www.debian.org/intl/spanish/ 23 | # especialmente las notas y normas de traducción en 24 | # http://www.debian.org/intl/spanish/notas 25 | # 26 | # - La guía de traducción de po's de debconf: 27 | # /usr/share/doc/po-debconf/README-trans 28 | # o http://www.debian.org/intl/l10n/po-debconf/README-trans 29 | # 30 | msgid "" 31 | msgstr "" 32 | "Project-Id-Version: sl-modem 2.9.11~20100303-2\n" 33 | "Report-Msgid-Bugs-To: sl-modem@packages.debian.org\n" 34 | "POT-Creation-Date: 2009-01-28 06:51+0200\n" 35 | "PO-Revision-Date: 2010-03-30 12:32+0100\n" 36 | "Last-Translator: Francisco Javier Cuadrado \n" 37 | "Language-Team: Debian l10n Spanish \n" 38 | "Language: \n" 39 | "MIME-Version: 1.0\n" 40 | "Content-Type: text/plain; charset=UTF-8\n" 41 | "Content-Transfer-Encoding: 8bit\n" 42 | 43 | #. Type: select 44 | #. Default 45 | #: ../sl-modem-daemon.templates:1001 46 | msgid "" 47 | "USA [ Enter the country (in uppercase and in English) where your language is " 48 | "mostly spoken, for example FRANCE for French ]" 49 | msgstr "SPAIN" 50 | 51 | #. Type: select 52 | #. Description 53 | #. Translators: Enter the country (in uppercase and in English) where your 54 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 55 | #. German 56 | #: ../sl-modem-daemon.templates:1002 57 | msgid "Location of the modem:" 58 | msgstr "Ubicación del módem:" 59 | 60 | #. Type: select 61 | #. Description 62 | #. Translators: Enter the country (in uppercase and in English) where your 63 | #. language is mostly spoken, for example FRANCE for French or GERMANY for 64 | #. German 65 | #: ../sl-modem-daemon.templates:1002 66 | msgid "" 67 | "Indicate the country in which your modem is located. Please select the " 68 | "telephone system used in your country." 69 | msgstr "" 70 | "Indique el país en el que está instalado su módem. Por favor, seleccione el " 71 | "sistema telefónico utilizado en su país." 72 | 73 | #~ msgid "USA" 74 | #~ msgstr "SPAIN" 75 | -------------------------------------------------------------------------------- /patches/modem_20100303.patch: -------------------------------------------------------------------------------- 1 | diff -ur orig/slmodem-2.9.11-20100106/drivers/amrmo_init.c slmodem-2.9.11-20100106/drivers/amrmo_init.c 2 | --- orig/slmodem-2.9.11-20100106/drivers/amrmo_init.c 2008-04-01 05:08:42.000000000 +0300 3 | +++ slmodem-2.9.11-20100106/drivers/amrmo_init.c 2010-03-04 06:25:33.297133596 +0200 4 | @@ -434,12 +434,17 @@ 5 | 6 | 7 | 8 | -static int amrmo_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) 9 | +static int amrmo_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long parg) 10 | { 11 | struct amrmo_struct *amrmo = (struct amrmo_struct *)file->private_data; 12 | unsigned long flags; 13 | int ret; 14 | unsigned stat; 15 | + unsigned long arg=0; 16 | + 17 | + cmd -= 100000; 18 | + if (parg) 19 | + copy_from_user(&arg, (unsigned long *)parg, sizeof(arg)); 20 | AMRMO_DBG("amrmo_ioctl: cmd %x, arg %lx...\n",cmd,arg); 21 | switch (cmd) 22 | { 23 | @@ -448,7 +453,7 @@ 24 | stat = amrmo->status; 25 | amrmo->status = 0; 26 | spin_unlock_irqrestore(&amrmo->lock,flags); 27 | - if (put_user(stat, (unsigned *) arg)) 28 | + if (put_user(stat, (unsigned *) parg)) 29 | return -EFAULT; 30 | return 0; 31 | case MDMCTL_START: 32 | diff -ur orig/slmodem-2.9.11-20100106/modem/modem_main.c slmodem-2.9.11-20100106/modem/modem_main.c 33 | --- orig/slmodem-2.9.11-20100106/modem/modem_main.c 2008-08-04 04:40:13.000000000 +0300 34 | +++ slmodem-2.9.11-20100106/modem/modem_main.c 2010-03-04 06:17:48.366253090 +0200 35 | @@ -552,14 +552,14 @@ 36 | int ret; 37 | DBG("modemap_start...\n"); 38 | dev->delay = 0; 39 | - ret = ioctl(dev->fd,MDMCTL_START,0); 40 | + ret = ioctl(dev->fd,100000+MDMCTL_START,0); 41 | if (ret < 0) 42 | return ret; 43 | ret = 192*2; 44 | memset(outbuf, 0 , ret); 45 | ret = write(dev->fd, outbuf, ret); 46 | if (ret < 0) { 47 | - ioctl(dev->fd,MDMCTL_STOP,0); 48 | + ioctl(dev->fd,100000+MDMCTL_STOP,0); 49 | return ret; 50 | } 51 | dev->delay = ret/2; 52 | @@ -570,7 +570,7 @@ 53 | { 54 | struct device_struct *dev = m->dev_data; 55 | DBG("modemap_stop...\n"); 56 | - return ioctl(dev->fd,MDMCTL_STOP,0); 57 | + return ioctl(dev->fd,100000+MDMCTL_STOP,0); 58 | } 59 | 60 | static int modemap_ioctl(struct modem *m, unsigned int cmd, unsigned long arg) 61 | @@ -580,7 +580,7 @@ 62 | DBG("modemap_ioctl: cmd %x, arg %lx...\n",cmd,arg); 63 | if (cmd == MDMCTL_SETFRAG) 64 | arg <<= MFMT_SHIFT(m->format); 65 | - ret = ioctl(dev->fd,cmd,arg); 66 | + ret = ioctl(dev->fd,cmd+100000,&arg); 67 | if (cmd == MDMCTL_IODELAY && ret > 0) { 68 | ret >>= MFMT_SHIFT(m->format); 69 | ret += dev->delay; 70 | @@ -810,7 +810,7 @@ 71 | continue; 72 | } 73 | #endif 74 | - ret = ioctl(dev->fd,MDMCTL_GETSTAT,&stat); 75 | + ret = ioctl(dev->fd,100000+MDMCTL_GETSTAT,&stat); 76 | if(ret < 0) { 77 | ERR("dev ioctl: %s\n",strerror(errno)); 78 | return -1; 79 | 80 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: sl-modem 2 | Section: non-free/misc 3 | Priority: optional 4 | Maintainer: أحمد المحمودي (Ahmed El-Mahmoudy) 5 | Uploaders: Maurizio Avogadro , Rolf Leggewie 6 | Build-Depends: debhelper (>= 9), bzip2, libasound2-dev (>> 1.0.6), po-debconf, execstack, dkms (>= 2.1.1.2-1~) 7 | Standards-Version: 3.9.6 8 | Homepage: http://linmodems.technion.ac.il/packages/smartlink/ 9 | Vcs-Git: git://anonscm.debian.org/collab-maint/sl-modem.git 10 | Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/sl-modem.git 11 | XS-Autobuild: yes 12 | 13 | Package: sl-modem-dkms 14 | Section: non-free/kernel 15 | Architecture: i386 amd64 16 | Depends: ${misc:Depends} 17 | Recommends: linux-headers-686-pae | linux-headers-amd64 | linux-headers-generic 18 | Replaces: sl-modem-source (<< 2.9.11~20110321-7) 19 | Breaks: sl-modem-source (<< 2.9.11~20110321-7) 20 | Description: SmartLink software modem driver - module building source 21 | This package contains source code for the low-level drivers for the 22 | software modems produced by Smart Link Ltd. It supports PCI and USB models. 23 | . 24 | In addition to this package, you will need the package sl-modem-daemon 25 | which implements the application part of the driver. 26 | . 27 | Module packages can be built for the custom kernel package either by hand or 28 | using DKMS. 29 | 30 | Package: sl-modem-daemon 31 | Architecture: i386 32 | Depends: ${misc:Depends}, ${shlibs:Depends}, debconf | debconf-2.0, adduser, alsa-utils, lsb-base (>= 3.0-6) 33 | Provides: slmodem 34 | Conflicts: sl-modem-modules 35 | Breaks: sl-modem-source (<< 2.9.11~20080817) 36 | Description: SmartLink software modem daemon 37 | The SmartLink modem daemon is the application part of the 38 | driver for recent modems produced by Smart Link Ltd. 39 | . 40 | This package replaces (along with hardware access drivers) the old 41 | driver generation (2.7.x) which consisted of kernel modules only. 42 | . 43 | It needs a kernel driver to access the hardware. This can be either 44 | recent ALSA (shipped with a newer kernel (>=2.6.4) with ALSA support 45 | and snd-intel8x0m module) which is sufficient for basic operation and 46 | data/Internet connection, or the SmartLink kernel driver which is 47 | provided by separate packages which you can build using the source from 48 | the sl-modem-dkms package. 49 | 50 | Package: sl-modem-source 51 | Architecture: all 52 | Depends: ${misc:Depends}, sl-modem-dkms 53 | Section: non-free/oldlibs 54 | Priority: extra 55 | Description: SmartLink software modem driver (dummy transitional package) 56 | This package contains source code for the low-level drivers for the 57 | software modems produced by Smart Link Ltd. It supports PCI and USB models. 58 | . 59 | In addition to this package, you will need the package sl-modem-daemon 60 | which implements the application part of the driver. 61 | . 62 | Module packages can be built for the custom kernel package either by hand or 63 | using DKMS. 64 | . 65 | This is a dummy transitional package that will ensure a proper upgrade path. 66 | This package may be safely removed after upgrading. 67 | 68 | -------------------------------------------------------------------------------- /scripts/debian/slmodemd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # slmodemd: Starts the SmartLink Modem Daemon 4 | # 5 | # chkconfig: 345 90 10 6 | # description: This is the user space part of the SmartLink Modem driver 7 | # processname: slmodemd 8 | # config: /etc/sysconfig/slmodem 9 | 10 | # Source function library. 11 | #. /etc/init.d/functions 12 | 13 | NAME=slmodemd 14 | DAEMON=/usr/sbin/slmodemd 15 | PIDFILE=/var/run/$NAME.pid 16 | RETVAL=0 17 | 18 | # Default configuration 19 | SLMODEMD_DEVICE=slamr0 20 | SLMODEMD_COUNTRY=USA 21 | 22 | # Test presence of daemon binary 23 | test -f $DAEMON || exit 0 24 | 25 | # Source configuration 26 | CONFIG=/etc/default/$NAME 27 | if [ -f $CONFIG ]; then 28 | . $CONFIG 29 | else 30 | echo " 31 | # 32 | # This is the default configuration for the slmodem driver daemon 33 | # running on Debian systems. 34 | # 35 | # Edit device node and country code here ... 36 | # 37 | # possible country codes are: 38 | # 39 | # USA 40 | # GERMANY 41 | # BELGIUM 42 | # etc. 43 | # 44 | # use \'$DAEMON --countrylist\' to check out other countries 45 | # 46 | 47 | SLMODEMD_DEVICE=$SLMODEMD_DEVICE 48 | SLMODEMD_COUNTRY=$SLMODEMD_COUNTRY 49 | " > $CONFIG 50 | fi 51 | 52 | # uncomment this if you want this feature (if necessary edit module pattern): 53 | # do not try to start on a kernel which does not support it 54 | grep 'slamr\..*o' /lib/modules/`uname -r`/modules.dep > /dev/null || { \ 55 | 56 | echo "SmartLink modem driver not supported by Kernel `uname -r`. Exiting ..." 57 | exit 0 58 | 59 | } 60 | 61 | start() { 62 | cat /proc/modules | grep 'slamr' >/dev/null || { 63 | echo -n "Loading SmartLink Modem driver into kernel ... " 64 | modprobe slamr && echo "done." || { i 65 | echo "failed." 66 | exit -1 67 | } 68 | } 69 | echo -n "Starting SmartLink Modem driver for: $SLMODEMD_DEVICE" 70 | start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON --make-pidfile --background --quiet -- -c $SLMODEMD_COUNTRY /dev/$SLMODEMD_DEVICE 71 | RETVAL=$? 72 | } 73 | 74 | stop() { 75 | echo -n "Shutting down SmartLink Modem driver normally" 76 | ps -A | grep $NAME >/dev/null 2>/dev/null && { 77 | start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON || 78 | { 79 | echo " probably failed." 80 | echo -n "Trying it the hard way (send SIGKILL all $NAME processes): " 81 | killall -KILL $NAME 82 | /bin/true 83 | RETVAL=0 84 | } 85 | } || { echo -n " ... no $NAME daemon running"; RETVAL=0; } 86 | 87 | } 88 | 89 | # See how we were called. 90 | case "$1" in 91 | start) 92 | start 93 | ;; 94 | stop) 95 | stop 96 | ;; 97 | restart|reload) 98 | stop 99 | echo "" 100 | rm $PIDFILE 101 | start 102 | ;; 103 | *) 104 | echo "Usage: /etc/init.d/$NAME {start|stop|restart}" 105 | exit 1 106 | esac 107 | 108 | 109 | if [ $? == 0 ]; then 110 | echo "." 111 | if [ $1 == "stop" ]; then 112 | rm $PIDFILE &>/dev/null 113 | fi 114 | exit 0 115 | else 116 | echo " failed." 117 | exit -1 118 | fi 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /modem/modem_dp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2002, Smart Link Ltd. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials provided 15 | * with the distribution. 16 | * 3. Neither the name of the Smart Link Ltd. nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | */ 33 | 34 | /* 35 | * 36 | * modem_dp.h - modem data pumps interface definitions 37 | * 38 | * Author: sashak@smlink.com 39 | */ 40 | 41 | #ifndef __MODEM_DP_H__ 42 | #define __MODEM_DP_H__ 43 | 44 | #include 45 | 46 | 47 | /* 48 | * type definitions 49 | * 50 | */ 51 | 52 | 53 | /* data pump operations structure */ 54 | struct dp_operations { 55 | const char *name; 56 | int use_count; 57 | /* dp interface */ 58 | struct dp *(*create)(struct modem *, enum DP_ID id, 59 | int caller, int srate, int max_frag, 60 | struct dp_operations *); 61 | int (*delete)(struct dp *); 62 | int (*process)(struct dp *, void *in, void *out, int cnt); 63 | int (*hangup)(struct dp *); 64 | }; 65 | 66 | /* data pump structure */ 67 | struct dp { 68 | enum DP_ID id; 69 | struct modem *modem; 70 | unsigned status; 71 | struct dp_operations *op; 72 | void *dp_data; 73 | }; 74 | 75 | 76 | /* 77 | * prototypes 78 | * 79 | */ 80 | 81 | /* bit interface */ 82 | extern int modem_get_bits(struct modem *m, int nbits, u8 *buf, int n); 83 | extern int modem_put_bits(struct modem *m, int nbits, u8 *buf, int n); 84 | 85 | /* modem dp registration */ 86 | extern int modem_dp_register(enum DP_ID id, struct dp_operations *op); 87 | extern void modem_dp_deregister(enum DP_ID id, struct dp_operations *op); 88 | 89 | 90 | #endif /* __MODEM_DP_H__ */ 91 | 92 | -------------------------------------------------------------------------------- /patches/zello.diff: -------------------------------------------------------------------------------- 1 | diff -r -u slmodem-2.9.11-20070813/drivers/amrmo_init.c slmodem-new/drivers/amrmo_init.c 2 | --- slmodem-2.9.11-20070813/drivers/amrmo_init.c 2008-03-26 23:40:54.000000000 +0100 3 | +++ slmodem-new/drivers/amrmo_init.c 2008-03-29 13:04:16.000000000 +0100 4 | @@ -92,6 +92,9 @@ 5 | 6 | #define MAXNUM 4 7 | 8 | +#ifndef IRQF_SHARED 9 | +#define IRQF_SHARED SA_SHIRQ 10 | +#endif 11 | 12 | /* modem cards ids list */ 13 | 14 | @@ -617,7 +620,7 @@ 15 | } 16 | } 17 | 18 | - ret = request_irq(amrmo->irq, &amrmo_pci_interrupt,SA_SHIRQ, 19 | + ret = request_irq(amrmo->irq, &amrmo_pci_interrupt,IRQF_SHARED, 20 | amrmo->name,amrmo); 21 | if(ret) { 22 | printk(KERN_ERR "slamr: failed request_irq\n"); 23 | @@ -757,7 +760,8 @@ 24 | #ifdef OLD_KERNEL 25 | pci_for_each_dev(dev) { 26 | #else 27 | - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { 28 | + /*while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {*/ 29 | + while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { 30 | #endif 31 | if(pci_match_id(amrmo_pci_tbl, dev) && 32 | pci_dev_driver(dev)) { 33 | @@ -782,7 +786,11 @@ 34 | printk("slamr: device %04x:%04x is grabbed by another driver\n", 35 | dev->vendor,dev->device); 36 | #endif 37 | + 38 | } 39 | +#ifndef OLD_KERNEL 40 | + pci_dev_put(dev); 41 | +#endif 42 | } 43 | 44 | #ifndef OLD_KERNEL 45 | diff -r -u slmodem-2.9.11-20070813/modem/modem_ec.c slmodem-new/modem/modem_ec.c 46 | --- slmodem-2.9.11-20070813/modem/modem_ec.c 2008-03-29 12:59:49.000000000 +0100 47 | +++ slmodem-new/modem/modem_ec.c 2008-03-29 13:04:16.000000000 +0100 48 | @@ -720,7 +720,7 @@ 49 | f = l->info_list; 50 | if(!l->modem->get_chars) 51 | return 0; 52 | - n = l->modem->get_chars(l->modem,f->buf+3,l->tx_info_size); 53 | + n = l->modem->get_chars(l->modem,(char*)(f->buf+3),l->tx_info_size); 54 | if (n < 0) { /* error */ 55 | EC_ERR("tx_info: get chars error.\n"); 56 | modem_update_status(l->modem,STATUS_EC_ERROR); 57 | @@ -807,7 +807,7 @@ 58 | return; 59 | if (l->rx_count && l->modem->put_chars) { 60 | int ret = l->modem->put_chars(l->modem, 61 | - l->rx_buf+l->rx_head, 62 | + (const char*)(l->rx_buf+l->rx_head), 63 | l->rx_count); 64 | if (ret > 0) { 65 | l->rx_head += ret; 66 | @@ -857,7 +857,7 @@ 67 | /* recv data */ 68 | 69 | if(l->modem->put_chars) 70 | - ret = l->modem->put_chars(l->modem,f->buf+3,f->count-3); 71 | + ret = l->modem->put_chars(l->modem,(const char*)(f->buf+3),f->count-3); 72 | if(ret<0) { 73 | /* FIXME: handle error*/ ; 74 | } 75 | diff -r -u slmodem-2.9.11-20070813/modem/modem_pack.c slmodem-new/modem/modem_pack.c 76 | --- slmodem-2.9.11-20070813/modem/modem_pack.c 2008-03-29 12:58:07.000000000 +0100 77 | +++ slmodem-new/modem/modem_pack.c 2008-03-29 13:04:16.000000000 +0100 78 | @@ -97,7 +97,7 @@ 79 | if (bit_cnt <= 0) 80 | break; 81 | /* get char */ 82 | - if (!m->get_chars || m->get_chars(m, &ch, 1) != 1) 83 | + if (!m->get_chars || m->get_chars(m, (char*)&ch, 1) != 1) 84 | break; 85 | REVERSE_BITS(ch); 86 | s->data <<= CHAR_SIZE(m); 87 | @@ -145,7 +145,7 @@ 88 | s->bit-= CHAR_SIZE(m); 89 | REVERSE_BITS(ch); 90 | if (m->put_chars) 91 | - m->put_chars(m,&ch,1); 92 | + m->put_chars(m,(const char*)&ch,1); 93 | } 94 | } 95 | return ret; 96 | -------------------------------------------------------------------------------- /scripts/slmodemd.ubuntu.italy: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # slmodemd: Starts the SmartLink Modem Daemon 4 | # 5 | # chkconfig: 345 90 10 6 | # description: This is the user space part of the SmartLink Modem driver 7 | # processname: slmodemd 8 | # config: /etc/sysconfig/slmodem 9 | 10 | # Source function library. 11 | #. /etc/init.d/functions 12 | 13 | NAME=slmodemd 14 | DAEMON=/usr/sbin/slmodemd 15 | PIDFILE=/var/run/$NAME.pid 16 | RETVAL=0 17 | 18 | . /lib/lsb/init-functions 19 | 20 | # Default configuration 21 | SLMODEMD_DEVICE=slamr0 22 | SLMODEMD_COUNTRY=ITALY 23 | 24 | # Test presence of daemon binary 25 | test -f $DAEMON || exit 0 26 | 27 | # Source configuration 28 | CONFIG=/etc/default/$NAME 29 | if [ -f $CONFIG ]; then 30 | . $CONFIG 31 | else 32 | echo " 33 | # 34 | # This is the default configuration for the slmodem driver daemon 35 | # running on Debian systems. 36 | # 37 | # Edit device node and country code here ... 38 | # 39 | # possible country codes are: 40 | # 41 | # USA 42 | # GERMANY 43 | # BELGIUM 44 | # etc. 45 | # 46 | # use \'$DAEMON --countrylist\' to check out other countries 47 | # 48 | 49 | SLMODEMD_DEVICE=$SLMODEMD_DEVICE 50 | SLMODEMD_COUNTRY=$SLMODEMD_COUNTRY 51 | " > $CONFIG 52 | fi 53 | 54 | # uncomment this if you want this feature (if necessary edit module pattern): 55 | # do not try to start on a kernel which does not support it 56 | grep 'slamr\..*o' /lib/modules/`uname -r`/modules.dep > /dev/null || { \ 57 | 58 | echo "SmartLink modem driver not supported by Kernel `uname -r`. Exiting ..." 59 | exit 0 60 | 61 | } 62 | 63 | start() { 64 | cat /proc/modules | grep 'slamr' >/dev/null || { 65 | #echo -n "Loading SmartLink Modem driver into kernel ... " 66 | log_begin_msg "Loading Smartlink Modem Driver into kernel ..." 67 | modprobe slamr && echo "done." || { i 68 | #echo "failed." 69 | log_end_msg 1 70 | exit -1 71 | } 72 | } 73 | #echo -n "Starting SmartLink Modem driver for: $SLMODEMD_DEVICE" 74 | log_begin_msg "Starting SmartLink Modem driver for: $SLMODEMD_DEVICE" 75 | start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON --make-pidfile --background --quiet -- -c $SLMODEMD_COUNTRY 76 | #RETVAL=$? 77 | log_end_msg $? 78 | } 79 | 80 | stop() { 81 | log_begin_msg "Shutting down SmartLink Modem driver normally" 82 | ps -A | grep $NAME >/dev/null 2>/dev/null && { 83 | start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON || 84 | { 85 | log_end_msg 1 86 | log_begin_msg "Trying it the hard way (send SIGKILL all $NAME processes): " 87 | log_end_msg 0 88 | killall -KILL $NAME 89 | /bin/true 90 | RETVAL=0 91 | } 92 | } || { log_begin_msg " ... no $NAME daemon running"; RETVAL=0; log_end_msg 0; } 93 | log_end_msg 0 94 | } 95 | 96 | # See how we were called. 97 | case "$1" in 98 | start) 99 | start 100 | ;; 101 | stop) 102 | stop 103 | ;; 104 | restart|reload) 105 | stop 106 | echo "" 107 | rm $PIDFILE 108 | start 109 | ;; 110 | *) 111 | echo "Usage: /etc/init.d/$NAME {start|stop|restart}" 112 | exit 1 113 | esac 114 | 115 | 116 | if [ $? == 0 ]; then 117 | #echo "." 118 | if [ $1 == "stop" ]; then 119 | rm $PIDFILE &>/dev/null 120 | fi 121 | exit 0 122 | else 123 | echo " failed." 124 | exit -1 125 | fi 126 | 127 | 128 | -------------------------------------------------------------------------------- /modem/sysdep_common.c: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * 5 | * Copyright (c) 2002, Smart Link Ltd. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 2. Redistributions in binary form must reproduce the above 15 | * copyright notice, this list of conditions and the following 16 | * disclaimer in the documentation and/or other materials provided 17 | * with the distribution. 18 | * 3. Neither the name of the Smart Link Ltd. nor the names of its 19 | * contributors may be used to endorse or promote products derived 20 | * from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | * 34 | */ 35 | 36 | /* 37 | * 38 | * sysdep_common.c -- sysdep API. 39 | * 40 | * Author: Sasha K (sashak@smlink.com) 41 | * 42 | * 43 | */ 44 | 45 | /*****************************************************************************/ 46 | 47 | #include 48 | #include 49 | #include 50 | #include 51 | 52 | 53 | /* memory allocations */ 54 | void *sysdep_malloc (unsigned int size) 55 | { 56 | return malloc(size); 57 | } 58 | 59 | void sysdep_free (void *mem) 60 | { 61 | free(mem); 62 | } 63 | 64 | /* strings */ 65 | size_t sysdep_strlen(const char *s) 66 | { 67 | return strlen(s); 68 | } 69 | char *sysdep_strcpy(char *d,const char *s) 70 | { 71 | return strcpy(d,s); 72 | } 73 | char *sysdep_strcat(char *d, const char *s) 74 | { 75 | return strcat(d,s); 76 | } 77 | int sysdep_strcmp(const char *s1,const char *s2) 78 | { 79 | return strcmp(s1, s2); 80 | } 81 | char *sysdep_strstr(const char *s1,const char *s2) 82 | { 83 | return strstr(s1,s2); 84 | } 85 | void *sysdep_memset(void *d,int c,size_t l) 86 | { 87 | return memset(d,c,l); 88 | } 89 | void *sysdep_memcpy(void *d,const void *s,size_t l) 90 | { 91 | return memcpy(d,s,l); 92 | } 93 | void *sysdep_memchr(const void *s,int c,size_t l) 94 | { 95 | return memchr (s,c,l); 96 | } 97 | 98 | int sysdep_vsnprintf(char *str, unsigned size, const char *format, va_list ap) 99 | { 100 | return vsnprintf(str, size, format, ap); 101 | } 102 | 103 | int sysdep_sprintf(char *buf, const char *fmt, ...) 104 | { 105 | va_list args; 106 | int i; 107 | va_start(args, fmt); 108 | i=vsprintf(buf,fmt,args); 109 | va_end(args); 110 | return i; 111 | } 112 | 113 | -------------------------------------------------------------------------------- /modem/modem_debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2002, Smart Link Ltd. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials provided 15 | * with the distribution. 16 | * 3. Neither the name of the Smart Link Ltd. nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | */ 33 | 34 | /* 35 | * 36 | * modem_debug.h - modem debug definitions. 37 | * 38 | * Author: SashaK 39 | * 40 | * Change History: 41 | * 42 | */ 43 | 44 | #ifndef __MODEM_DEBUG_H__ 45 | #define __MODEM_DEBUG_H__ 46 | 47 | 48 | /* constant definitions */ 49 | enum MODEM_LOG_CATEGORIES { 50 | /* 0-3 */ 51 | MODEM_DBG_PRINT_MSG = 0, 52 | MODEM_DBG_RX_SAMPLES, 53 | MODEM_DBG_TX_SAMPLES, 54 | MODEM_DBG_ECHOC_SAMPLES, 55 | /* 4-5 */ 56 | MODEM_DBG_MISC_DATA, 57 | MODEM_DBG_MISC1_DATA, 58 | /* 6-9 */ 59 | MODEM_DBG_RX_BITS, 60 | MODEM_DBG_TX_BITS, 61 | MODEM_DBG_RX_DATA, 62 | MODEM_DBG_TX_DATA, 63 | /* 10-11 */ 64 | MODEM_DBG_RX_CHARS, 65 | MODEM_DBG_TX_CHARS, 66 | /* 'overflow marker' */ 67 | MODEM_DBG_OVERFLOW 68 | }; 69 | 70 | 71 | struct sllog_header { 72 | unsigned modem_id; 73 | unsigned id; 74 | unsigned length; 75 | char data[0]; 76 | }; 77 | 78 | struct modem; 79 | 80 | #ifdef CONFIG_DEBUG_MODEM 81 | 82 | extern unsigned modem_debug_level; 83 | extern int modem_debug_printf(const char *fmt,...) 84 | __attribute__ ((format (printf, 1, 2))); 85 | 86 | #define eprintf(args...) { modem_debug_printf("err: " args) ; } 87 | #define dprintf(args...) { modem_debug_printf(args) ; } 88 | 89 | extern int modem_debug_log_data(struct modem *m, unsigned id, const void *, int); 90 | 91 | #else /* not CONFIG_DEBUG_MODEM */ 92 | 93 | #define eprintf(fmt...) 94 | #define dprintf(fmt...) 95 | #define modem_debug_log_data(m,id,data,cnt) 96 | 97 | #endif /* not CONFIG_DEBUG_MODEM */ 98 | 99 | extern int modem_debug_init(const char *suffix); 100 | extern void modem_debug_exit(); 101 | 102 | 103 | #endif /* __MODEM_DEBUG_H__ */ 104 | 105 | -------------------------------------------------------------------------------- /Documentation/ALSA_support.txt: -------------------------------------------------------------------------------- 1 | 2 | For service with the ALSA modem drivers (snd-intel8x0m, snd-via82xx-modem, 3 | snd-atiixp-modem, and snd-hda-intel), the slmodemd helper was be compiled 4 | with incorporation of added ALSA code. The necessary code is provides by 5 | installation of a package libasound2-dev, which may have alternative names 6 | in some Linux distros. But the installed components are listed below. 7 | 8 | The actual compiler must proceed within the modem/ sub-folder of this 9 | package. So the command sequence is: 10 | $ cd driver 11 | $ make clean 12 | $ make SUPPORT_ALSA=1 13 | 14 | The slmodemd is typically copied to the folder /usr/sbin/ 15 | For Ubuntu related distros do: 16 | $ sudo cp -a slmodemd /usr/sbin/ 17 | $ sudo chmod +x /usr/sbin/slmodemd 18 | 19 | For other distros 20 | $ su root 21 | # cp -a slmodemd /usr/sbin/ 22 | # chmod +x /usr/sbin/slmodemd 23 | 24 | Very minimal functionality tests are: 25 | $ slmodemd --version 26 | which should report like: 27 | SmartLink Soft Modem: version 2.9.11 Feb 29 2008 21:22:01 28 | 29 | $ slmodemd --help 30 | $ slmodemd --countrylist 31 | will return details on parameter usage. 32 | 33 | Modem setup can proceed through: 34 | $ sudo modprobe DriverName 35 | though drivers will typically already be autoloaded. 36 | $ sudo slmodemd -c Country --alsa modem:1 37 | or for usage with the snd-hda-intel driver: 38 | $ sudo slmodemd -c Country --alsa hw:0,n 39 | with n typically being 1 or 6 . 40 | 41 | The choice of n is evident for example in an ouput 42 | $ cat /proc/asound/pcm 43 | 00-00: STAC92xx Analog : STAC92xx Analog : playback 1 : capture 2 44 | 00-06: Si3054 Modem : Si3054 Modem : playback 1 : capture 45 | ---- 46 | wherein the 00-06 correponds to hw:0,6 47 | while a 00-01 would correspond to hw:0,1 48 | 49 | Note that hw:0,0 specifies the audio section of a High Definition Audio 50 | card, which may host a modem chip on the Subsystem. 51 | 52 | Components of the libasound2-dev package are: 53 | ----------------------------------------- 54 | /usr/share/lintian/overrides 55 | /usr/share/aclocal/alsa.m4 56 | /usr/include/alsa/sound 57 | /usr/include/alsa/sound/ainstr_fm.h 58 | /usr/include/alsa/sound/ainstr_gf1.h 59 | /usr/include/alsa/sound/ainstr_simple.h 60 | /usr/include/alsa/sound/ainstr_iw.h 61 | /usr/include/alsa/sound/asound_fm.h 62 | /usr/include/alsa/sound/hdsp.h 63 | /usr/include/alsa/sound/sb16_csp.h 64 | /usr/include/alsa/sound/sscape_ioctl.h 65 | /usr/include/alsa/sound/emu10k1.h 66 | /usr/include/alsa/sound/type_compat.h 67 | /usr/include/alsa/asoundlib.h 68 | /usr/include/alsa/asoundef.h 69 | /usr/include/alsa/version.h 70 | /usr/include/alsa/global.h 71 | /usr/include/alsa/input.h 72 | /usr/include/alsa/output.h 73 | /usr/include/alsa/error.h 74 | /usr/include/alsa/conf.h 75 | /usr/include/alsa/pcm.h 76 | /usr/include/alsa/pcm_old.h 77 | /usr/include/alsa/pcm_plugin.h 78 | /usr/include/alsa/rawmidi.h 79 | /usr/include/alsa/timer.h 80 | /usr/include/alsa/hwdep.h 81 | /usr/include/alsa/control.h 82 | /usr/include/alsa/mixer.h 83 | /usr/include/alsa/mixer_abst.h 84 | /usr/include/alsa/seq_event.h 85 | /usr/include/alsa/seq.h 86 | /usr/include/alsa/seqmid.h 87 | /usr/include/alsa/seq_midi_event.h 88 | /usr/include/alsa/conv.h 89 | /usr/include/alsa/instr.h 90 | /usr/include/alsa/iatomic.h 91 | /usr/include/alsa/alisp.h 92 | /usr/include/alsa/pcm_external.h 93 | /usr/include/alsa/pcm_ioplug.h 94 | /usr/include/alsa/pcm_extplug.h 95 | /usr/include/alsa/pcm_rate.h 96 | /usr/include/alsa/control_external.h 97 | /usr/include/sys 98 | /usr/include/sys/asoundlib.h 99 | /usr/lib/libasound.a 100 | /usr/lib/libasound.la 101 | /usr/lib/pkgconfig 102 | /usr/lib/pkgconfig/alsa.pc 103 | /usr/share/doc/libasound2-dev 104 | /usr/lib/libasound.so 105 | 106 | Marv Stodolsky, 2008-03-24 107 | -------------------------------------------------------------------------------- /modem/modem_datafile.c: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * 5 | * Copyright (c) 2002, Smart Link Ltd. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 2. Redistributions in binary form must reproduce the above 15 | * copyright notice, this list of conditions and the following 16 | * disclaimer in the documentation and/or other materials provided 17 | * with the distribution. 18 | * 3. Neither the name of the Smart Link Ltd. nor the names of its 19 | * contributors may be used to endorse or promote products derived 20 | * from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | * 34 | */ 35 | 36 | /* 37 | * 38 | * modem_datafile.c -- modem data file stuff. 39 | * 40 | * Author: Sasha K (sashak@smlink.com) 41 | * 42 | */ 43 | 44 | /*****************************************************************************/ 45 | 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | 54 | #include 55 | #include 56 | 57 | #define DBG(fmt,args...) dprintf( fmt , ##args ); 58 | 59 | 60 | struct datafile_record { 61 | unsigned minor; 62 | struct dsp_info dsp_info; 63 | unsigned size; 64 | }; 65 | 66 | 67 | 68 | int datafile_load_info(char *file_name,struct dsp_info *info) 69 | { 70 | struct datafile_record *dr; 71 | int ret = -1; 72 | int fd; 73 | 74 | DBG("open file: %s...\n",file_name); 75 | fd = open(file_name, 0, 0); 76 | if(fd < 0) { 77 | DBG("cannot open '%s': %s\n", 78 | file_name,strerror(errno)); 79 | return -errno; 80 | } 81 | 82 | dr = (struct datafile_record *)malloc(sizeof(*dr)); 83 | if (!dr) { 84 | close(fd); 85 | return -errno; 86 | } 87 | 88 | ret = read(fd,(char *)dr,sizeof(*dr)); 89 | if (ret < 0) { 90 | free(dr); 91 | close(fd); 92 | return -errno; 93 | } 94 | 95 | /* simple validation */ 96 | if(dr->size != sizeof(*dr)) { 97 | free(dr); 98 | close(fd); 99 | return -1; 100 | } 101 | 102 | memcpy(info,&dr->dsp_info,sizeof(*info)); 103 | 104 | free(dr); 105 | close(fd); 106 | return ret; 107 | } 108 | 109 | 110 | int datafile_save_info(char *file_name,struct dsp_info *info) 111 | { 112 | struct datafile_record *dr; 113 | int ret = -1; 114 | int fd; 115 | 116 | fd = open(file_name,O_CREAT|O_WRONLY,(S_IRUSR|S_IWUSR)); 117 | if(fd < 0) 118 | return -errno; 119 | 120 | dr = (struct datafile_record *)malloc(sizeof(*dr)); 121 | if (!dr) { 122 | return -errno; 123 | close(fd); 124 | } 125 | 126 | memcpy(&dr->dsp_info,info,sizeof(*info)); 127 | dr->size = sizeof(*dr); 128 | 129 | ret = write(fd,(char *)dr,sizeof(*dr)); 130 | 131 | free(dr); 132 | close(fd); 133 | return ret; 134 | } 135 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /modem/dp_sinus.c: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * 4 | * Copyright (c) 2002, Smart Link Ltd. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above 14 | * copyright notice, this list of conditions and the following 15 | * disclaimer in the documentation and/or other materials provided 16 | * with the distribution. 17 | * 3. Neither the name of the Smart Link Ltd. nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | * 33 | */ 34 | 35 | /* 36 | * 37 | * sinus.c -- sinus data pump. 38 | * 39 | * Author: Sasha K (sashak@smlink.com) 40 | * 41 | * 42 | */ 43 | 44 | #include 45 | #include 46 | 47 | #ifdef __KERNEL__ 48 | #define malloc(size) kmalloc(size,GFP_KERNEL) 49 | #define free(mem) kfree(mem) 50 | #endif 51 | 52 | #define SIN_AMPLITUDE 16384 53 | #define SIN_PERIOD (sizeof(sintab)/sizeof(sintab[0])) 54 | static 55 | const s16 sintab[] = { 56 | 0, 3196, 6269, 9102, 11585, 13622, 15136, 16069, 57 | 16384, 16069, 15136, 13622, 11585, 9102, 6269, 3196, 58 | 0, -3196, -6269, -9102, -11585, -13622, -15136, -16069, 59 | -16384, -16069, -15136, -13622, -11585, -9102, -6269, -3196}; 60 | 61 | #define SIN_DBG(fmt,arg...) dprintf("sin: " fmt , ##arg) 62 | 63 | struct sin_state { 64 | struct dp dp; 65 | int count; 66 | int linked; 67 | u8 buf[1024]; 68 | int amp; 69 | unsigned period; 70 | unsigned phase; 71 | }; 72 | 73 | static struct dp *sin_create(struct modem *m, enum DP_ID id, 74 | int caller, int srate, int max_frag, 75 | struct dp_operations *op) 76 | { 77 | struct sin_state *s; 78 | SIN_DBG("create...\n"); 79 | s = malloc(sizeof(*s)); 80 | if (!s) return NULL; 81 | memset(s,0,sizeof(*s)); 82 | s->dp.id = id; 83 | s->dp.modem = m; 84 | s->dp.op = op; 85 | s->dp.dp_data = s; 86 | s->phase = 0; 87 | s->amp = SIN_AMPLITUDE; 88 | s->period= SIN_PERIOD; 89 | return &s->dp; 90 | } 91 | 92 | static int sin_delete(struct dp *dp) 93 | { 94 | struct sin_state *s = dp->dp_data; 95 | SIN_DBG("delete...\n"); 96 | free(s); 97 | return 0; 98 | } 99 | 100 | static int sin_run(struct dp *dp, void *in, void *out, int cnt) 101 | { 102 | struct sin_state *s = dp->dp_data; 103 | s16 *smpl = out; 104 | int i; 105 | //SIN_DBG("run...\n"); 106 | for (i=0;iphase%SIN_PERIOD]; 108 | s->phase = s->phase+1; 109 | } 110 | return DPSTAT_OK; 111 | } 112 | 113 | 114 | static struct dp_operations sin_operations = { 115 | name : "Sinus DP driver", 116 | create: sin_create, 117 | delete: sin_delete, 118 | process:sin_run 119 | }; 120 | 121 | 122 | 123 | int dp_sinus_init(void) 124 | { 125 | return modem_dp_register(DP_SINUS,&sin_operations); 126 | } 127 | 128 | void dp_sinus_exit(void) 129 | { 130 | modem_dp_deregister(DP_SINUS,&sin_operations); 131 | } 132 | 133 | 134 | -------------------------------------------------------------------------------- /modem/modem_homolog.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * 5 | * Copyright (c) 2002, Smart Link Ltd. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 2. Redistributions in binary form must reproduce the above 15 | * copyright notice, this list of conditions and the following 16 | * disclaimer in the documentation and/or other materials provided 17 | * with the distribution. 18 | * 3. Neither the name of the Smart Link Ltd. nor the names of its 19 | * contributors may be used to endorse or promote products derived 20 | * from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | * 34 | */ 35 | 36 | /* 37 | * 38 | * modem_homolog.h -- Modem Homologation definitions. 39 | * 40 | * Author: Sasha K (sashak@smlink.com) 41 | * 42 | * 43 | */ 44 | 45 | /*****************************************************************************/ 46 | 47 | #ifndef __MODEM_HOMOLOG_H__ 48 | #define __MODEM_HOMOLOG_H__ 49 | 50 | 51 | /* homologation parameters struct */ 52 | struct homolog_params { 53 | u8 PulseDialMakeTime; 54 | u8 PulseDialBreakTime; 55 | u8 PulseDialDigitPattern; 56 | u8 DTMFHighToneLevel; 57 | u8 DTMFDialSpeed; 58 | u8 MinBusyCadenceOnTime; 59 | u8 MaxBusyCadenceOnTime; 60 | u8 BusyDetectionCyclesNumber; 61 | u8 MinBusyCadenceOffTime; 62 | u8 MaxBusyCadenceOffTime; 63 | u8 CallingToneFlag; 64 | u8 HookFlashTime; 65 | u8 DialPauseTime; // ? 66 | u8 TransmitLevel; 67 | u8 DialModifierValidation; 68 | u8 DialToneValidationTime; 69 | //u8 BusyToneDiffTime; 70 | u8 DTMFHighAndLowToneLevelDifference; 71 | u8 DialToneCallProgressFilterIndex; 72 | u8 DialToneDetectionThreshold; 73 | u8 ABCDDialingPermittedFlag; 74 | u8 ComaPauseDurationLimit; 75 | //u8 PulseAndToneDialInSameDialStringPermittedFlag; 76 | u8 BusyToneCallProgressFilterIndex; 77 | u8 PulseBetweenDigitsInterval; 78 | u8 DialToneWaitTime; 79 | u8 MinRingbackCadenceOnTime; 80 | u8 MaxRingbackCadenceOnTime; 81 | u8 RingbackDetectionCyclesNumber; 82 | //u8 MinRingbackCadenceOffTime; 83 | //u8 MaxRingbackCadenceOffTime; 84 | //u8 RingbackToneCallProgressFilterIndex; 85 | //u8 MinCongestionCadenceOnTime; 86 | //u8 MaxCongestionCadenceOnTime; 87 | //u8 CongestionDetectionCyclesNumber; 88 | //u8 MinCongestionCadenceOffTime; 89 | //u8 MaxCongestionCadenceOffTime; 90 | //u8 CongestionToneCallProgressFilterIndex; 91 | u16 CallProgressSamplesBufferLength; 92 | u8 MustNoiseFilterBeApplied; 93 | //u32 DigitalImpairmentsMask; 94 | //u8 DialToneFilterSubindex; 95 | //u8 BusyToneLooseDetectionEnabled; 96 | //u8 CallWaitingIntegrationTimeMiliSec; 97 | //u8 CallWaitingThresholdPercentage; 98 | }; 99 | 100 | 101 | /* homologation country set */ 102 | struct homolog_set { 103 | const u16 id; 104 | const char *name; 105 | const struct homolog_params *params; 106 | }; 107 | 108 | /* 'nulled'-terminated homologation array */ 109 | extern const struct homolog_set homolog_set[]; 110 | 111 | #endif /* __MODEM_HOMOLOG_H__ */ 112 | -------------------------------------------------------------------------------- /Changes: -------------------------------------------------------------------------------- 1 | * Recent version 2 | - automated recognition of x86_64 host for compile of 64 bit slusb, and concurent 32 bit slmodemd compile 3 | - support upto 2.6.24 added 4 | - compatibility fixes 5 | - class_simple wrapper by Stefan Schweizer 6 | - example of Ubuntu startup script by Nicola Inchingolo 7 | - example of Slackware startup script by Sanel Z 8 | - merged 2.9.9x: Applied patch for USB fix, from SashaK 9 | - merged 2.9.9x: Modem speaker support (ALSA mode) 10 | - merged 2.9.9x: 'shortbuffer' slmodemd's option (required with ALI5451 modems) 11 | - merged 2.9.9x: gcc4 build support 12 | - merged 2.9.9x: added Intel ICH6 and ICH7 support 13 | - misc fixes 14 | 15 | * Version 2.9.11 16 | - Off-hook with mixer (ALSA mode) 17 | - device major numbers change, (212 -> 242, 213 -> 243) 18 | - support for HSP1688 PCI modem 19 | - misc compatibility fixes 20 | - misc improvements 21 | 22 | * Version 2.9.10 23 | - internal ring detector 24 | - misc fixes 25 | 26 | * Version 2.9.9 27 | - sysfs support (contributed by Daniel Drake) 28 | - fix broken USB ST7554 support for 2.4 kernels 29 | - V32 fixes 30 | - misc fixes 31 | 32 | * Version 2.9.8 33 | - T.35 country codes fixes 34 | - Fax Class1 support 35 | - Mandrake style startup script 'scripts/mandrake' (contributed by Gaetano Lombardo) 36 | - misc improvements 37 | - misc fixes 38 | 39 | * Version 2.9.7 40 | - Support for SL2800 modem cards 41 | - V90/V92 improvements 42 | - Voice modem (V253 like, supports vgetty) 43 | - V23 fixes 44 | - CID, ring detection fixes 45 | - misc improvements and fixes 46 | 47 | * Version 2.9.6 48 | - v34 and v34 fallback fix 49 | - v92 QC fix 50 | - COPYING file was added 51 | - '--perm' option fix (thanks to Michal Jaegermann) 52 | - v34/v90/v92 improvements and fixes 53 | - v32, v32bis modems 54 | - v22, v22bis, Bell212 modems 55 | - v23 modem 56 | - Bell103, V21 modem 57 | - Caller ID 58 | - Pulse dialer 59 | - SuSE style startup script 'scripts/suse' (contributed by Gerd Fleischer) 60 | - improvements and fixes 61 | 62 | * Version 2.9.5 63 | - v8/v34/v90 improvements 64 | - ALSA mode improvements (looks more useful now) 65 | - ALSA xrun recovery 66 | - ability to update tx/rx delay 67 | - ICH ALSA driver (intel8x0m.c) 'long names' fix 68 | - Debian style startup script 'scripts/debian/slmodem' (contributed by Mike Gabriel) 69 | - improvements and fixes 70 | 71 | * Version 2.9.4 72 | - group and permission setup for PTY 73 | - 'devfs' support (for Linux Kernel 2.4) 74 | - improvements and fixes 75 | 76 | * Version 2.9.3 77 | - ALSA mode (not finished, experimental, kernel patch is needed) 78 | - ICH5 support 79 | - RH style startup script and RPM spec file were contributed by Stefan Becker 80 | - 'scripts' directory for misc useful utils was added 81 | - improvements and fixes 82 | 83 | * Version 2.9.2 84 | - support for st7554 based USB modems readded for kernels 2.4, 2.6 85 | - 'devfs' support (for Linux Kernel 2.6) 86 | - many fixes 87 | 88 | * Version 2.9.1 89 | - user-space softmodem 90 | - support for kernel 2.6 91 | 92 | * Version 2.8.4 93 | - 2.8 release line is suspended 94 | - v92 QC support 95 | 96 | * Version 2.8.3 97 | - critical v34/v90 fixes 98 | - backward compatible 'install-amr/-usb' make targets 99 | - error corrector small improvements 100 | - misc fixes 101 | 102 | * Version 2.8.2 103 | - installation improvements. 104 | - invalid start delay fix. 105 | - disabling pulse dialing (not implemented yet). 106 | - v34/v90 protocol fixes. 107 | - at processor improvements. 108 | - reentrant dsp code. 109 | - misc fixes. 110 | 111 | * Version 2.8.1 112 | - escape mode switch fix. 113 | - AT&A,AT+MS commands. 114 | - error corrector protocol fixes. 115 | - tty driver improvements. 116 | - mgetty support. 117 | - support for speaker (if exists). 118 | - procfs interface for debugging. 119 | - hot device unplug support. 120 | - misc fixes. 121 | 122 | * Version 2.8.0 123 | - new open architecture. 124 | - modem core from scratch. 125 | - pluggable hw modem drivers. 126 | - support for multiple modems. 127 | - V34/V90 caller and answer data modem. 128 | -------------------------------------------------------------------------------- /patches/sldiffs-20090222/06_slmodem-class-simple-to-class-meins.diff: -------------------------------------------------------------------------------- 1 | Patch for class/simple_class transition. 2 | Index: slmodem-2.9.11-20080817/drivers/st7554.c 3 | =================================================================== 4 | --- slmodem-2.9.11-20080817.orig/drivers/st7554.c 2008-09-17 15:18:14.000000000 +0200 5 | +++ slmodem-2.9.11-20080817/drivers/st7554.c 2008-09-17 15:24:12.000000000 +0200 6 | @@ -213,7 +213,21 @@ 7 | 8 | 9 | static struct st7554_state *st7554_table[MAX_MODEMS] = {}; 10 | +#ifdef FOUND_CLASS_SIMPLE 11 | +#define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_simple_device_add(class, dev, device, fmt, rest) 12 | +#define CLASS_DESTROY(class) class_simple_destroy(class) 13 | +#define CLASS_DEVICE_DESTROY(class, dev) class_simple_device_remove(dev) 14 | +#define CLASS_CREATE(owner, name) class_simple_create(owner, name) 15 | static struct class_simple *st7554_class; 16 | +#else 17 | +#include 18 | + 19 | +#define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_device_create(class, dev, device, fmt, rest) 20 | +#define CLASS_DESTROY(class) class_destroy(class) 21 | +#define CLASS_DEVICE_DESTROY(class, dev) class_device_destroy(class, dev) 22 | +#define CLASS_CREATE(owner, name) class_create(owner, name) 23 | +static struct class *st7554_class; 24 | +#endif 25 | 26 | static DECLARE_MUTEX(open_sem); 27 | 28 | @@ -1315,7 +1329,7 @@ 29 | } 30 | 31 | usb_set_intfdata(interface, s ); 32 | - class_simple_device_add(st7554_class, MKDEV(243, i), NULL, "slusb%d", i); 33 | + CLASS_DEVICE_CREATE(st7554_class, MKDEV(243, i), NULL, "slusb%d", i); 34 | 35 | USB_INFO(KERN_INFO "slusb: slusb%d is found.\n", s->minor); 36 | 37 | @@ -1343,7 +1357,7 @@ 38 | return; 39 | } 40 | 41 | - class_simple_device_remove(MKDEV(243, s->minor)); 42 | + CLASS_DEVICE_DESTROY(st7554_class, MKDEV(243, s->minor)); 43 | 44 | st7554_stop(s); 45 | down(&open_sem); 46 | @@ -1376,7 +1390,7 @@ 47 | int ret; 48 | USB_INFO ("ST7554 USB Modem.\n"); 49 | 50 | - st7554_class = class_simple_create(THIS_MODULE, "slusb"); 51 | + st7554_class = CLASS_CREATE(THIS_MODULE, "slusb"); 52 | if (IS_ERR(st7554_class)) { 53 | ret = PTR_ERR(st7554_class); 54 | USB_ERR("st7554_modem_init: failed to create sysfs class, error %d\n", ret); 55 | @@ -1386,13 +1400,13 @@ 56 | ret = usb_register(&st7554_usb_driver); 57 | if ( ret ) { 58 | USB_ERR ("st7554_modem_init: cannot register usb device.\n"); 59 | - class_simple_destroy(st7554_class); 60 | + CLASS_DESTROY(st7554_class); 61 | return ret; 62 | } 63 | 64 | if(register_chrdev(243, "slusb", &st7554_fops) < 0) { 65 | usb_deregister(&st7554_usb_driver); 66 | - class_simple_destroy(st7554_class); 67 | + CLASS_DESTROY(st7554_class); 68 | return -ENOMEM; 69 | } 70 | return 0; 71 | @@ -1404,7 +1418,7 @@ 72 | USB_DBG ("st7554: exit...\n"); 73 | unregister_chrdev(243,"slusb"); 74 | usb_deregister(&st7554_usb_driver); 75 | - class_simple_destroy(st7554_class); 76 | + CLASS_DESTROY(st7554_class); 77 | } 78 | 79 | 80 | Index: slmodem-2.9.11-20080817/drivers/Makefile 81 | =================================================================== 82 | --- slmodem-2.9.11-20080817.orig/drivers/Makefile 2008-09-17 15:17:56.000000000 +0200 83 | +++ slmodem-2.9.11-20080817/drivers/Makefile 2008-09-17 15:24:12.000000000 +0200 84 | @@ -21,7 +21,9 @@ 85 | # slusb support ends at 2.6.24 86 | AGE:=$(shell if [ "$(SUBLEVEL)" -gt 24 ] ;then echo NEW;fi) 87 | 88 | -EXTRA_CFLAGS = -I$(obj) -I$(obj)/../modem 89 | +FOUND_CLASS_SIMPLE := $(shell grep -q 'class_simple_device_add' ${KERNEL_DIR}/include/linux/device.h 2> /dev/null && echo -DFOUND_CLASS_SIMPLE) 90 | + 91 | +EXTRA_CFLAGS = -I$(obj) -I$(obj)/../modem $(FOUND_CLASS_SIMPLE) 92 | 93 | ARCH64:=$(shell uname -m | sed -e '/amd64/s//x86_64/' | grep -c x86_64) 94 | 95 | @@ -82,7 +84,7 @@ 96 | obj:=. 97 | module-dir ?= ${DESTDIR}/lib/modules/$(KERNEL_VER)/misc 98 | 99 | -CFLAGS:= -Wall -pipe -O3 -fomit-frame-pointer -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DMODVERSIONS --include $(KERNEL_DIR)/include/linux/modversions.h -I$(KERNEL_DIR)/include 100 | +CFLAGS:= -Wall -pipe -O3 -fomit-frame-pointer -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DMODVERSIONS --include $(KERNEL_DIR)/include/linux/modversions.h -I$(KERNEL_DIR)/include $(FOUND_CLASS_SIMPLE) 101 | 102 | all: $(obj-m) 103 | 104 | -------------------------------------------------------------------------------- /modem/dp_dummy.c: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * 4 | * Copyright (c) 2002, Smart Link Ltd. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above 14 | * copyright notice, this list of conditions and the following 15 | * disclaimer in the documentation and/or other materials provided 16 | * with the distribution. 17 | * 3. Neither the name of the Smart Link Ltd. nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | * 33 | */ 34 | 35 | /* 36 | * 37 | * dp_dummy.c -- dummy data pump (very stupid simulator). 38 | * 39 | * Author: Sasha K (sashak@smlink.com) 40 | * 41 | * 42 | */ 43 | 44 | #include 45 | #include 46 | 47 | 48 | #define DUMMY_SKIP 100 49 | #define DUMMY_TIMEOUT 300 50 | 51 | #define DUMMY_A1 0xff 52 | 53 | 54 | struct dummy_dp { 55 | struct dp dp; 56 | unsigned long count; 57 | unsigned long linked; 58 | u8 buf[1024]; 59 | void *dcr; 60 | }; 61 | 62 | static struct dp *dummy_create(struct modem *m, enum DP_ID id, 63 | int caller, int srate, int max_frag, 64 | struct dp_operations *op) 65 | { 66 | struct dummy_dp *d; 67 | dprintf("dummy_create...\n"); 68 | d = malloc(sizeof(*d)); 69 | memset(d,0,sizeof(*d)); 70 | d->dp.id = id; 71 | d->dp.modem = m; 72 | d->dp.op = op; 73 | d->dp.dp_data = d; 74 | d->dcr = m->dcr; 75 | m->dcr = NULL; 76 | return (struct dp *)d; 77 | } 78 | 79 | static int dummy_delete(struct dp *dp) 80 | { 81 | struct dummy_dp *d = (struct dummy_dp *)dp; 82 | dprintf("dummy_delete...\n"); 83 | dp->modem->dcr = d->dcr; 84 | free(d); 85 | return 0; 86 | } 87 | 88 | static int dummy_process(struct dp *dp, void *in, void *out, int cnt) 89 | { 90 | struct dummy_dp *d = (struct dummy_dp *)dp; 91 | int n = cnt << MFMT_SHIFT(dp->modem->format); 92 | s16 *s; 93 | int i; 94 | d->count++; 95 | if (!d->linked) { 96 | if (d->count < DUMMY_SKIP) { 97 | memset(out,0,n); 98 | return DPSTAT_OK; 99 | } 100 | else if(d->count > DUMMY_TIMEOUT) 101 | return DPSTAT_ERROR; 102 | s = out; 103 | for(i = 0 ; i < cnt ; i++) { 104 | *s = (1-2*(i&1))*('A'); 105 | s++; 106 | } 107 | s = in; 108 | for(i = 0 ; i < cnt ; i++) { 109 | if(abs(*s) == 'A') { 110 | d->linked = 1; 111 | return DPSTAT_CONNECT; 112 | } 113 | s++; 114 | } 115 | } 116 | else { 117 | s = in; 118 | for(i = 0 ; i < cnt ; i++) { 119 | d->buf[i] = *s&0x1; 120 | s++; 121 | } 122 | modem_put_bits(dp->modem,1,d->buf,cnt); 123 | s = out; 124 | modem_get_bits(dp->modem,1,d->buf,cnt); 125 | for(i = 0 ; i < cnt ; i++) { 126 | *s = d->buf[i]&1 ; 127 | s++; 128 | } 129 | } 130 | return DPSTAT_OK; 131 | } 132 | 133 | 134 | static struct dp_operations dummy_operations = { 135 | name : "Dummy DataPump driver", 136 | create: dummy_create, 137 | delete: dummy_delete, 138 | process:dummy_process 139 | }; 140 | 141 | 142 | 143 | int dp_dummy_init(void) 144 | { 145 | return modem_dp_register(DP_DUMMY,&dummy_operations); 146 | } 147 | 148 | void dp_dummy_exit(void) 149 | { 150 | modem_dp_deregister(DP_DUMMY,&dummy_operations); 151 | } 152 | 153 | 154 | -------------------------------------------------------------------------------- /drivers/Makefile.orig: -------------------------------------------------------------------------------- 1 | ########################################################################### 2 | # 3 | # 4 | # Makefile -- modem kernel drivers Makefile. 5 | # 6 | # Copyright(c) 2003, Smart Link Ltd. (www.smlink.com) 7 | # All rights reserved. 8 | # 9 | # Author: Sasha K (sashak@smlink.com) 10 | # 11 | # 12 | ########################################################################### 13 | # 14 | ########################################################################### 15 | 16 | #KBUILD_VERBOSE=1 17 | #export KBUILD_VERBOSE 18 | 19 | KERNEL_DIR:=/lib/modules/$(shell uname -r)/build 20 | SUBLEVEL:=$(shell echo $(KERNEL_DIR) | cut -d. -f3 | cut -d. -f1 | cut -d- -f1) 21 | # slusb support ends at 2.6.24 22 | 23 | ifndef USB 24 | AGE:=$(shell if [ "$(SUBLEVEL)" -gt 24 ] ;then echo NEW;fi) 25 | endif 26 | 27 | FOUND_CLASS_SIMPLE := $(shell grep -q 'class_simple_device_add' ${KERNEL_DIR}/include/linux/device.h 2> /dev/null && echo -DFOUND_CLASS_SIMPLE) 28 | 29 | EXTRA_CFLAGS = -I$(obj) -I$(obj)/../modem $(FOUND_CLASS_SIMPLE) 30 | 31 | ARCH64:=$(shell uname -m | sed -e '/amd64/s//x86_64/' | grep -c x86_64) 32 | 33 | ifeq ($(ARCH64), 0) 34 | obj-m:= slamr.o 35 | endif 36 | 37 | # AGE:=test 38 | ifneq ($(AGE), NEW) 39 | obj-m:= $(obj-m) slusb.o 40 | endif 41 | 42 | slamr-objs:= amrmo_init.o sysdep_amr.o amrlibs.o 43 | slusb-objs:= st7554.o 44 | 45 | ifndef KERNELRELEASE 46 | ifndef KERNEL_VER 47 | 48 | all install uninstall: kernel-ver 49 | $(MAKE) $@ KERNEL_VER=$(shell ./kernel-ver) 50 | 51 | install: install-devices 52 | uninstall: remove-devices 53 | 54 | kernel-ver:: 55 | @echo "doing kernel-ver::" 56 | $(CC) -I$(KERNEL_DIR)/include -o $@ $@.c 57 | 58 | dep: 59 | clean: 60 | $(RM) kernel-ver $(obj-m) $(obj-m:.o=.ko) *st7554.o amrmo_init.o sysdep_amr.o *.mod.* .*.cmd *~ slusb.* 61 | $(RM) -r .tmp_versions 62 | 63 | install-devices: 64 | mkdir -p ${DESTDIR}/dev 65 | $(foreach minor,0 1 2 3, \ 66 | mknod -m 600 ${DESTDIR}/dev/slamr$(minor) c 242 $(minor) ; ) echo -n 67 | ifneq ($(AGE), NEW) 68 | $(foreach minor,0 1 2 3, \ 69 | mknod -m 600 ${DESTDIR}/dev/slusb$(minor) c 243 $(minor) ; ) echo -n 70 | endif 71 | 72 | remove-devices: 73 | $(foreach minor,0 1 2 3, \ 74 | $(RM) ${DESTDIR}/dev/slamr$(minor) ; ) echo -n 75 | $(foreach minor,0 1 2 3, \ 76 | $(RM) ${DESTDIR}/dev/slusb$(minor) ; ) echo -n 77 | 78 | else 79 | ifeq ($(shell grep 'UTS.*"2\.6' $(KERNEL_DIR)/include/linux/utsrelease.h $(KERNEL_DIR)/include/linux/version.h 2>/dev/null),) 80 | 81 | slusb-objs:= old_st7554.o 82 | obj:=. 83 | module-dir:=${DESTDIR}/lib/modules/$(KERNEL_VER)/misc 84 | 85 | CFLAGS:= -Wall -pipe -O3 -fomit-frame-pointer -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DMODVERSIONS --include $(KERNEL_DIR)/include/linux/modversions.h -I$(KERNEL_DIR)/include $(FOUND_CLASS_SIMPLE) 86 | 87 | all: $(obj-m) 88 | 89 | slamr.o: $(slamr-objs) 90 | slusb.o: $(slusb-objs) 91 | slamr.o slusb.o: 92 | $(LD) -r -o $@ $^ 93 | 94 | install: uninstall-old 95 | ifeq ($(ARCH64), 0) 96 | install -D -m 644 slamr.o $(module-dir)/slamr.o 97 | endif 98 | install -D -m 644 slusb.o $(module-dir)/slusb.o 99 | cp /etc/modules.conf /etc/modules.conf.slamr && \ 100 | echo 'alias char-major-242 slamr' >> /etc/modules.conf && \ 101 | echo 'alias char-major-243 slusb' >> /etc/modules.conf 102 | /sbin/depmod -a 103 | uninstall: 104 | /sbin/modprobe -r slamr slusb 105 | cp /etc/modules.conf /etc/modules.conf.slamr && \ 106 | egrep -ve 'alias char-major-242 slamr|alias char-major-243 slusb' /etc/modules.conf.slamr > /etc/modules.conf 107 | $(RM) $(module-dir)/slamr.o 108 | $(RM) $(module-dir)/slusb.o 109 | /sbin/depmod -a 110 | uninstall-old: 111 | $(RM) $(module-dir)/slmdm.o \ 112 | $(module-dir)/slfax.o \ 113 | $(module-dir)/slusb.o \ 114 | $(module-dir)/slamrmo.o \ 115 | $(module-dir)/slmodem.o # remove old 2.7,2.8 version 116 | 117 | %.o: %.c 118 | @echo " doing %.o: %.c" 119 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -o $@ -c $< 120 | 121 | else 122 | 123 | module-dir:=${DESTDIR}/lib/modules/$(KERNEL_VER)/extra 124 | 125 | all: 126 | @echo " obj-m=$(obj-m)" 127 | @echo " slamr-objs=$(slamr-objs)" 128 | $(MAKE) modules -C $(KERNEL_DIR) SUBDIRS=$(shell pwd) 129 | @echo " finished all:" 130 | 131 | install: 132 | ifeq ($(ARCH64), 0) 133 | install -D -m 644 slamr.ko $(module-dir)/slamr.ko 134 | endif 135 | ifneq ($(AGE), NEW) 136 | install -D -m 644 slusb.ko $(module-dir)/slusb.ko 137 | endif 138 | /sbin/depmod -a 139 | 140 | uninstall: 141 | ifeq ($(ARCH64), 0) 142 | modprobe -r slamr ; echo -n 143 | endif 144 | modprobe -r slusb ; echo -n 145 | $(RM) $(module-dir)/slamr.ko 146 | $(RM) $(module-dir)/slusb.ko 147 | /sbin/depmod -a 148 | endif 149 | 150 | endif 151 | endif 152 | 153 | $(obj)/amrlibs.o: 154 | echo "$@ done" 155 | 156 | -------------------------------------------------------------------------------- /drivers/Makefile: -------------------------------------------------------------------------------- 1 | ########################################################################### 2 | # 3 | # 4 | # Makefile -- modem kernel drivers Makefile. 5 | # 6 | # Copyright(c) 2003, Smart Link Ltd. (www.smlink.com) 7 | # All rights reserved. 8 | # 9 | # Author: Sasha K (sashak@smlink.com) 10 | # 11 | # 12 | ########################################################################### 13 | # 14 | ########################################################################### 15 | 16 | #KBUILD_VERBOSE=1 17 | #export KBUILD_VERBOSE 18 | 19 | KERNEL_DIR:=/lib/modules/$(shell uname -r)/build 20 | SUBLEVEL:=$(shell echo $(KERNEL_DIR) | cut -d. -f3 | cut -d. -f1 | cut -d- -f1) 21 | # slusb support ends at 2.6.24 22 | 23 | ifndef USB 24 | AGE:=$(shell if [ "$(SUBLEVEL)" -gt 24 ] ;then echo NEW;fi) 25 | endif 26 | 27 | FOUND_CLASS_SIMPLE := $(shell grep -q 'class_simple_device_add' ${KERNEL_DIR}/include/linux/device.h 2> /dev/null && echo -DFOUND_CLASS_SIMPLE) 28 | 29 | EXTRA_CFLAGS = -I$(obj) -I$(obj)/../modem $(FOUND_CLASS_SIMPLE) 30 | 31 | ARCH64:=$(shell uname -m | sed -e '/amd64/s//x86_64/' | grep -c x86_64) 32 | 33 | ifeq ($(ARCH64), 0) 34 | obj-m:= slamr.o 35 | endif 36 | 37 | # AGE:=test 38 | ifneq ($(AGE), NEW) 39 | obj-m:= $(obj-m) slusb.o 40 | endif 41 | 42 | slamr-objs:= amrmo_init.o sysdep_amr.o amrlibs.o 43 | slusb-objs:= st7554.o 44 | 45 | ifndef KERNELRELEASE 46 | ifndef KERNEL_VER 47 | 48 | all install uninstall: kernel-ver 49 | $(MAKE) $@ KERNEL_VER=$(shell ./kernel-ver) 50 | 51 | install: install-devices 52 | uninstall: remove-devices 53 | 54 | kernel-ver:: 55 | @echo "doing kernel-ver::" 56 | $(CC) -I$(KERNEL_DIR)/include -o $@ $@.c 57 | 58 | dep: 59 | clean: 60 | $(RM) kernel-ver $(obj-m) $(obj-m:.o=.ko) *st7554.o amrmo_init.o sysdep_amr.o *.mod.* .*.cmd *~ slusb.* 61 | $(RM) -r .tmp_versions 62 | 63 | install-devices: 64 | mkdir -p ${DESTDIR}/dev 65 | $(foreach minor,0 1 2 3, \ 66 | mknod -m 600 ${DESTDIR}/dev/slamr$(minor) c 242 $(minor) ; ) echo -n 67 | ifneq ($(AGE), NEW) 68 | $(foreach minor,0 1 2 3, \ 69 | mknod -m 600 ${DESTDIR}/dev/slusb$(minor) c 243 $(minor) ; ) echo -n 70 | endif 71 | 72 | remove-devices: 73 | $(foreach minor,0 1 2 3, \ 74 | $(RM) ${DESTDIR}/dev/slamr$(minor) ; ) echo -n 75 | $(foreach minor,0 1 2 3, \ 76 | $(RM) ${DESTDIR}/dev/slusb$(minor) ; ) echo -n 77 | 78 | else 79 | ifeq ($(shell grep 'UTS.*"2\.6' $(KERNEL_DIR)/include/generated/utsrelease.h $(KERNEL_DIR)/include/linux/utsrelease.h $(KERNEL_DIR)/include/linux/version.h 2>/dev/null),) 80 | 81 | slusb-objs:= old_st7554.o 82 | obj:=. 83 | module-dir:=${DESTDIR}/lib/modules/$(KERNEL_VER)/misc 84 | 85 | CFLAGS:= -Wall -pipe -O3 -fomit-frame-pointer -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DMODVERSIONS --include $(KERNEL_DIR)/include/linux/modversions.h -I$(KERNEL_DIR)/include $(FOUND_CLASS_SIMPLE) 86 | 87 | all: $(obj-m) 88 | 89 | slamr.o: $(slamr-objs) 90 | slusb.o: $(slusb-objs) 91 | slamr.o slusb.o: 92 | $(LD) -r -o $@ $^ 93 | 94 | install: uninstall-old 95 | ifeq ($(ARCH64), 0) 96 | install -D -m 644 slamr.o $(module-dir)/slamr.o 97 | endif 98 | install -D -m 644 slusb.o $(module-dir)/slusb.o 99 | cp /etc/modules.conf /etc/modules.conf.slamr && \ 100 | echo 'alias char-major-242 slamr' >> /etc/modules.conf && \ 101 | echo 'alias char-major-243 slusb' >> /etc/modules.conf 102 | /sbin/depmod -a 103 | uninstall: 104 | /sbin/modprobe -r slamr slusb 105 | cp /etc/modules.conf /etc/modules.conf.slamr && \ 106 | egrep -ve 'alias char-major-242 slamr|alias char-major-243 slusb' /etc/modules.conf.slamr > /etc/modules.conf 107 | $(RM) $(module-dir)/slamr.o 108 | $(RM) $(module-dir)/slusb.o 109 | /sbin/depmod -a 110 | uninstall-old: 111 | $(RM) $(module-dir)/slmdm.o \ 112 | $(module-dir)/slfax.o \ 113 | $(module-dir)/slusb.o \ 114 | $(module-dir)/slamrmo.o \ 115 | $(module-dir)/slmodem.o # remove old 2.7,2.8 version 116 | 117 | %.o: %.c 118 | @echo " doing %.o: %.c" 119 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -o $@ -c $< 120 | 121 | else 122 | 123 | module-dir:=${DESTDIR}/lib/modules/$(KERNEL_VER)/extra 124 | 125 | all: 126 | @echo " obj-m=$(obj-m)" 127 | @echo " slamr-objs=$(slamr-objs)" 128 | $(MAKE) modules -C $(KERNEL_DIR) SUBDIRS=$(shell pwd) 129 | @echo " finished all:" 130 | 131 | install: 132 | ifeq ($(ARCH64), 0) 133 | install -D -m 644 slamr.ko $(module-dir)/slamr.ko 134 | endif 135 | ifneq ($(AGE), NEW) 136 | install -D -m 644 slusb.ko $(module-dir)/slusb.ko 137 | endif 138 | /sbin/depmod -a 139 | 140 | uninstall: 141 | ifeq ($(ARCH64), 0) 142 | modprobe -r slamr ; echo -n 143 | endif 144 | modprobe -r slusb ; echo -n 145 | $(RM) $(module-dir)/slamr.ko 146 | $(RM) $(module-dir)/slusb.ko 147 | /sbin/depmod -a 148 | endif 149 | 150 | endif 151 | endif 152 | 153 | $(obj)/amrlibs.o: 154 | echo "$@ done" 155 | 156 | -------------------------------------------------------------------------------- /modem/modem_debug.c: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * 5 | * Copyright (c) 2002, Smart Link Ltd. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 2. Redistributions in binary form must reproduce the above 15 | * copyright notice, this list of conditions and the following 16 | * disclaimer in the documentation and/or other materials provided 17 | * with the distribution. 18 | * 3. Neither the name of the Smart Link Ltd. nor the names of its 19 | * contributors may be used to endorse or promote products derived 20 | * from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | * 34 | */ 35 | 36 | /* 37 | * 38 | * modem_debug.c -- modem debug module (dummy). 39 | * 40 | * Author: Sasha K (sashak@smlink.com) 41 | * 42 | * 43 | */ 44 | 45 | /*****************************************************************************/ 46 | 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | #include 56 | 57 | #include 58 | #include 59 | 60 | unsigned int modem_debug_level; 61 | unsigned int modem_debug_logging; 62 | unsigned int dsplibs_debug_level; 63 | 64 | static const char *modem_debug_logfile = "slmodem.log"; 65 | 66 | static int modem_log_fd; 67 | 68 | /* logging */ 69 | 70 | int modem_debug_log_data(struct modem *m, unsigned id, const void *data, int count) 71 | { 72 | struct sllog_header hdr; 73 | int ret = 0; 74 | if(id <= modem_debug_logging && modem_log_fd > 0) { 75 | hdr.modem_id = (unsigned)m ; 76 | hdr.id = id; 77 | hdr.length = count; 78 | ret = write(modem_log_fd,&hdr,sizeof(hdr)); 79 | if(ret < 0) { 80 | fprintf(stderr,"log_data: cannot write header: %s\n", 81 | strerror(errno)); 82 | return ret; 83 | } 84 | ret = write(modem_log_fd,data,count); 85 | if(ret < 0) { 86 | fprintf(stderr,"log_data: cannot write data: %s\n", 87 | strerror(errno)); 88 | return ret; 89 | } 90 | } 91 | return ret; 92 | } 93 | 94 | 95 | 96 | /* printing */ 97 | 98 | static int debug_vprintf(unsigned level, const char *fmt, va_list args) 99 | { 100 | static char debug_temp[512]; 101 | struct timeval tv; 102 | int i, len; 103 | gettimeofday(&tv,NULL); 104 | i = snprintf(debug_temp,sizeof(debug_temp),"<%03ld.%06ld> ", 105 | (tv.tv_sec % 1000), tv.tv_usec); 106 | len = vsnprintf(debug_temp + i, sizeof(debug_temp) - i, fmt, args); 107 | if(modem_debug_logging) 108 | modem_debug_log_data(0, 109 | MODEM_DBG_PRINT_MSG,debug_temp,len + i); 110 | if(level <= modem_debug_level) 111 | fprintf( stderr, "%s", debug_temp); 112 | return len; 113 | } 114 | 115 | 116 | int dsplibs_debug_printf(const char *fmt, ...) 117 | { 118 | va_list args; 119 | int len; 120 | va_start(args, fmt); 121 | len = debug_vprintf(dsplibs_debug_level, fmt, args); 122 | va_end(args); 123 | return len; 124 | } 125 | 126 | int modem_debug_printf(const char *fmt, ...) 127 | { 128 | va_list args; 129 | int len; 130 | va_start(args, fmt); 131 | len = debug_vprintf(1, fmt, args); 132 | va_end(args); 133 | return len; 134 | } 135 | 136 | 137 | int modem_debug_init(const char *suffix) 138 | { 139 | dsplibs_debug_level = modem_debug_level; 140 | if(modem_debug_logging) { 141 | char path_name[PATH_MAX]; 142 | const char *name; 143 | if(suffix) { 144 | snprintf(path_name, sizeof(path_name), 145 | "%s.%s", modem_debug_logfile, suffix); 146 | name = path_name; 147 | } 148 | else 149 | name = modem_debug_logfile; 150 | modem_log_fd = creat(name,S_IREAD|S_IWRITE); 151 | if(modem_log_fd < 0) { 152 | fprintf(stderr,"cannot create `%s': %s\n", 153 | name,strerror(errno)); 154 | return -1; 155 | } 156 | if(dsplibs_debug_level < 3) 157 | dsplibs_debug_level = 3; 158 | } 159 | return 0; 160 | } 161 | 162 | void modem_debug_exit() 163 | { 164 | if(modem_log_fd > 0) { 165 | close(modem_log_fd); 166 | modem_log_fd = 0; 167 | } 168 | } 169 | 170 | -------------------------------------------------------------------------------- /modem/modem_timer.c: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * 4 | * Copyright (c) 2002, Smart Link Ltd. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above 14 | * copyright notice, this list of conditions and the following 15 | * disclaimer in the documentation and/or other materials provided 16 | * with the distribution. 17 | * 3. Neither the name of the Smart Link Ltd. nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | * 33 | */ 34 | 35 | /* 36 | * 37 | * modem_timer.c -- simple timer (will not in multithreaded env). 38 | * 39 | * Author: Sasha K (sashak@smlink.com) 40 | * 41 | * 42 | */ 43 | 44 | #include 45 | #include 46 | #include 47 | #include 48 | 49 | #include 50 | 51 | #if 0 52 | #include 53 | #define WARN(fmt...) fprintf(stderr, fmt); 54 | #else 55 | #define WARN(fmt...) 56 | #endif 57 | 58 | #define MAX_TIME LONG_MAX 59 | 60 | static struct timeval tv_init; 61 | 62 | static struct timer_list_struct { 63 | struct timer *list; 64 | unsigned long when; 65 | struct sigaction old_act; 66 | } timer_list; 67 | 68 | 69 | 70 | unsigned long get_time() 71 | { 72 | struct timeval tv_now,tv; 73 | gettimeofday(&tv_now,NULL); 74 | timersub(&tv_now,&tv_init,&tv); 75 | return tv.tv_sec*MODEM_HZ + tv.tv_usec/(1000000/MODEM_HZ); 76 | } 77 | 78 | static void set_timer(unsigned long when) 79 | { 80 | struct itimerval it; 81 | long t; 82 | t = (long)(when - get_time()); 83 | if( t <= 0) t = 1; 84 | it.it_interval.tv_usec = 0; 85 | it.it_interval.tv_sec = 0; 86 | it.it_value.tv_usec = (t%MODEM_HZ)*(1000000/MODEM_HZ); 87 | it.it_value.tv_sec = t/MODEM_HZ; 88 | setitimer(ITIMER_REAL,&it,NULL); 89 | } 90 | 91 | 92 | static void timer_list_handler(int num) 93 | { 94 | unsigned long now; 95 | struct timer *t,*next; 96 | now = get_time(); 97 | t = timer_list.list; 98 | timer_list.list = NULL; 99 | while(t) { 100 | next = t->next; 101 | t->next = NULL; 102 | if( (long)(t->expires - now) <= 0 ) { 103 | t->added = 0; 104 | if(t->func) { 105 | t->func(t->data); 106 | } 107 | } 108 | else { 109 | t->next = timer_list.list; 110 | timer_list.list = t; 111 | } 112 | t = next; 113 | } 114 | timer_list.when = now + MAX_TIME; 115 | t = timer_list.list; 116 | while(t) { 117 | if((long)(timer_list.when - t->expires) > 0) 118 | timer_list.when = t->expires; 119 | t = t->next; 120 | } 121 | set_timer(timer_list.when); 122 | } 123 | 124 | 125 | void timer_init(struct timer *t) 126 | { 127 | t->next = 0; 128 | t->added = 0; 129 | t->expires = 0; 130 | t->func = NULL; 131 | t->data = NULL; 132 | } 133 | 134 | int timer_add(struct timer *t) 135 | { 136 | sigset_t set, old_set; 137 | sigemptyset(&set); 138 | sigaddset(&set,SIGALRM); 139 | sigprocmask(SIG_BLOCK,&set,&old_set); 140 | if(t->added) { 141 | WARN("timer_add: already.\n"); 142 | } 143 | else { 144 | t->added = 1; 145 | t->next = timer_list.list; 146 | timer_list.list = t; 147 | } 148 | if((long)(timer_list.when - t->expires) > 0) { 149 | timer_list.when = t->expires; 150 | set_timer(timer_list.when); 151 | } 152 | sigprocmask(SIG_SETMASK,&old_set,NULL); 153 | return 0; 154 | } 155 | 156 | int timer_del(struct timer *t) 157 | { 158 | sigset_t set, old_set; 159 | struct timer *p, **prev; 160 | sigemptyset(&set); 161 | sigaddset(&set,SIGALRM); 162 | sigprocmask(SIG_BLOCK,&set,&old_set); 163 | if(t->added) { 164 | p = timer_list.list; 165 | prev = &timer_list.list; 166 | while(p) { 167 | if(p == t) { 168 | *prev = t->next; 169 | t->next = NULL; 170 | t->added = 0; 171 | break; 172 | } 173 | prev = &((*prev)->next); 174 | p = p->next; 175 | } 176 | } 177 | else { 178 | WARN("timer_del: not added\n"); 179 | } 180 | sigprocmask(SIG_SETMASK,&old_set,NULL); 181 | return 0; 182 | } 183 | 184 | 185 | int modem_timer_init() 186 | { 187 | struct sigaction act; 188 | gettimeofday(&tv_init,NULL); 189 | timer_list.list = NULL; 190 | timer_list.when = get_time() + MAX_TIME; 191 | act.sa_handler = timer_list_handler; 192 | sigemptyset(&act.sa_mask); 193 | sigaddset(&act.sa_mask, SIGALRM); 194 | act.sa_flags = SA_SIGINFO; 195 | sigaction(SIGALRM,&act,&timer_list.old_act); 196 | set_timer(timer_list.when); 197 | return 0; 198 | } 199 | 200 | void modem_timer_exit() 201 | { 202 | sigaction(SIGALRM,&timer_list.old_act,NULL); 203 | } 204 | 205 | 206 | -------------------------------------------------------------------------------- /Documentation/x86_64.txt: -------------------------------------------------------------------------------- 1 | 2 | from Marvin Stodolsky 3 | to Jean-Pierre Demailly , 4 | cc Discuss@linmodems.org, 5 | date Sun, Jan 20, 2008 at 11:18 AM 6 | subject Re: Modem Motorola SM56 7 | 8 | Jean 9 | 10 | For candidate modem in PCI bus: 00:1b.0 11 | Class 0403: 8086:284b Audio device: Intel Corporation 82801H 12 | Primary PCI_id 8086:284b 13 | Subsystem PCI_id 103c:30cc 14 | Softmodem codec or chipset from diagnostics: 15 | from Archives: 10573055 16 | ------ 17 | should be supported. 18 | But the needed slmodemd helper has a precompiled 32 bit component. 19 | So you must install 32 bit versions of packages libasound2 and libasound2-dev. 20 | 21 | With that done: 22 | --------------- 23 | Download from http://linmodems.technion.ac.il/packages/smartlink/ 24 | the package SLMODEMD.gcc4.2.tar.gz having a compiled slmodemd. Unpack 25 | under Linux with: 26 | $ tar zxf SLMODEMD.gcc4.2.tar.gz 27 | and read instructions therein. But briefly, the modem is setup with 28 | command: 29 | slmodemd -c YOUR_COUNTRY --alsa hw:0,1_or_hw:0,6 30 | reporting dynamic creation of ports: 31 | /dev/ttySL0 --> /dev/pts/N , with N some number 32 | Read Smartlink.txt and Modem/YourSystem.txt for follow through guidance. 33 | --------- 34 | 35 | Report back presently. 36 | 37 | MarvS 38 | 39 | ==================== 40 | 41 | to discuss@linmodems.org, 42 | Jean-Pierre Demailly , 43 | date Mon, Mar 10, 2008 at 6:51 PM 44 | subject Patches for slmodem and related software 45 | 46 | Hi: 47 | 48 | I am happy to report that I have finally been able to get most of 49 | the functionality of the winmodem Motorola SM56 to work on my laptop 50 | (HP Pavilion DV9000, running Debian/Linux kernel 2.6.23 on x86_64) 51 | 52 | However, I encountered several difficulties, some of them not 53 | so easy to solve -- I guess that most beginners would have got 54 | stuck at some point (if not all of them). 55 | 56 | Therefore I send here some bits which could help to fix these issues. 57 | 58 | 1. Compilation 59 | 60 | The Makefiles distributed with the slmodem package are broken 61 | on 64 bit machines, because there are 32 bit binaries and you need 62 | ad hoc compile switches. I enclose in the enclosed tar ball sm56.tar.bz2 63 | a 'slmodem.diff' file which contains the required modifications 64 | to the Makefiles to make them work flawlessly in 32 bit/64 bit settings. 65 | 66 | 2. fax 67 | Don't know in general, but it worked OK almost from scratch with 68 | xfax (of which I am a co-author). Very old stuff, but I am used to it 69 | and it still works fine ! 70 | 71 | 3. PPP connection 72 | It took me some time to figure out a wvdial.conf script that works. 73 | One is enclosed. 74 | 75 | 4. V.23 mode for French Minitel 76 | I was really upset that it seemed almost to work, but the echo of 77 | characters was completely garbled and made the all process useless. 78 | I did not manage to get it working through adjustments of the xtel 79 | configuration files. The difficulty is that the SM56 has a rather 80 | awkward parity setting that xtel does not seem to know about, and the 81 | only way I found was to patch the xteld daemon - using a FORCE_PARITY 82 | switch which I added. Patch also enclosed here, together with the 83 | "xtel.lignes" configuration for SM56. 84 | 85 | 5. I have added some docs that were useful to me, as well as scripts 86 | 'modem' and 'modem.sh' which I use to start the modem services (as 87 | I want possibly to commute with another modem, and don't want to have 88 | them loaded at boot). 89 | 90 | I still have minor annoyances. For instance, the modem frequently does not 91 | hang off when the connection is over, e.g. with xtel. Maybe the init 92 | strings can be improved to achieve this. 93 | 94 | Best regards, 95 | 96 | Jean-Pierre Demailly 97 | 98 | =============================== 99 | 100 | Jean-Pierre Demailly , 101 | date Sun, Mar 16, 2008 at 4:08 AM 102 | subject Re: "This is a NEW softmodem case! 103 | 104 | On Sat, Mar 15, 2008 at 05:58:00PM -0400, Marvin Stodolsky wrote: 105 | 106 | Hi Marvin, 107 | 108 | > What is the procedure for doing a 32 bit boot on a x86_64 system, 109 | > or does one simple use a 32 bit kernel+modules? 110 | > 111 | 112 | Yes indeed - that's it. x86_64 processors can execute all 64 bit and 113 | 32 bit instructions, but only Linux kernels running in 64 bit mode can run 114 | simultaneously 64 bit and 32 bit binary programs, provided that all 115 | needed 32 bit and 64 bit dynamic libraries are available (I guess that 116 | the other way round on 32 bit kernels would be hard because of 64 bit 117 | system calls). 118 | 119 | Right now slmodemd has to be compiled in 32 bit mode because of the 120 | proprietary 32 bit binary blobs ; it might eventually be possible to 121 | convert them to 64 bit using binary conversion tools such as objcopy, 122 | but I didn't succeed to link the resulting blob (the table of pointers 123 | produced by objcopy was reported by gcc to be incorrect). In any case, 124 | 32 bit slmodemd runs flawlessly on my x86_64 machine, with the 125 | following 'ldd /usr/sbin/slmodemd' output : 126 | 127 | linux-gate.so.1 => (0xffffe000) 128 | libasound.so.2 => /usr/lib32/libasound.so.2 (0xf7ee8000) 129 | libc.so.6 => /lib32/libc.so.6 (0xf7da1000) 130 | libm.so.6 => /lib32/libm.so.6 (0xf7d7c000) 131 | libdl.so.2 => /lib32/libdl.so.2 (0xf7d78000) 132 | libpthread.so.0 => /lib32/libpthread.so.0 (0xf7d60000) 133 | /lib/ld-linux.so.2 (0xf7fdc000) 134 | 135 | I believe that, on the other hand, it is not possible to get a 32 bit module 136 | being loaded by a 64 bit kernel (at least without using some kind of 137 | complicated emulation or virtual machine). 138 | 139 | Best regards, 140 | JP Demailly --------------------------------------------------------------------------------