LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-01-2008, 01:13 AM   #1
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
Intel 536ep PCI modem driver: workarounds for >= 2.6.24.4 kernel


Disclaimer: This is not guaranteed to work for you! It also may or may not work with other kernel releases. I feel it is more of a 'workaround' than an actual solution.
NOTE: I use Slackware 11.0 and while this procedure should probably work on pretty much any Linux, you may need to adjust something at the section below called "Configuring the /dev node", like probably which file your system uses as '/etc/rc.d/rc.local'

The Intel 536ep V92 PCI softmodem is a "WinModem" designed to work with a Windows operating system. As you may know, Intel is now providing little or no drivers or support for these crippled modems under Linux.
Philippe Vouters is/has been doing a great job of picking up Intels slack by providing working linux drivers, but depending on what kernel you are using, success is hit or miss: C Header files are missing; The driver may or may not compile; the compiled driver may not modprobe; the modprobed driver may not work; <insert other weird problem here>.

Depending on exactly which kernel you upgrade to, you will often need to change to a different version of the Intel536 driver; As of 2.6.24.4 I found once again that the driver release which had worked for me on 2.6.23.12 no longer worked. I am no expert with C, so rewriting or repairing it is not really an option for me, but with the other machine here in my home that provides me with a LAN connection (and thus internet) currently dead, I set about trying to get one of the many driver versions available for this rotten modem, to work on my 2.6.24.4 Slackware system. It was that, or buy a real modem, or go without internet.

The drivers available from Intel are 'partially open source' which seems to mean that while there are C source files that need to be built, there is also a binary chunk included with the package, which does not get built. There is no source code supplied for the binary chunk, which seems to cause the problem that this workaround deals with: The module building process looks for source files which are not present in the package, which among other errors, ultimately leads to a failed build and/or a module that doesn't work.

Here's what I discovered as a workaround (kernel=2.6.24.4 -- for newer kernels, read further down):


STEP 1 - get the package called "intel-536EP-2.56.76.0_2007_10_05" either from the Intel website or from Philippe Vouters.
STEP 2 - extract it.
STEP 3 - using your file browser, enter the 'coredrv' sub-folder and locate the Makefile, and open it in a text editor.
STEP 4 - locate this line:
Code:
CFLAGS += $(PSTN_DEF) -Wall -O3 $(INCLUDES) -fno-common -DCONFIG_MODULES -DTARGET_SELAH
and change line as follows:
Code:
EXTRA_CFLAGS += $(CFLAGS) $(PSTN_DEF) -Wall -O3 $(INCLUDES) -fno-common -DCONFIG_MODULES -DTARGET_SELAH
STEP 5 - save the Makefile. Navigate back up to the root of the source package, open a terminal. Type 'make clean' and then type 'make 536'
STEP 5b - If at this point the build instantly quits because your autoconf.h or version.h files are not correct, do like the screen says, and type 'make config_sync' then type 'make clean' then type 'make 536'
STEP 6 - The build should now appear to work, but give a WARNING at the modpost stage, telling you something like "Unable to locate .536core.lib.cmd for blah blah blah..". At this point, you have a module, but it won't work.
STEP 7 - re-enter the 'coredrv' sub-folder. Make sure you have set your file browser to 'view hidden files' and locate the file called .Intel536.mod.o.cmd and open it in a text editor (notice the leading period on the filename).
STEP 8 - In this file, there are NINE instances where you will see longish filepaths to your build location, resembling something like "/home/to/path/to/source-package/coredrv/Intel536.xxx.x". SIX of these lines are near the top of the file, and THREE are at the bottom.
You need to change the filenames (the bold part in the path example) at the end of each of the NINE path references, like so:
Code:
      change FROM       ------>         TO

/coredrv/Intel536.mod.o         /coredrv/536core.lib.o
/coredrv/.Intel536.mod.o.d      /coredrv/.536core.lib.o.d
/coredrv/Intel536.mod.o         /coredrv/536core.lib.o
/coredrv/Intel536.mod.c         /coredrv/536core.lib.c
/coredrv/Intel536.mod.o         /coredrv/536core.lib.o
/coredrv/Intel536.mod.c         /coredrv/536core.lib.c
/coredrv/Intel536.mod.o:        /coredrv/536core.lib.o:
/coredrv/Intel536.mod.o         /coredrv/536core.lib.o
/coredrv/Intel536.mod.o         /coredrv/536core.lib.o
Now save this edited file as ".536core.lib.cmd"
STEP 9 - Now, using your file manager again, locate the file named coredrv.c and copy it (or you can open it in a text editor and click 'save as..') and name the duplicated file 536core.lib.c
STEP 10 - Finally, in your console again, from the base folder of the source code, type 'make 536' and you are done! If no errors happen, chances are this worked for you.

!!! IMPORTANT NOTE: Keep a backup of the file you made named ".536core.lib.cmd" because if you ever type 'make clean' again in the package source directory, the file will be deleted, and you will have to go through this again !!!

STEP 10b - Now... If it has not been done or occurred somehow already or by a previous installation of the driver (it is normally done via the installation script which we are not using), you need to put the binary file "hamregistry" from the driver source package, into the /usr/sbin folder on your system. Probably just copying it over will suffice, but FWIW, the installation script does the following INSTALL command, which you can execute in a console:

Code:
# bash command to copy hamregistry to /usr/sbin and chown to root:root and chmod to 110
install -o root -g root -m 110 hamregistry /usr/sbin
STEP 11 - Now, to test that the module we just built is OK, copy your new module (Intel536.ko) from the source base folder, over to your kernels module area </lib/modules/`uname -r`/kernel/drivers/char/Intel536.ko> and in the console, type "depmod -A" and then type "modprobe Intel536" and if you get no feedback and still have a cursor and your machine is not locked up, so far so good. Try "modprobe -r Intel536" and if that works too (you get your cursor back and no errors), even better!

Configuring the device node (/dev/536ep0):

I have found that using the installation script included with the driver source has been a less than intuitive way of setting up the modem /dev node so the modem will 'just work' after booting up your machine. The installation script has, at worse, screwed up my rc.inet1 file, and other people have repeatedly reported that their module needs to be re-installed every bootup, or the modem no longer works after rebooting. Also, the installation script included with the driver does not work on many Linux distros. Here's what to do (this is MY way; there are surely other ways too) if you now have a working module, and want it to be ready and willing after bootup:

STEP 12 - Locate or create your 'local startup file' which is one of the files that gets executed on bootup, into which you put custom configuration options for your system. On Slackware, it is /etc/rc.d/rc.local but any script (multi-user-mode runlevel file) that gets executed when the system boots into a multi-user runlevel will do. Make sure the file is executable.
STEP 13 - add the following bash code somewhere in the file (like at the end or something):

Code:
# /etc/rc.d/rc.local modem setup stuff
# first identify the kernel name, and locate the module if it exists, and modprobe it (or quit):
KERNEL=`uname -r`
if [ -e /lib/modules/$KERNEL/kernel/drivers/char/Intel536.ko ]; then
    modprobe Intel536
# now create the driver /dev node if that doesn't exist:
    if [ ! -e /dev/536ep0 ]; then
        mknod /dev/536ep0 c 240 1
    fi
# now make /dev/modem linked to it, for simplicity:
    if [ ! -e /dev/modem ]; then
        ln -s /dev/536ep0 /dev/modem
    fi
# now make the ppp node that your dialer needs:
    if [ ! -e /dev/ppp ]; then
        mknod /dev/ppp c 108 0
    fi
fi
STEP 14 - Start up kppp (or whatever dialer you like) and configure it, using /dev/modem as the modem device link. Configure the 'modem commands' section with appropriate Hayes/AT commands necessary for the modem, as well as any scripts or other options you need to connect to your ISP.
For reference, here is what the important parts of my KPPP configuration file (/root/.kde/share/config/kppprc) looks like:

Code:
[Account0]
AccountingEnabled=0
AccountingFile=
Authentication=4
AutoDNS=1
AutoName=0
BeforeConnect=/etc/rc.d/rc.kppp_config preconnect
BeforeDisconnect=
CallbackPhone=
CallbackType=0
Command=/etc/rc.d/rc.kppp_config postconnect
DNS=
DefaultRoute=1
DisconnectCommand=/etc/rc.d/rc.kppp_config reset_eth0
Domain=
ExDNSDisabled=0
Gateway=0.0.0.0
IPAddr=0.0.0.0
Name=Sympatico
Password=<your ISP account login password here>
Phonenumber=<your dialup phone number here>
ScriptArguments=
ScriptCommands=
StorePassword=1
SubnetMask=0.0.0.0
Username=<your ISP user name goes here: name@blah.isp.ca>
VolumeAccountingEnabled=0
pppdArguments=

[General]
DefaultAccount=Sympatico
DefaultModem=Intel_536ep
DockIntoPanel=1
NumberOfAccounts=1
NumberOfModems=1
PPPDebug=0
ShowLogWindow=1
pppdTimeout=45

[Modem0]
AnswerResponse=CONNECT
AnswerString=ATA
BusyResponse=BUSY
BusyWait=11
ConnectResponse=CONNECT
DLPResponse=DIGITAL LINE DETECTED
Device=/dev/modem
DialString=ATWDT
Enter=CR/LF
EscapeGuardTime=50
EscapeResponse=OK
EscapeString=+++
FlowControl=Hardware [CRTSCTS]
HangUpResponse=OK
HangupString=+++ATH
InitDelay=50
InitResponse=OK
InitString=ATZ
InitString1=ATM0L0
Name=Intel_536ep
NoCarrierResponse=NO CARRIER
NoDialToneDetection=ATX1
NoDialToneResp=NO DIALTONE
PreInitDelay=50
RingResponse=RING
Speed=115200
Timeout=60
ToneDuration=70
UseLockFile=1
Volume=1
VolumeHigh=M1L3
VolumeMedium=M1L1
VolumeOff=M0L0
WaitForDialTone=1
NOTE: I use custom bash scripts in my file, to reconfigure my firewall when switching from my LAN to dialup and back, which get executed by KPPP. Therefore, you do not need the following items, but you may want to use something there sometime, if you want to run scripts before or after connecting/disconnecting:

BeforeConnect=/etc/rc.d/rc.kppp_config preconnect
Command=/etc/rc.d/rc.kppp_config postconnect
DisconnectCommand=/etc/rc.d/rc.kppp_config reset_eth0

STEP 15 -Now, with KPPP all set up, try dialing out! And if your modem works, perfect! it looks like this hair-brained scheme worked for you too. You're finished.

If this all didn't work for you (I mean the module building part), unfortunately I don't have a clue why not; remember, this is a workaround, not a real solution.. But it worked for me, and I hope it helped you too! If this (or something similar) works for you on a different kernel >= 2.6.24, you could let me know and I will consider adding the info to this post (or you can post it yourself ). And when I switch to kernel >= 2.6.25 I will almost certainly be revisiting this issue, and will update this post as necessary.


UPDATE:
Since the nVidia driver has now been repaired to work with >2.6.25 kernels I have finally upgraded; first to 2.6.25.4, then 25.7, and tonight I patched up to 2.6.25.9 and am happy to report that this modem driver hack still works with all above mentioned kernels.

Good luck.
Sasha

Last edited by GrapefruiTgirl; 08-19-2009 at 08:53 AM. Reason: Kernel version update.
 
Old 05-02-2008, 03:02 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Well done - this has been outstanding for a very long time. Congratulations.
 
Old 06-18-2009, 08:18 PM   #3
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
Thumbs up New release Q1-2009: Intel 536ep PCI modem driver for NEW kernels!

UPDATE: As of a couple weeks/months or so ago, there was a new release of the driver by Philippe Vouters for the Intel 536EP PCI modem. It works right out of the 'box', throwing only one apparently harmless compiler/linker warning when building it (I believe the warning is what used to be the fatal error for which all the rigamarole in my last post was to work around).

I am currently using the new release with a 2.6.29.4 kernel in my firewall machine, and have had absolutely zero issues/problems with it over about 3 weeks now.

Thank you Philippe!

PS - The link to Philippe's download area is near the start of my post above. There may also be a new release for the 537 series there too, but I didn't look too closely as it has been only the 536 which concerned me.
 
Old 08-18-2009, 11:27 PM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
Lightbulb New mod & new driver(s) (Q3-2009) for recent kernel.

UPDATE: I have once again upgraded the kernel in my firewall machine, where this nasty little modem resides, and once again encountered a problem building the driver. It's the same driver archive as in the last update.

New kernel version = 2.6.30.5

This time, it's a quick fix for the driver, and I am using it right now as I type this, and I'm downloading too, so it seems to work fine.

Locate line 785 in the file <archive>/coredrv/coredrv.c and simply comment it out with a double-slash, so the line looks like so:

Code:
// hamproc->owner = THIS_MODULE;
And you're done. execute `make 536` from the archive root, to build the driver module.

--------------------------------------------------

UPDATE #2: If the above fails for you, or you feel like living on the edge, here's something else to consider:

There is a Shiny NEW driver package (released Q3-2009) from Philippe called intel-536EP-537EP_2009_07_04.tar.bz2 which as you may guess by the name, is a driver package which apparently drives either the 536EP or the 537EP! The driver package is dated (mtime) 28 July 2009 and is ~1.9Mib in size.

I do not have a 537EP handy, but I will try to build the driver for the 536EP from that package and report back in a little bit...

UPDATE: I'm back, now using the driver from the fresh package mentioned right above, and it does work fine so far! It throws one minor warning, similar to the one mentioned in an earlier post above, but still builds & works fine. (Slackware 11 + kernel=2.6.30.5). Again, I have no 537EP modem to test with, but if YOU do, let us know if this driver works for you.

Another big thanks to Philippe Vouteurs!

Sasha

Last edited by GrapefruiTgirl; 08-19-2009 at 08:58 AM. Reason: tested latest driver.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
R-333-5.TGZ (MD1724T/536EP Intel Internal PCI Modem) for Linux 2.2.14 cynsmc3 Linux - Hardware 0 06-01-2006 04:21 PM
Intel 536ep Modem driver problem robertpratt Linux - Networking 1 01-12-2006 06:35 PM
problems with Intel 536EP PCI Modem thundershtorm Linux - Hardware 1 06-13-2005 07:49 AM
Intel 536ep modem working now - new driver available woodywellhung LinuxQuestions.org Member Success Stories 0 04-21-2004 03:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration