# PCTEL modem drivers and gcc3.2 (gentoo 1.4_rc1)

## hol9000

Hi there,

I installed gentoo 1.4_rc1 on my notebook (inspiron 4100) this week and I'm really happy with the distro - very good job, people!

What I didn't manage to get to work though is the (win)modem, a pctel 2304. I was able to use it some time ago, compiled with gcc 2.95, but with gcc 3.2 it doesn't compile.

Error message is:

make ptserial.o

make[3]: Entering directory `/home/hkl/pctel-0.9.4/src/ptserial'

gcc    -D__KERNEL__ -Werror -Wno-trigraphs -fno-common -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -DMODULE -DMODVERSIONS

-DEXPORT_SYMTAB -DHAL_I81X  -DBUILD_SYSTEM=\""`uname -s -m -r -p`\"" -DGCC_VERSION=\""`gcc --version`\"" -I../../include -I/usr/src/linux/include -include /usr/src/linux/include/linux/modversions.h

-DPACKAGE=\"pctel\" -DVERSION=\"0.9.4\"   -c -o ptserial.o ptserial.c

<command line>:1:13: multi-line string literals are deprecated

My first attempt to solve this was to replace the "gcc --version" with 3.2, since gcc --version in 3.2 gives a three-line answer, while earlier versions only answered the version number. Unfortunately that doesn't help, the compilation breaks just a little bit later.

So has anyone been successful on this?

Regards,

Hol9000

----------

## hol9000

OK, I tried again.

The "multi-line string literals are deprecated" error indeed was caused by the output from GCC, and my attempts to compile the file manually with the gcc version entered by hand failed, because the packages makefile deletes old .o-files before continuing  :Sad: 

But there is a (dirty) solution:

go to the src/ptserial/ subdir of the pctel package and edit the Makefile. In line 93 change the variable GCC_VERSION to 3.2 instead of 'gcc --version'.

Then the package compiles, I was able to load the modules and to connect to some dialup.

I still have some problems though - after the first usage /dev/ttyS15 can't be found anymore - and when I use wvdial the modem needs too much time to connect, so wvdial stops with a timeout.

Does anyone have some ideas about this?

Regards,

Hol9000[/quote]

----------

## brain

Just wanted to chime in that I was having the same compile problem on a Latitude C840, and this fix worked for me.  Thanks!!

----------

## jeb-c4

I had that problem also (inspiron 4100), and was very frustrated by that compile problem.  

I didn't really worry about it not working because I just use the wireless and ethernet.

Maybe we can get an ebuild for this for all the laptop users.

Jeb

----------

## hol9000

[quote="brain"]Just wanted to chime in that I was having the same compile problem on a Latitude C840, and this fix worked for me.  Thanks!![/quote]

did you manage to use the pctel-module for ppp? I was only successful to use it for a terminal session with minicom, with wvdial I only get NO CARRIER after some time and a timeout.

BTW, there was a patch by someone else on the linmodems mailing list a bit more than a week ago, which fixes the problem.

Concerning the ebuild: I don't have experience with this yet, but when the ppp problem is solved I'll try to put something together.

Hol9000

----------

## skarloey

hol9000:  Did you ever get your winmodem working?  I am trying to get started on mine and wondered how to include support?

----------

## hol9000

Hi skarloey,

it works for me now, even with sound (pctel with i8xx-hal) thanks to the new beta-drivers from 

http://www.medres.ch/~jstifter/pctel/pctel-0.9.7.html

ppp worked before also - using wvdial I had to change one of the init-strings from wvdial.conf:

Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 S11=55 S7=99 +FCLASS=0

A few problems are still remaining: 

From time to time I get up to five or six times a "NO CARRIER" message while trying to dial in, and very very seldomly I get a complete lockup of my computer (the three LEDs blinking, no reaction to mouse or keyboard - but magic sys-req works so I can umount, sync and reboot). The ppp-related behaviour didn't change from 0.9.6 to 0.9.7, it only added sound support for intel chipsets (if I remember correctly). 

So if anyone knows the reasons for the lockups or solution for the "NO CARRIER" problem, please post.

Don't have too much time right now, but I still have the ebuild thing on my to do list.

Hol9000

----------

## skarloey

Thanks for the link to the update.  I had not seen that before and will give it a try.

----------

## skarloey

I followed instructions at http://www.medres.ch/~jstifter/pctel/installation and trying the insmod gives this error:

```
driver/pctel.o: The module you are trying to load (driver/pctel.o) is compiled with a gcc version 2 compiler, while the kernel you are running is compiled with a gcc version 3 compiler.  This is known to not work.
```

Where can I go from here?

----------

## hol9000

Hi Skarloey, 

you can use insmod -f to force load the modules. You will get an error message but it should work then.

Since I was too lazy to insmod -f pctel and insmod -f ptserial all the time and sometimes to recreate the dev-entries by hand I wrote this small shell-script which does that for me. Put it in your path and use it with 

pctel.sh start

pctel.sh stop

or pctel.sh mkdevice

Greetings,

Hol9000

PS: My identation seems to be a bit broken from the transferal via the browser - better download it from the url in the script.

```

#!/bin/bash

# pctel.sh

# v. 0.1

#

#

# 21.2.2003

# Holger Klein

# hk (at) deskmetal.org

#

# www.deskmetal.org/inspiron/pctel.sh

#

# small helper script to load and unload pctel modules

load_modem_modules(){

    echo "Forced loading: pctel, ptserial."

    insmod -f pctel

    insmod -f ptserial

    exit 1

}

unload_modem_modules(){

    echo "Unloading ptserial, pctel."

    rmmod ptserial

    rmmod pctel

    exit 1

}

create_modem_device(){

    # sometimes after module unloading and reloading the device 

    # file is gone. Recreate device file with the following command.

    echo "Recreating /dev/ttyS15."

    mknod /dev/ttyS15 c 62 79

    chmod 666 /dev/ttyS15

    exit 1

}

if [ -z $* ] 

then

    # no args at all

    echo "Usage: $0 start|stop|mkdevice"

else

    for arg in $*

    do 

   case "${arg}" in

   start)

       load_modem_modules

       ;;

   stop)

       unload_modem_modules

       ;;

   mkdevice)

       create_modem_device

   ;;

   *)

       echo "Usage: $0 start|stop|mkdevice"

       ;;

   

   esac

    done

fi

```

----------

## EddiE314

i get that lockup and no carrier thing too, no luck here

using pctel 789 with intel8x0 sound

----------

## wobbly

Hi,

I realize this is an old thread, but hopefully someone can help me.

I got the pctel.o and ptserial.o modules to compile, but when I try

to insmod, I get the compiler version warning discussed in this thread, plus some unresolved symbols: e.g.

```

# insmod -f driver/pctel.o

Warning: The module you are trying to load (driver/pctel.o) is compiled with a gcc version 2 compiler, while the kernel you are running is compiled with a gcc version 3 compiler. This is known not to work.

driver/pctel.o: unresolved symbol schedule_timeout_R17d59d01

driver/pctel.o: unresolved symbol __const_udelay_Reae3dfd6

driver/pctel.o:

Hint: You are trying to load a module without a GPL compatible license and it has unresolved symbols. Contact the module supplier for assistance, only they can help you.

```

Trying insmod -f driver ptserial.o gives even more unresolved symbols.

My understanding from the thread is that using -f I can ignore the warning

about the compiler version, but I don't know how to start trying to resolve the symbols. Any suggestions?

Thanks!

jgw

----------

## Lateralus

I also get a huge list of unresolved symbols.

even using the -f flag the pctel module doesn't work.

I've been trying random hals (heh), because I don't know which hal my pctel uses (any software to check this would be great ).

----------

