LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slack 12-Modem Issue (https://www.linuxquestions.org/questions/slackware-14/slack-12-modem-issue-607788/)

svar 12-19-2007 01:20 AM

Slack 12-Modem Issue
 
I am trying to get an extrenal modem and KPPP working under slack 12
On my machine I have the option of booting 3 linux systems and the modem
does work on the other two.
The first issue is that /dev/modem is not found. This is fixed by doing:


ln -sf /dev/ttyS0 /dev/modem

However, I don't want to do that everytime the machine boots. So
is there a way to do it permamently? Should I put in in the init? If so, where exactly?

Second, when I do kppp I get:
kppp
Opener: received SetSecret
Opener: received SetSecret
sh: atz: command not found
Opener: received OpenLock

Opener: received OpenDevice

and nothing more. Any ideas what the problem may be?

perfect_circle 12-19-2007 02:05 PM

Quote:

Originally Posted by svar (Post 2995471)
I am trying to get an extrenal modem and KPPP working under slack 12
On my machine I have the option of booting 3 linux systems and the modem
does work on the other two.
The first issue is that /dev/modem is not found. This is fixed by doing:


ln -sf /dev/ttyS0 /dev/modem

However, I don't want to do that everytime the machine boots. So
is there a way to do it permamently? Should I put in in the init? If so, where exactly?

Your problem is that now days all the /dev/* files are created automatically by udev.

An ugly fix would be to add the "ln -s" line to /etc/rc.d/rc.local which is the last file executed at start-up.

A better way would be to add new rule in udev. The udev rules are in /etc/udev/rules.d. For example the rule that creates the /dev/ttyS0 devices is in the file 50-udev.rules:

Code:

skalkoto@darkstar:/etc/udev/rules.d$ grep -n ttyS *
50-udev.rules:227:KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="%k", GROUP="uucp", MODE="0660"
skalkoto@darkstar:/etc/udev/rules.d$


You may create a new file in /etc/udev/rules.d, let's say modem.rules and add a line like this (i guess):

Code:

KERNEL="ttyS0",NAME="tts/0",SYMLINK="modem"
this will create a modem link to tts/0 which is the actual file ttyS0 points to:
Code:

skalkoto@darkstar:~$ ls -la /dev/ttyS0
lrwxrwxrwx 1 root root 5 2007-12-19 03:34 /dev/ttyS0 -> tts/0
skalkoto@darkstar:~$

I haven't tried it but it should work I think.

svar 12-20-2007 04:07 AM

Ok, thanks. Will that also cure the second problem, or is it different?

Why isn't this solution implemented in the Slack installation disk?

svar 12-28-2007 01:42 AM

I made a modem.rules file in /etc/udev/rules.d

KERNEL="ttyS0",NAME="tts/0",SYMLINK="modem"

but I get
cannot find /dev/modem

from what I gather (and also because of the failure of kppp also when I manually create the symlink,
it looks like the problem is ttyS0 which may be used for something else? Is there a way to check and if so,
should I try ttyS1 and so on?

gnashley 12-28-2007 03:38 AM

Is the modem a serial modem that connects to the serial port?

svar 12-28-2007 03:58 AM

Yes. It is /dev/modem (/dev/ttyS0) in another Linux distribution I have on the same machine(and it works
fine for that distro)

So the main problem is not having to create /dev/modem manually in Slack 12, but that
even when I do that, kppp gives:
Opener: received SetSecret
Opener: received SetSecret
sh: atz: command not found
Opener: received OpenLock

Opener: received OpenDevice
and just hangs there

swampdog2002 12-28-2007 07:55 AM

Take at look at this link:

http://gentoo-wiki.com/HOWTO_Setup_a_Dialup_Connection

It is for Gentoo, but take a look at the section that explains how to setup a dialup connection. These steps should pertain to Slackware as well. I actually use GNOME PPP, which is a front-end to wvdial, and had to first adjust permissions and establish a dialout group before normal users could use ppp. From your posts, it seems to be a permissions issue to me, so see if you can find anything relevant in the aforementioned link. Good luck!

KnightHawk 12-28-2007 12:51 PM

Doesn't kppp have an option for setting the device to use? Why not just set it for /dev/ttyS0 ?

svar 12-29-2007 11:19 AM

pppsetup says it does not find ppp support either in the kernel or as a loadable module.... I though I had it, but I am not sure. So I need to do a
cd /usr/src/linux
make menuconfig
(specify I want ppp/serial support)
make dep clean modules modules_install zImage

or am I missing something?

BTW, the gentoo manual was nice, but did not really help. Examples would help e.g. for the use of minicom

swampdog2002 12-29-2007 12:24 PM

The basic permissions that may need to be established also apply to Slackware as well, since I have done a similar setup numerous times for all of my machines. The only difference is that I usually create a group called dialout, contradictory to what the article mentions. This doesn't really matter though, as long as the users needing dial-up access belong to this group (whatever its name may be), and that the group has access to the pppd program. Just out of curiosity, can you use kppp as root? It is not recommended, but it would be interesting to know if it would work for the superuser just for testing, thereby giving a clue as to whether your permissions are properly established or not. Again, I don't use kppp, but have in the past and it was always, at least from what I recall, an issue with permissions. Sorry, I have no examples for minicom to provide you, but I'm sure you could search this site for more information or the Internet.

Also, when adding ppp support in your kernel, I have found it to work for me to add support for this as a module, and then probe for the ppp_generic module at startup. On one machine that I have, I also need the ppp_async module loaded as well, but this would depend on your hardware setup I imagine.

svar 12-30-2007 01:52 PM

Ok, ppp support was built -in as a module
<M>
At any rate I cannt build it in the kernel:
.....
OSTCC arch/i386/boot/tools/build
BUILD arch/i386/boot/zImage
Root device is (3, 66)
Boot sector 512 bytes.
Setup is 7441 bytes.
System is 2049 kB
System is too big. Try using bzImage or modules.
make[1]: *** [arch/i386/boot/zImage] Error 1
make: *** [zImage] Error 2
bash-3.1#

==============
Other than that, kppp does not work period, either as a user or as root(even though ppp support is there as a module-yest pppsetup does not think so...

Any suggestions on how to probe for the module? I am really puzzled here: make menuconfig found
that ppp is supported as a module, but pppsetup did not think so. Who is right?
How do I find out?

Also, if people do not use kppp, what do they use? kinternet is ok, but I guess only for Suse.
wvdial does not seem to be there in Slack 12

blackhole54 12-31-2007 04:57 AM

Quote:

Originally Posted by svar (Post 3005887)
At any rate I cannt build it in the kernel:
.....
OSTCC arch/i386/boot/tools/build
BUILD arch/i386/boot/zImage
Root device is (3, 66)
Boot sector 512 bytes.
Setup is 7441 bytes.
System is 2049 kB
System is too big. Try using bzImage or modules.
make[1]: *** [arch/i386/boot/zImage] Error 1
make: *** [zImage] Error 2
bash-3.1#

==============

It looks like you tried to make a zImage. Try making a bzImage.

Quote:

Any suggestions on how to probe for the module? I am really puzzled here: make menuconfig found
that ppp is supported as a module, but pppsetup did not think so. Who is right?
How do I find out?
On older kernels, the module was called ppp, but I am not so sure about recent kernels. I just went looking on a year old Ububuntu, and didn't find anything by that name. You can find the modules with ppp in the name with the command:

Code:

find /lib/modules/$(uname -r) iname "*ppp*"
This will list the actual files, which should all end with a .ko extension.

You can load such a module with modprobe. To load a module called ppp, you would type, as root:

Code:

modprobe ppp
Note that you do not type the .ko

swampdog2002 12-31-2007 09:04 AM

I have been using the 2.6.x.x kernels for some time, and the kernel module that I have needed for ppp is called ppp_generic. I am not certain how you are building your kernel, but as blackhole54 mentioned you should be using bzImage instead. After you have gone through the kernel configuration and have build and installed your kernel, the ppp_generic module should be ready once you boot into your newly compiled kernel. Once you have successfully booted, you can just probe for the module by typing the following:
Code:

modeprobe ppp_generic
If this works for you, you can add this to the /etc/rc.d/rc.modules file to have this automatically loaded upon boot-up.

svar 01-03-2008 04:46 PM

swampdog 2002 wrote:
Quote:

and the kernel module that I have needed for ppp is called ppp_generic.
That's the point
I do not see any ppp.ko and there is no ppp_generic in the menuconfig options:

bash-3.1# modprobe ppp_generic
bash-3.1#
=============
make menuconfig
Network device support
...
<M> PLIP(Paralel Port) support
<M> PPP(Point-to-point protocol) support[*] PPP multilink support(EXPERIMENTAL)[*] PPP filtering
[M] PPP support for async serial ports
[M] PPP support for sync tty ports
<M> PPP Deflate compression
<M> PPP BSD-Compress compression
<M> PPP MPPE compression(encryption)(EXPERIMENTAL)
<M> PPP over Ethernet(EXPERIMENTAL)
<M> PPP over ATM
<M> SLIP(serial line) support
.....
================================
Which PPP support are you referring to?


============================================
bash-3.1# find /lib/modules/$(uname -r) iname "*ppp*" > /mnt/flash/ppp_check
find: iname: No such file or directory
find: *ppp*: No such file or directory

/lib/modules/2.6.21.5
/lib/modules/2.6.21.5/modules.usbmap
/lib/modules/2.6.21.5/build
/lib/modules/2.6.21.5/modules.inputmap
/lib/modules/2.6.21.5/modules.symbols
/lib/modules/2.6.21.5/kernel
/lib/modules/2.6.21.5/kernel/fs
/lib/modules/2.6.21.5/kernel/fs/9p
/lib/modules/2.6.21.5/kernel/fs/9p/9p.ko
/lib/modules/2.6.21.5/kernel/fs/afs
..........................

/lib/modules/2.6.21.5/kernel/drivers/serial
/lib/modules/2.6.21.5/kernel/drivers/serial/jsm
/lib/modules/2.6.21.5/kernel/drivers/serial/jsm/jsm.ko
/lib/modules/2.6.21.5/kernel/drivers/serial/8250_hub6.ko
/lib/modules/2.6.21.5/kernel/drivers/serial/8250_boca.ko
/lib/modules/2.6.21.5/kernel/drivers/serial/8250_fourport.ko
/lib/modules/2.6.21.5/kernel/drivers/serial/8250_exar_st16c554.ko
/lib/modules/2.6.21.5/kernel/drivers/serial/serial_cs.ko
/lib/modules/2.6.21.5/kernel/drivers/serial/8250_accent.ko
/lib/modules/2.6.21.5/kernel/drivers/telephony
/lib/modules/2.6.21.5/kernel/drivers/telephony/phonedev.ko
/lib/modules/2.6.21.5/kernel/drivers/telephony/ixj.ko
/lib/modules/2.6.21.5/kernel/drivers/telephony/ixj_pcmcia.ko
/lib/modules/2.6.21.5/kernel/drivers/parport
/lib/modules/2.6.21.5/kernel/drivers/parport/parport_cs.ko
/lib/modules/2.6.21.5/kernel/drivers/parport/parport_pc.ko
/lib/modules/2.6.21.5/kernel/drivers/parport/parport_ax88796.ko
/lib/modules/2.6.21.5/kernel/drivers/parport/parport_serial.ko
/lib/modules/2.6.21.5/kernel/drivers/parport/parport.ko
/lib/modules/2.6.21.5/kernel/drivers/bluetooth
/lib/modules/2.6.21.5/kernel/drivers/bluetooth/bt3c_cs.ko
/lib/modules/2.6.21.5/kernel/drivers/bluetooth/hci_usb.ko
/lib/modules/2.6.21.5/kernel/drivers/bluetooth/hci_vhci.ko
/lib/modules/2.6.21.5/kernel/drivers/bluetooth/bluecard_cs.ko
/lib/modules/2.6.21.5/kernel/drivers/bluetooth/bcm203x.ko
/lib/modules/2.6.21.5/kernel/drivers/bluetooth/dtl1_cs.ko
/lib/modules/2.6.21.5/kernel/drivers/bluetooth/bfusb.ko
/lib/modules/2.6.21.5/kernel/drivers/bluetooth/bpa10x.ko
/lib/modules/2.6.21.5/kernel/drivers/bluetooth/btuart_cs.ko
/lib/modules/2.6.21.5/kernel/drivers/bluetooth/hci_uart.ko
/lib/modules/2.6.21.5/kernel/crypto
/lib/modules/2.6.21.5/kernel/crypto/tcrypt.ko
/lib/modules/2.6.21.5/kernel/security
/lib/modules/2.6.21.5/kernel/security/commoncap.ko
/lib/modules/2.6.21.5/kernel/security/capability.ko
/lib/modules/2.6.21.5/kernel/security/root_plug.ko
/lib/modules/2.6.21.5/modules.isapnpmap
/lib/modules/2.6.21.5/source
/lib/modules/2.6.21.5/modules.alias
/lib/modules/2.6.21.5/modules.ofmap
/lib/modules/2.6.21.5/modules.ccwmap
/lib/modules/2.6.21.5/modules.dep
/lib/modules/2.6.21.5/modules.ieee1394map
/lib/modules/2.6.21.5/modules.seriomap
/lib/modules/2.6.21.5/modules.pcimap


============================
swampdog2002 write:
Quote:

but as blackhole54 mentioned you should be using bzImage instead
Why zimage and no bzImage?

Here is what Howtos say:

Linux Kernel Modules Installation HOWTO
Prev
4. Recompiling the Kernel for Modules
The kernel can be reconfigured to use modules for everything other than the file system mounted as root (in most cases, this is the ext2 file system).
However, there are certain items that appear to be difficult to set up properly as modules, so I would recommend the following be compiled into the kernel:
Ethernet hardware drivers.
SCSI CD-ROM drivers.
On the other hand, there are certain driver combinations that ONLY work as modules, especially combinations of two or more of the following group:
A Parallel Printer,
A Parallel Port drive, such as the IOMEGA ZipDrive or JazzDrive, or the BackPack CD-ROM drive, and
The PLIP Daemon.
You will need to decide what you are compiling into the kernel, and what as modules, but should take the above points into consideration. The actual choices are made during the compilation, by the second of the following sequence of instructions:
cd /usr/src/linux
make menuconfig
make dep clean modules modules_install zImage

Having done that, the module dependencies need to be mapped out. This is done with the following command:
depmod -a

The new kernel now needs to be inserted in the boot chain. I am assuming the reader is using LILO for this purpose, since this is the only loader I have any experience with.
I recommend that one does NOT automatically insert the newly compiled kernel as the default Linux kernel since if it should fail, it is then extremely difficult to recover one's Linux setup without doing a complete reinstallation, which is not to be recommended. For this reason, I have the following entry in my /etc/lilo.conf file:
image=/usr/src/linux/arch/i386/boot/zImage
label=new
alias=n
read-only
vga=ask
optional

This entry says that there is an OPTIONAL boot option (which will be ignored if the image in question does not exist) which boots the file /boot/newlinux if selected, and allows one to select the video mode it is to be booted in.
Assuming the existence of the above entry in /etc/lilo.conf the revised kernel is already correctly located at the end of compilation, and it can be installed via the following command:
lilo

Having done that, the reader needs to follow the further steps relevant to their selected distribution, as follows:

blackhole54 01-04-2008 02:24 AM

Quote:

Originally Posted by svar (Post 3010276)
bash-3.1# find /lib/modules/$(uname -r) iname "*ppp*" > /mnt/flash/ppp_check

Uh oh. My bad! That command should have been (note dash before iname):

Code:

find /lib/modules/$(uname -r) -iname "*ppp*"  > /mnt/flash/ppp_check
That will at least isolate any modules with ppp in the name. I hope you just missed them with the deluge you had because of my ommision of a dash.


Quote:

Why zimage and no bzImage?

Here is what Howtos say:
I think you got hold of an old HOWTO. One clue is it is talking about ext2 rather than ext3. I have never used Slackware, by I have only seen bzImage used since at least the 2.2.16 kernel. A bzImage is more compact than a zImage. You should be able to boot from either (assuming you can compile one). But your build failed, complaining about the size.


All times are GMT -5. The time now is 05:10 AM.