newbie question: use PCMCIA NIC

newbie question: use PCMCIA NIC

Post by Zhang Wei » Sat, 02 Mar 2002 22:20:59



Thanks to David Leemans and Michel Talon's advice, i rejected my
previous 32-bit Cardbus nic and brought back a 16-bit Edimax 10Mps
pcmcia nic. Now the problem comes again: how to install and configure
it? (and how do i know if the nic is recognized by BSD?) I'm working
in a very simple TCP/IP lan enviroment with each computer's address
given by a DHCP server. You can simply tell me where to find an answer
(a tutorial or something) and i'll be grateful.

Zhang Weiwu
China

 
 
 

newbie question: use PCMCIA NIC

Post by Paul » Sat, 02 Mar 2002 22:54:18




Quote:> Thanks to David Leemans and Michel Talon's advice, i rejected my
> previous 32-bit Cardbus nic and brought back a 16-bit Edimax 10Mps
> pcmcia nic. Now the problem comes again: how to install and configure
> it? (and how do i know if the nic is recognized by BSD?) I'm working
> in a very simple TCP/IP lan enviroment with each computer's address
> given by a DHCP server. You can simply tell me where to find an answer
> (a tutorial or something) and i'll be grateful.

1. Check the FreeBSD compatibility guide in the FreeBSD handbook
(www.freebsd.org) to see if it is supported. You can also find this in
the file 'HARDWARE.TXT' on you CD.

2. Make sure the card is inserted, boot FreeBSD and run 'pccardc dumpcis'
to see if it is recognized. (see man pccardc for more details)

--
  __
 /_/             Creator/Maintainer
/aul       "A Daemon's Guide To FreeBSD"
           http://daemonsguide.iwarp.com/

 
 
 

newbie question: use PCMCIA NIC

Post by Zhang Wei » Sun, 03 Mar 2002 19:47:13



> 1. Check the FreeBSD compatibility guide in the FreeBSD handbook
> (www.freebsd.org) to see if it is supported. You can also find this in
> the file 'HARDWARE.TXT' on you CD.

i checked HARDWARE.TXT and this card is not in list. But maybe the
chip used in the card is supported. This is the only such card i can
find on the market (and thus is my only hope). And half of our school
has been using Edimax products for years, Edimax seems not using some
mare kind of chip.

I attached the Linux installation guide of this card at end of this
post, hoping that from that you may find anything to help me. Thank
you.

Quote:

> 2. Make sure the card is inserted, boot FreeBSD and run 'pccardc dumpcis'
> to see if it is recognized. (see man pccardc for more details)

Read return -1 bytes (expected 2)
pccardc: CIS code read: Cannot allocate memory
Read return -1 bytes (expected 10)
Configuration data for card in slot 1
2 slots found

It seems PCMCIA slot is not working at all.

             Linux PCMCIA/CardBus LAN cards installation
Guide(Rev:0.01)
                      Date: 1999/05/13
CONTENTS
 1. Introductions
 2. Installing PCMCIA Card Services
    2.1 Configuration for LAN cards
 3. Copyright

1. Introductions
  This document briefly describes how to use the PCMCIA/CardBus LAN
cards
  in a Linux operating system. To make use of the PCMCIA/CardBus LAN
cards,
  you need to install the PCMCIA Card Services which responds to card
  insertion and removal events, loading and unloading drivers on
demand.

  Chapter two discusses the installation of the PCMCIA Card Services
as
  well as the configuration of LAN cards.

2. Installing the PCMCIA Card Services
  Card Serives for Linux is written by David Hinds

  distributions, like RedHat and Slackware. You need to install it
into
  your Linux system for use of the PCMCIA or "PC Card". The source
version
  is available at <hyper.stanford.edu> in the "/pub/pcmcia"
dirctory,as
  "pcmcia-cs-x.tar.gz". Replace "x" with the version number of the
latest
  package.

  To install the PCMCIA Card Services, you need to install a full
kernel
  source and do the following shell commands:

        #tar zxvf pcmcia-cs-x.tar.gz
        #cd pcmcia-cs-x
        #./Configure
        #make all
        #make install

  Generally, you don't need to change any default selections when you
run
  "./Configure" to configure the compiled environment. But if you want
to
  use Card Bus adapter, enable the (CardBus) option.

2.1 Configuration for LAN cards
  For LAN card users, you need to use editor to edit the file
  "/etc/pcmcia/network.opts" to assign IP address, netmask, gateway
IP,
  nameservers,broadcast address, and etc. after the Card Services
  installation. A part of the file "network.opts" is as listed which
is
  mandatory setup for the TCP/IP of your Linux machine:

        #File: /etc/pcmcia/network.opts
        #
        #
        #
        #Host's IP address, netmask, network address, broadcast
address
        IPADDR="1.2.3.4"
        NETMASK="255.255.255.0"
        NETWORK="1.2.3.0"
        BROADCAST="1.2.3.255"
        #Gateway address for static routing
        GATEWAY="1.2.3.254"
        #Things to add to /etc/resolv.conf for this interface
        DOMAIN="your.domain"
        SEARCH=""
        DNS_1=""
        DNS_2=""
        DNS_3=""
        #
        #

  Remember to reboot your Linux machine for the Card Services after
  installation.

  Now you should have the PCMCIA Card Services installed correctly.
  If the Card Service is not installed properly, please see the
  "PCMCIA-HOWTO" for the details in the root directory of the Card
  Services source code to resolve installation and configuraton
  problems.

3. Copyrights
  This document can be freely used and redistributed without any prior
  permission.

 
 
 

newbie question: use PCMCIA NIC

Post by Paul » Mon, 04 Mar 2002 03:21:37




Quote:> i checked HARDWARE.TXT and this card is not in list. But maybe the
> chip used in the card is supported. This is the only such card i can
> find on the market (and thus is my only hope). And half of our school
> has been using Edimax products for years, Edimax seems not using some
> mare kind of chip.

Hmmm.

Quote:> I attached the Linux installation guide of this card at end of this
> post, hoping that from that you may find anything to help me. Thank
> you.

I believe FreeBSD and Linx implementation of the PCMCIA subsystem are
more or less identical. So if it works under Linux it should also work
under FreeBSD.

Quote:> Read return -1 bytes (expected 2)
> pccardc: CIS code read: Cannot allocate memory
> Read return -1 bytes (expected 10)
> Configuration data for card in slot 1
> 2 slots found
> It seems PCMCIA slot is not working at all.

Sure seems like it. Do you know which PCMCIA controller is in you box?
You may be able to figure that out from the drivers for eg. Win95 for it.
Then you may wish to double check if that controller is supported or not.
Sometimes they need some tweaking of parameters to be coaxed into
operation.

--
  __
 /_/             Creator/Maintainer
/aul       "A Daemon's Guide To FreeBSD"
           http://daemonsguide.iwarp.com/

 
 
 

newbie question: use PCMCIA NIC

Post by Zhang Wei » Mon, 04 Mar 2002 16:40:55


[snip]

Quote:> Sure seems like it. Do you know which PCMCIA controller is in you box?
> You may be able to figure that out from the drivers for eg. Win95 for it.
> Then you may wish to double check if that controller is supported or not.
> Sometimes they need some tweaking of parameters to be coaxed into
> operation.

i don't know. I'm using IBM Thinkpad 380XD. I put

|device   card
|device   pcic0  at isa? irq 0 port 0x3e0 iomem 0xd000
|device   pcic1  at isa? irq 0 port 0x3e2 iomem 0xd400

into my kernel conf (and installed it), later i changed them into

|device   card
|device   pcic0
|device   pcic1

both lead to the same dmesg|grep pccard message:

pccard0: <PC Card bus (classic)> on pcic0
pccard1: <PC Card bus (classic)> on pcic1
pccard:  card inserted, slot 1

and when i remove or insert a card the machine does have something
reported.
Does that imply that the pccard driver is working?

All my work is based on network, if freeBSD refuse this nic, i'll have
to go back to Windows. It's very important to me.

 
 
 

newbie question: use PCMCIA NIC

Post by Zhang Wei » Mon, 04 Mar 2002 16:58:30


Hey, i found something new. I tried to run pccardd (just because i
found this command by accident) and it produced following message:

pccardd[446]: Card "Ethernet"("Adapter")[2.0][(null)] matched
"Ethernet" ("Adapter") [(null)}[(null)]
pccardd[446]: Ether=18:00:00:00:00:00
pccardd[446]: driver allocation failed for Ethernet(Adapter): Device
not configured
pccardd[446]: pccardd started

and then pccardc dumpcis can show these things:
(What should i do then?)

Code 240 not found
Code 240 not found
code Unknown ignored
Configuration data for card in slot 0
Tuple #1, code = 0x1 (Common memory descriptor), length = 5
    000:  d4 0a 53 e9 ff
        Common memory device information:
                Device number 1, type Function specific, WPS = OFF
                Speed = 100nS, Memory block size = 8Kb, 2 units
                Device number 2, type FLASH EEPROM, WPS = OFF
                Speed = 150nS, Memory block size = 2Kb, 30 units
Tuple #2, code = 0x17 (Attribute memory descriptor), length = 3
    000:  53 09 ff
        Attribute memory device information:
                Device number 1, type FLASH EEPROM, WPS = OFF
                Speed = 150nS, Memory block size = 2Kb, 2 units
Tuple #3, code = 0x20 (Manufacturer ID), length = 4
    000:  49 01 ab c1
        PCMCIA ID = 0x149, OEM ID = 0xc1ab
Tuple #4, code = 0x15 (Version 1 info), length = 26
    000:  04 01 45 74 68 65 72 6e 65 74 00 41 64 61 70 74
    010:  65 72 00 32 2e 30 00 ff 00 ff
        Version = 4.1, Manuf = [Ethernet], card vers = [Adapter]
        Addit. info = [2.0]
Tuple #5, code = 0x1a (Configuration map), length = 5
    000:  01 06 d0 0f 0b
        Reg len = 2, config register addr = 0xfd0, last config = 0x6
        Registers: XX-X----
Tuple #6, code = 0x1b (Configuration entry), length = 7
    000:  c0 81 18 45 30 fc be
        Config index = 0x0(default)
        Interface byte = 0x81 (I/O)  wait signal supported
        Card decodes 5 address lines, limited 8/16 Bit I/O
                IRQ modes: Level
                IRQs:  2 3 4 5 6 7 9 10 11 12 13 15
Tuple #7, code = 0x1b (Configuration entry), length = 7
    000:  01 08 ca 60 00 03 1f
        Config index = 0x1
        Card decodes 10 address lines, limited 8/16 Bit I/O
                I/O address # 1: block start = 0x300 block length = 0x20
Tuple #8, code = 0x1b (Configuration entry), length = 7
    000:  02 08 ca 60 20 03 1f
        Config index = 0x2
        Card decodes 10 address lines, limited 8/16 Bit I/O
                I/O address # 1: block start = 0x320 block length = 0x20
Tuple #9, code = 0x1b (Configuration entry), length = 7
    000:  03 08 ca 60 40 03 1f
        Config index = 0x3
        Card decodes 10 address lines, limited 8/16 Bit I/O
                I/O address # 1: block start = 0x340 block length = 0x20
Tuple #10, code = 0x1b (Configuration entry), length = 7
    000:  04 08 ca 60 80 03 1f
        Config index = 0x4
        Card decodes 10 address lines, limited 8/16 Bit I/O
                I/O address # 1: block start = 0x380 block length = 0x20
Tuple #11, code = 0x1b (Configuration entry), length = 7
    000:  05 08 ca 60 00 02 1f
        Config index = 0x5
        Card decodes 10 address lines, limited 8/16 Bit I/O
                I/O address # 1: block start = 0x200 block length = 0x20
Tuple #12, code = 0x21 (Functional ID), length = 2
    000:  06 00
        Network/LAN adapter
Tuple #13, code = 0x14 (No link), length = 0
Tuple #14, code = 0x0 (Null tuple), length = 9
    000:  57 42 4c 41 4e 39 32 36 ff
Tuple #15, code = 0xff (Terminator), length = 0
2 slots found

 
 
 

newbie question: use PCMCIA NIC

Post by Zhang Wei » Mon, 04 Mar 2002 19:55:06


ok. now i add

device miibus
device ed

into kernel, and

pccardd
into a startup script in rc.d
and manually run
ifconfig ed0 *****/**
after pccardd prompt for device ready.
it works just fine. Is it correct?