Re: Edwin, USA, kernel 3.0.0-12-generic
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
I've managed to gain access to it as a normal user by using a script to create a symbolic link between /dev/ttySM0 and /dev/modem, however I can't seem to get this script to initialize on system bootup, I have placed it in /etc/init.d and have marked it as executable, the contents of the script are as follows:
#!/bin/sh -e # #Symbolic link for kppp # sudo ln -s /dev/ttySM0 /dev/modemIf I manually run the script as root after the system is up and running I have no problem accessing the modem as a normal user, but I'd prefer not to have to manually do this every time I want to access the modem. And please don't give me any lectures on security, Linux as most of us know full well is overly secured against letting normal desktop users do things they should be able to do (that level of security may be necessary in a corporate environment, but not generally in a home use environment such as the one I'm using this system in). In a situation where the system is in use by a home user there is no need for such paranoia usually. Users want to be able to actually use their system the way they want to use it, not have to worry about system permissions and file permissions and whatnot constantly.
Anyway again I thank you for helping me get the drivers compiled, I'm hoping someone can and is willing to help me get that script to properly run at bootup so that the modem is readily accessible to normal users.
As always thank you to anyone who can help, Edwin On 11/21/2011 06:20 PM, Marvin Stodolsky wrote:
PPP is considered a Security RIsk. That is why Root/Adm permission is required to start a PPP connection. Our general recommendation is to: $ sudo modprobe martian_dev $ sudo martian_modem will setup the modem. Then $ sudo wvdialconf will create a /etc/wvdial.conf , which you can edit with: $ sudo gedit /etc/wvdial.conf removing the ;< > symbols as you put in your personal info. Also add a line: Carrier Check = no --- This wvdialconf does not need to be repeated. Start dialouts with: $ sudo wvdial If you have further problems, do write to the List. We do strongly recommend that you get use to such manual usage, before using graphical interfaces and changing permissions. MarvS On Mon, Nov 21, 2011 at 5:30 PM, bartman2589<bartman2589@xxxxxxx> wrote:THANK YOU VERY MUCH, It compiled using the new Makefile and seems to run ok, now I just need to get it configured to allow normal user account access to the modem. Running KPPP as root ('kdesudo kppp') and unchecking 'check for dialtone' allows me to query the modem just fine. Any chance of getting some help setting it up for normal user access too now? I greatly appreciate all you've both done to help me. I really don't want to have to do all my faxing as root if I can avoid it. :) On 11/21/2011 11:09 AM, Marvin Stodolsky wrote:Replace the Makefile with the attached , after unzipping. Then $ sudo make cleam $ sudo make all and the compile will be OK, per below The problem was an old kernel SUBLEVEL constraint, not cogent under the 3.0.n kernels MarvS martian-full-20100123$ sudo make all make -C kmodule/ modules make: Entering directory `/usr/src/pkg/martian/martian-full-20100123/kmodule' make -C /lib/modules/3.0.0-12-generic/build M="/usr/src/pkg/martian/martian-full-20100123/kmodule" modules make: Entering directory `/usr/src/linux-headers-3.0.0-12-generic' CC [M] /usr/src/pkg/martian/martian-full-20100123/kmodule/martian.o /usr/src/pkg/martian/martian-full-20100123/kmodule/martian.c: In function ‘martian_isr’: /usr/src/pkg/martian/martian-full-20100123/kmodule/martian.c:135:27: warning: value computed is not used [-Wunused-value] CC [M] /usr/src/pkg/martian/martian-full-20100123/kmodule/marsio.o /usr/src/pkg/martian/martian-full-20100123/kmodule/marsio.c:358:11: warning: ‘mars_read_register_rem’ defined but not used [-Wunused-function] /usr/src/pkg/martian/martian-full-20100123/kmodule/marsio.c:371:13: warning: ‘mars_write_register_rem’ defined but not used [-Wunused-function] In file included from /usr/src/linux-headers-3.0.0-12-generic/arch/x86/include/asm/uaccess.h:570:0, from /usr/src/pkg/martian/martian-full-20100123/kmodule/marsio.c:2: In function ‘copy_from_user’, inlined from ‘mars_download_dsp_user’ at /usr/src/pkg/martian/martian-full-20100123/kmodule/marsio.c:767:22: /usr/src/linux-headers-3.0.0-12-generic/arch/x86/include/asm/uaccess_32.h:211:26: warning: call to ‘copy_from_user_overflow’ declared with attribute warning: copy_from_user() buffer size is not provably correct [enabled by default] CC [M] /usr/src/pkg/martian/martian-full-20100123/kmodule/mfifo.o LD [M] /usr/src/pkg/martian/martian-full-20100123/kmodule/martian_dev.o Building modules, stage 2. MODPOST 1 modules CC /usr/src/pkg/martian/martian-full-20100123/kmodule/martian_dev.mod.o LD [M] /usr/src/pkg/martian/martian-full-20100123/kmodule/martian_dev.ko make: Leaving directory `/usr/src/linux-headers-3.0.0-12-generic' make: Leaving directory `/usr/src/pkg/martian/martian-full-20100123/kmodule' make -C modem/ all make: Entering directory `/usr/src/pkg/martian/martian-full-20100123/modem' CC main.o CC dumpers.o CC log.o CC session.o CC mport.o CC pty.o pty.c: In function ‘accept_client’: pty.c:290:18: warning: variable ‘timeout’ set but not used [-Wunused-but-set-variable] CC sysdep.o CC isr.o CC smp.o CC core_if.o CC coresubst.o CC link.o CC tweakrelocsdynamic.o CC coreadd.o CC elf386tweakrelocs LD marscore.o TWEAK marscore.o LD martian_modem make: Leaving directory `/usr/src/pkg/martian/martian-full-20100123/modem' On Mon, Nov 21, 2011 at 8:14 AM, Antonio Olivares <olivares14031@xxxxxxxxx> wrote:Edwin, I don't get the errors that you are getting :( I get WARNINGS, but that is about it. martian module is created see below: [students@localhost martian-full-20100123]$ cat README Martian is an alternative to the ltmodem and provides Linux support for Agere WinModem hardware. Major difference is that core moved to the user space. Driver comprises two parts: martian_dev - kernel module to configure devices, and serve irqs from it martian_modem - user mode application to supply major IO, buffers, user level streams. For specific details concerning distribution and usage look in directories. When configuring wvdial add "Carrier Check = no" line. No modem status is checked yet. Kernel mode part is linux-2.6 module. Project has a sitehttp://martian.barrelsoutofbond.org/. There is also maintenance within the Debian distribution Athttp://www.debian.org/distrib/packages , search with "martian" for direction to the most recent code. [students@localhost martian-full-20100123]$ ls ChangeLog Concept kmodule martian.h README scripts Cleaning.txt INSTALL Makefile modem sample.txt [students@localhost martian-full-20100123]$ cat INSTALL ================= Building ================= In root directory run $ make all ================== Installation ================== In root directory run $ su # make install ============== Running ============== Load module and run martian_modem first. # modprobe martian_dev # martian_modem [Options] [Tty] Now Tty is the name of the device file to represent your modem. You'll supply it to the dialer. /dev/ttySM0 if argument omitted. Left martian_modem running and start the dialer. See options available # martian_modem --help ============== Auto ============== In scripts/ directory run automate.sh. $ cd scripts/ $ ./automate.sh You can supply the option to be passed to martian_modem on loading like $ ./automate --mode 0660 See ./automate.sh --help for more options. ============== Notes ============== 'martian_modem' program is a crucial part of the driver. It should be running as long as you access the modem. For technical reasons carrier status support is not available for the modem client. Configure dialer respectively. For wvdial add "Check Carrier = No" line to the configuration file. x86_64 platform. ---------------- martian_modem is a 32-bit application. It can be built on x86_64 the way prescribed, but you need 32-bit development environment for that. Second option is to use binary built on i386. To compile and install module only do $ make -C kmodule/ modules $ su # make -C kmodule/ install [students@localhost martian-full-20100123]$ make -C kmodule/ modules make: Entering directory `/home/students/Downloads/martian-full-20100123/kmodule' make -C /lib/modules/3.1.1-2.fc16.x86_64/build M="/home/students/Downloads/martian-full-20100123/kmodule" modules make: Entering directory `/usr/src/kernels/3.1.1-2.fc16.x86_64' CC [M] /home/students/Downloads/martian-full-20100123/kmodule/martian.o /home/students/Downloads/martian-full-20100123/kmodule/martian.c: In function ‘martian_isr’: /home/students/Downloads/martian-full-20100123/kmodule/martian.c:135:27: warning: value computed is not used [-Wunused-value] CC [M] /home/students/Downloads/martian-full-20100123/kmodule/marsio.o /home/students/Downloads/martian-full-20100123/kmodule/marsio.c:358:11: warning: ‘mars_read_register_rem’ defined but not used [-Wunused-function] /home/students/Downloads/martian-full-20100123/kmodule/marsio.c:371:13: warning: ‘mars_write_register_rem’ defined but not used [-Wunused-function] CC [M] /home/students/Downloads/martian-full-20100123/kmodule/mfifo.o LD [M] /home/students/Downloads/martian-full-20100123/kmodule/martian_dev.o Building modules, stage 2. MODPOST 1 modules CC /home/students/Downloads/martian-full-20100123/kmodule/martian_dev.mod.o LD [M] /home/students/Downloads/martian-full-20100123/kmodule/martian_dev.ko make: Leaving directory `/usr/src/kernels/3.1.1-2.fc16.x86_64' make: Leaving directory `/home/students/Downloads/martian-full-20100123/kmodule' [students@localhost martian-full-20100123]$ make -C kmodule/ install make: Entering directory `/home/students/Downloads/martian-full-20100123/kmodule' make -C /lib/modules/3.1.1-2.fc16.x86_64/build M="/home/students/Downloads/martian-full-20100123/kmodule" modules_install make: Entering directory `/usr/src/kernels/3.1.1-2.fc16.x86_64' INSTALL /home/students/Downloads/martian-full-20100123/kmodule/martian_dev.ko cp: cannot create regular file `/lib/modules/3.1.1-2.fc16.x86_64/extra/martian_dev.ko': Permission denied DEPMOD 3.1.1-2.fc16.x86_64 FATAL: Could not open /lib/modules/3.1.1-2.fc16.x86_64/modules.dep.temp for writing: Permission denied make: *** [_emodinst_post] Error 1 make: Leaving directory `/usr/src/kernels/3.1.1-2.fc16.x86_64' make: *** [install] Error 2 make: Leaving directory `/home/students/Downloads/martian-full-20100123/kmodule' [students@localhost martian-full-20100123]$ su -c 'make -C kmodule/ install' Password: make: Entering directory `/home/students/Downloads/martian-full-20100123/kmodule' make -C /lib/modules/3.1.1-2.fc16.x86_64/build M="/home/students/Downloads/martian-full-20100123/kmodule" modules_install make: Entering directory `/usr/src/kernels/3.1.1-2.fc16.x86_64' INSTALL /home/students/Downloads/martian-full-20100123/kmodule/martian_dev.ko DEPMOD 3.1.1-2.fc16.x86_64 make: Leaving directory `/usr/src/kernels/3.1.1-2.fc16.x86_64' if ! /sbin/modprobe -nq martian_dev ; then /sbin/depmod -a; fi make: Leaving directory `/home/students/Downloads/martian-full-20100123/kmodule' [students@localhost martian-full-20100123]$ ls /lib/modules/`uname -r`/ build modules.dep.bin modules.pcimap extra modules.devname modules.seriomap kernel modules.drm modules.softdep modules.alias modules.ieee1394map modules.symbols modules.alias.bin modules.inputmap modules.symbols.bin modules.block modules.isapnpmap modules.usbmap modules.builtin modules.modesetting source modules.builtin.bin modules.networking updates modules.ccwmap modules.ofmap vdso modules.dep modules.order [students@localhost martian-full-20100123]$ ls /lib/modules/`uname -r`/extra/ martian_dev.ko [students@localhost martian-full-20100123]$ ls /lib/modules/`uname -r`/extra/ -l total 536 -rw-rw-r--. 1 root root 546982 Nov 21 07:08 martian_dev.ko Please try the following and send it to us(listdiscuss@xxxxxxxxxxxxx) $ cd martian-full-20100123 $ make clean $ make $ sudo make install if one of these commands fails, please post all messages that you get and attach them here. Regards, Antonio On Mon, Nov 21, 2011 at 6:58 AM, Antonio Olivares <olivares14031@xxxxxxxxx> wrote:Edwin, It could be a detection problem? kernel 3.0.X is newer than 2.6.20, 2.6.39.X, etc. Maybe martian code is not 3.X kernel friendly, I thought that there could be error messages about some things(functions) that have changed with the new kernel releases, but the make command returns something different. I will try to check up on that and cc. to Marv in case he has some suggestions for you to try out. Regards, Antonio On Sun, Nov 20, 2011 at 10:51 PM, bartman2589<bartman2589@xxxxxxx> wrote:Antonio, thanks for taking the time to try to help me with this, when I try running just 'make' from within the folder I extracted the source to I get the following message: "The martian_dev.ko driver and the complementary helper martian_helper are for use with kernels after 2.6.20. Use the martian-20080407.tar.gz for earlier kernels." It's as if it isn't recognizing that my kernel is newer than 2.6.20, I also noticed in the ModemData.txt file that it doesn't seem to notice that the 'linux-headers-3.0.0-12-generic' package is in fact already installed (though I think this is more of a problem with scanmodem itself). Thanks, Edwin On 11/20/2011 12:35 PM, Antonio Olivares wrote:Edwin, On Sun, Nov 20, 2011 at 11:23 AM, bartman2589<bartman2589@xxxxxxx> wrote:Hi to everyone who ends up receiving this, I'm having trouble compiling/installing the 'martian-full-20100123' drivers obtained from http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/martian/ under Kubuntu 11.10 32 bit (if indeed that's the one I'm supposed to be using), I've attached the output from scanmodem (the ModemData.txt file and the scanout file), and here is the relevant output from the command 'sudo lspci -v': 03:01.0 Communication controller: Agere Systems 56k WinModem (rev 01) Subsystem: Zoom Telephonics Inc Device 9300 Flags: bus master, medium devsel, latency 0, IRQ 9 Memory at feaffc00 (32-bit, non-prefetchable) [size=256] I/O ports at bc00 [size=8] I/O ports at b800 [size=256] Capabilities: [f8] Power Management version 2 I'm hoping someone can help me get this working. I'm a bit of a Linux newb and certainly not a linux programmer, but when I try to run 'make all' from a shell prompt in the folder I extracted the source code into (/home/edwin/martian-full-20100123), I get the following error: "make: *** No rule to make target `all'. Stop.'"Did you try just make? $ make if it succeeds then, run $ sudo make install afterwards. If it does not please reply to this message and post the error messages. You do have the correct driver as scanModem recommends: For candidate card in slot 03:01.0, firmware information and bootup diagnostics are: PCI slot PCI ID SubsystemID Name ---------- --------- --------- -------------- 03:01.0 11c1:0442 141b:9300 Communication controller: Agere Systems 56k WinModem Modem interrupt assignment and sharing: 19: 0 IO-APIC-fasteoi uhci_hcd:usb3 --- Bootup diagnostics for card in PCI slot 03:01.0 ---- [ 0.177339] pci 0000:03:01.0: [11c1:0442] type 0 class 0x000780 [ 0.177356] pci 0000:03:01.0: reg 10: [mem 0xfeaffc00-0xfeaffcff] [ 0.177366] pci 0000:03:01.0: reg 14: [io 0xbc00-0xbc07] [ 0.177376] pci 0000:03:01.0: reg 18: [io 0xb800-0xb8ff] [ 0.177421] pci 0000:03:01.0: supports D2 [ 0.177424] pci 0000:03:01.0: PME# supported from D2 D3hot D3cold [ 0.177428] pci 0000:03:01.0: PME# disabled The PCI slot 03:01.0 of the modem card may be disabled early in a bootup process, but then enabled later. If modem drivers load but the modem is not responsive, read DOCs/Bootup.txt about possible fixes. Send dmesg.txt along with ModemData.txt todiscuss@xxxxxxxxxxxxx if help is needed. If you are able to install the driver but the modem is unresponsive please do as instructed above. Regards, AntonioI have tried searching on the Internet to find references on how to correct this problem but I can't seem to find anything relevant that I can make sense of. So I'm turning to the Linmodems community in the hopes that somebody can help me figure this out. Incidentally I'm also trying to install a similar modem into another computer, but I'll wait to see what I learn here before I attempt to proceed further with the other system (who knows I may not need any help with that one once I get this one figured out :) ). Thanks for any help anyone can provide, Edwin Barton