PDA

View Full Version : Unable To get Online



Birdie
10-20-2003, 10:51 PM
:lol:
Hi complete Linux virgin here. Thought I would try Knoppix v3.3 to initiate me into the Linux experience. Did HDD install. No problem. Like what I see. However I cannot get online and for me that is like having a nice car without a motor.
My modem is ESS ES56H PI Data Fax Modem. I belive this is a winmodem.Forgive me if incorrect. I do have to install driver for it in Windows OS. In Windows it is on COM3.
I used kppp to make internet account. I tried selecting device as ttyS2 which corresponds to COM3 but i get Modem Query message 'modem is busy' . Tried ttyS1 and message 'unable to open modem' I think was message. Also tried ttyS3 and dev/modem without any luck. From info i found on this forum I ran a few commands
this is the result of cat /proc/pci
Master Capable. Latency=64.
I/O at 0xd000 [0xd01f].
Bus 0, device 7, function 3:
Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 2).
IRQ 9.
Bus 0, device 15, function 0:
VGA compatible controller: S3 Inc. 86c764/765 [Trio32/64/64V+] (rev 84).
IRQ 10.
Non-prefetchable 32 bit memory at 0xe4000000 [0xe7ffffff].
Bus 0, device 16, function 0:
Communication controller: ESS Technology ES2838/2839 SuperLink Modem (rev 1).
IRQ 12.
I/O at 0xd400 [0xd40f].
Bus 0, device 19, function 0:
Multimedia audio controller: ESS Technology ES1969 Solo-1 Audiodrive (rev 2).
IRQ 5.
Master Capable. Latency=64. Min Gnt=2.Max Lat=24.
I/O at 0xd800 [0xd83f].
I/O at 0xdc00 [0xdc0f].
I/O at 0xe000 [0xe00f].
I/O at 0xe400 [0xe403].
I/O at 0xe800 [0xe803].

My modem listed as ES/2838/2839 SUPERLINK . I assume this means Knoppix detecting modem exists. Correct me if wrong on this.

The setserial command deliverd the following:

root@box:~# setserial -g /dev/ttyS*
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
/dev/ttyS4, UART: unknown, Port: 0xffffffff, IRQ: 0
/dev/ttyS5, UART: unknown, Port: 0x01a0, IRQ: 2, Flags: Fourport
/dev/ttyS6, UART: unknown, Port: 0x01a8, IRQ: 2, Flags: Fourport
/dev/ttyS7, UART: unknown, Port: 0x01b0, IRQ: 2, Flags:

I came across what may be a driver if one is in fact required. I downloaded it and accompanying files. These are :

esscom_orig.o
ess_resolver.c
fixscript17.txt
fixscript18.txt
install.txt

I am assume that esscom_orig.o is the driver . The install.txt has this content:

if (lsmod | grep ^esscom); then rmmod esscom; fi
insmod -x esscom.o
if (ls /dev/essmodem); then rm /dev/essmodem -f; fi
mknod /dev/essmodem c 127 1
if (ls /dev/modem); then rm /dev/modem -f; fi
ln -s /dev/essmodem /dev/modem

As a an almost complete Linux illiterate I don't know what to do to either install this driver or even if I have to

I would appreciate any advice from anyone how to resolve this problem so I can start using Knoppix to get on the internet. I hope there is an answer out there as I would like to stop using Windows at some point.

thanks

robwelch100
10-21-2003, 03:38 AM
The last time I looked into the compatability of winmodems ( 3 yrs plus), they weren't supported under linux. Linux likes modems that can do for themselves. I would try to locate a real modem. To use your car analogy, if your internet is like the motor, you might as well use an engine that you know works. You don't want to spend time messing with experimental drivers that may not work with your modem anyway. This will save you many headaches and you can save the real technical tweaking for other components and use your linux system to find the answeres over the internet.
Just my advice, it's free, take it for what it's worth.

RockMumbles
10-21-2003, 06:18 AM
First try this (as root) from a console or terminal from the directory where the esscom.o is located:
insmod -x esscom.o
if you don't get an error then try this:
mknod /dev/essmodem c 127 1
then this:
ln -s /dev/essmodem /dev/modem

At this point you should be able to access your modem, but not at /dev/ttyS2 but at /dev/modem so run whatever ppp config utility and select /dev/modem for the modem device and query the modem.

If everything works at this step then I would copy the esscom_orig.o file (as root) to /lib/modules/2.4.??/kernel/drivers/net. You will have to look into /lib/modules to see what your kernel version is and substitute that for 2.4.??.

The install.txt file is a sample install script that should do most of the work for you, I would copy it to /usr/local/bin and then make it executable by using this command:

chmod u+x /usr/local/bin/install.txt

then run the script:
install.txt
to see if everything works OK, if it does, then make the install.txt script run with every boot by carefully editing /etc/init.d/bootmisc.sh and adding this line at the end of the file:
/usr/local/bin/install.txt

HTH

~rock

Birdie
10-21-2003, 12:22 PM
Hi and thanks for assistance RockMumbles. I followed your advice however when I entered insmod commnad I received following message:

esscom_orig.o kernel-modules mismatch
esscom_orig.o was compiled for kernel version 2.4.18-2mdk
while this kernel is version 2.4.22-xfs

As mentioned in my first post, a few other files came with esscom_orig.o. One of which, ess_resolver.c, states that it addresses this error message. Unfortunatley I do not know how to use this file . It's contents are as follows:


/*
* Ess_resolver.c
*
* Solve problems when someone try to insmod esscom.o for linux2.4.18mdk on a different kernel.
* Ess-technology please publish the driver sources for:
* - ESS Technology ES2838/2839 SuperLink Modem
*
* Copyright 2003 Luca Altamura <lordbuffy@gmx.it>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <elf.h>
#include <linux/module.h>

#define get_data(fp, offset, whence, buffer, buffersize) \
({ \
fseek (fp, offset, whence); \
\
if (fread (buffer, buffersize, 1, fp) <= 0){ \
fprintf (stderr, "Error: fread!\n"); \
return (-1); \
} \
}) \

#define put_data(fp, offset, whence, buffer, buffersize) \
({ \
fseek (fp, offset, whence); \
\
if (fwrite (buffer, buffersize, 1, fp) <= 0){ \
fprintf (stderr, "Error: fwrite!\n"); \
return (-1); \
} \
}) \

struct module_symbol *ksyms = NULL;

int query_module (const char *name, int which, void *buf, size_t bufsize,
size_t * ret);

static char *
format_string (char *string)
{
char *p = NULL;
char *p1 = NULL;

p = string;
p1 = strchr (p, 'R');

if (p == NULL || p1 == NULL)
return NULL;

p1 += 1;
*p1 = '\0';

return (char *) p;
}

static char *
scanner_strstr (struct module_symbol *ksyms, size_t nksyms, char *sym)
{
struct module_symbol *ksym;
unsigned int count = 0;

if (sym == NULL)
return NULL;

for (ksym = ksyms; count < nksyms; ++count, ksyms++) {
if (strstr ((char *) ksyms->name, sym) != NULL) {
return (char *) ksyms->name;
}
}

return NULL;
}

int
scanner_strcmp (struct module_symbol *ksyms, size_t nksyms, char *sym)
{
struct module_symbol *ksym;
unsigned int count = 0;

if (sym == NULL)
return 0;

for (ksym = ksyms; count < nksyms; ++count, ksyms++) {
if (strcmp ((char *) ksyms->name, sym) == 0) {
return (1);
}
}

return 0;
}

/* modutils */

int
resolver (void)
{
struct module_symbol *syms;
struct module_symbol *s;
size_t nksyms;
size_t nsyms;
size_t ret;
size_t bufsize;
int j = 0;

syms = (struct module_symbol *) malloc (bufsize = 16 * 1024);


while (query_module (NULL, QM_SYMBOLS, syms, bufsize, &ret)) {
syms = (struct module_symbol *) realloc (syms, bufsize = ret);
}

if (ret == 0) {
free (syms);
return (-1);
}
else {
nksyms = nsyms = ret;

ksyms = syms;

for (j = 0, s = syms; j < nsyms; ++j, ++s)
s->name += (unsigned long) syms;
}


return nsyms;
}

int
main (int argc, char **argv)
{
FILE *file;
struct stat statbuf;

Elf32_Ehdr elf;

Elf32_Shdr *sh = NULL;
Elf32_Shdr shstrtab;
Elf32_Shdr strtab;

Elf32_Sym *symbol = NULL;

unsigned int i = 0;
unsigned int j = 0;
unsigned int nksyms = 0;

char *section_strtab = NULL;
char *symbol_strtab = NULL;
char *format = NULL;
char *format_sym = NULL;

if (argc < 2) {
fprintf (stderr, "Ess-resolver. Lordbuffy@gmx.it\n");
fprintf (stderr, "usage: %s file.o\n", argv[0]);
return (-1);
}

if (stat (argv[1], &statbuf) < 0) {
fprintf (stderr, "Error: stat!\n");
return (-1);

}

if ((file = fopen (argv[1], "rb+")) == NULL) {
fprintf (stderr, "Error: fopen!\n");
return (-1);
}

if (fread (&elf, sizeof (elf), 1, file) <= 0) {
fprintf (stderr, "Error: fread!\n");
return (-1);
}

/* some controls ehhehe */

if (elf.e_ident[EI_MAG0] != 0x7f || elf.e_ident[EI_MAG1] != 'E' ||
elf.e_ident[EI_MAG2] != 'L' || elf.e_ident[EI_MAG3] != 'F') {
fprintf (stderr, "Error: %s is not an elf file!\n", argv[0]);
return (-1);
}

if (elf.e_type != ET_REL) {
fprintf (stderr, "Error: %s must be an object-rel file!\n", argv[0]);
return (-1);
}

/* get kernel syms */

if ((nksyms = resolver ()) == 0) {
fprintf (stderr, "Error: No Symbols!\n");
return (-1);
}

/* get shstrtab struct from file */

get_data (file, elf.e_shoff + (elf.e_shstrndx * elf.e_shentsize), SEEK_SET,
&shstrtab, elf.e_shentsize);

fseek (file, shstrtab.sh_offset, SEEK_SET);

section_strtab = (char *) malloc (shstrtab.sh_size + 1);

memset (section_strtab, '\0', shstrtab.sh_size + 1);

/* get shstrtab content from file */

if (fread (section_strtab, shstrtab.sh_size, 1, file) <= 0) {
fprintf (stderr, "Error: fread!\n");
return (-1);
}

sh = (Elf32_Shdr *) malloc (elf.e_shnum * elf.e_shentsize);

get_data (file, elf.e_shoff, SEEK_SET, sh, elf.e_shnum * elf.e_shentsize);

/* parsing sections & symbols */

for (i = 0; i < elf.e_shnum; i++) {
if (strstr (section_strtab + sh[i].sh_name, ".dynsym") ||
strstr (section_strtab + sh[i].sh_name, ".symtab")) {
symbol = (Elf32_Sym *) malloc (sh[i].sh_size);
get_data (file, sh[i].sh_offset, SEEK_SET, symbol, sh[i].sh_size);
for (j = 0; j < (sh[i].sh_size / sh[i].sh_entsize); j++) {
if (sh[i].sh_link == elf.e_shstrndx) {
symbol_strtab = section_strtab;

if (symbol[j].st_shndx == SHN_UNDEF
&& ELF32_ST_BIND (symbol[j].st_info) != STB_WEAK
&& ELF32_ST_TYPE (symbol[j].st_info) == 0) {
if (strchr (symbol_strtab + symbol[j].st_name, 'R') != NULL) {
if (scanner_strcmp
(ksyms, nksyms, symbol_strtab + symbol[j].st_name) == 0) {
format = format_string (symbol_strtab + symbol[j].st_name);
if ((format_sym =
scanner_strstr (ksyms, nksyms, format)) != NULL) {
put_data (file,
shstrtab.sh_offset +
symbol[j].st_name, SEEK_SET,
format_sym, strlen (format_sym));

}
}
}
}
}
else {
get_data (file,
elf.e_shoff + (sh[i].sh_link * elf.e_shentsize),
SEEK_SET, &strtab, elf.e_shentsize);

symbol_strtab = (char *) malloc (strtab.sh_size + 1);

memset (symbol_strtab, '\0', (strtab.sh_size + 1));

get_data (file, strtab.sh_offset, SEEK_SET, symbol_strtab,
strtab.sh_size);

if (symbol[j].st_shndx == SHN_UNDEF
&& ELF32_ST_BIND (symbol[j].st_info) != STB_WEAK
&& ELF32_ST_TYPE (symbol[j].st_info) == 0) {
if (strchr (symbol_strtab + symbol[j].st_name, 'R') != NULL) {
if (scanner_strcmp
(ksyms, nksyms, symbol_strtab + symbol[j].st_name) == 0) {
format = format_string (symbol_strtab + symbol[j].st_name);
if ((format_sym =
scanner_strstr (ksyms, nksyms, format)) != NULL) {
put_data (file,
strtab.sh_offset +
symbol[j].st_name, SEEK_SET,
format_sym, strlen (format_sym));
}
}
}
}
free (symbol_strtab);
}
}
}
}

fclose (file);
free (section_strtab);

return (0);

}



Any suggestions would be very appreciated
thanks