[ previous ] [ next ] [ threads ]
 
 From:  Joey Morin <jmorin at icomm dot ca>
 To:  m0n0wall at lists dot m0n0 dot ch
 Subject:  Re: NON-wireless PCMCIA netcards, and replacing pccard.conf
 Date:  Thu, 10 Jun 2004 18:25:00 -0400 (EDT)
*whimper!*

ok.  i've gone down a dozen blind alleys and dead ends.  i finally,
*FINALLY* managed to get a modified version of pccard.conf into
generic-pc-1.1b12.img.  for those of you curious how, see the end of this
email.

i've enjoyed only partial success.  the card is recognized during boot,
but it doesn not get fully configured.

here's the output from ifconfig in exec.php:

    de0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 192.168.2.32 netmask 0xffffff00 broadcast 192.168.2.255
	ether 08:00:2b:e7:12:43
	media: Ethernet autoselect (10baseT/UTP)
	status: active
    faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500
    lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	inet 127.0.0.1 netmask 0xff000000
    ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
    sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
    sn1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 00:00:86:1b:15:35
    ng0: flags=8890<POINTOPOINT,NOARP,SIMPLEX,MULTICAST> mtu 1500

de0 is the built-in interface, sn1 is my XJ10BT.  note that ifconfig
reports that it is up, but there's no media type reported.  for
comparison, here's what ifconfig reports for the WAN netcard (an Intel
PRO/10) on another m0n0wall:

    ex0: flags=843<UP,BROADCAST,RUNNING,SIMPLEX> mtu 1500
	ether 00:aa:00:5f:21:49
	media: Ethernet 10baseT/UTP

here's a relevant excerpt from dmesg:

    de0: <Digital 21040 Ethernet> port 0xf880-0xf8ff mem
	0xfedff800-0xfedff87f irq 10 at device 8.0 on pci0
    de0: DEC 21040 [10Mb/s] pass 2.3
    de0: address 08:00:2b:e7:12:43
    pcic0: <Cirrus logic 6722> at port 0x3e0 iomem 0xd0000 on isa0
    pcic0: Polling mode
    pccard0: <PC Card 16-bit bus (classic)> on pcic0
    pccard1: <PC Card 16-bit bus (classic)> on pcic0
    IPsec: Initialized Security Association Processing.
    IP Filter: v3.4.33 initialized.  Default = block all, Logging =
	enabled
    pccard: card inserted, slot 0
    de0: enabling 10baseT port
    sn1 at port 0x240-0x24f irq 3 slot 0 on pccard0
    sn1:  SMC91C94 UTP MAC address 00:00:86:1b:15:35
    ipfw2 initialized, divert disabled, rule-based forwarding enabled,
	default to accept, logging disabled
    DUMMYNET initialized (011031)

there does not appear to be anything else of pertinence in syslog that is
not already reported by dmesg.

also, these are the relevent lines added to pccard.conf:

	# Megahertz X-Jack Ethernet
	card "Megahertz" "CC10BT/2"
		config	auto "sn" ?
		ether	attr2
		insert	/etc/pccard_ether $device start
		remove	/etc/pccard_ether $device stop

i'm afraid i'm in over my head.  can anyone tell me what i have to do to
get this card to come up fully configured and suitable as a WAN interface?

jj

---------begin-ugly-dirty-tricks-----------
here's what i did to get a modified pccard.conf into
generic-pc-1.1b12.img:

on another m0n0wall with a fresh install of generic-pc-1.1b12.img, i
downloaded /cf/mfsroot.gz to my windows box, then unzipped it to the 10MB
mfsroot-generic fs.

using a windows-based hex editor (XVI32), i searched for a string unique
to /etc/pccard.conf.  in this case, the last entry:
"# Taiwanese Blue Concentric Circle CF Wireless LAN Model WL-379F".

using the hex editor, i then replaced that last entry with the relevant
entry from the full pccard.conf for my netcard (CC10BT/2).

i made sure to "pad" with 0x0A in order to keep the original length of
pccard.conf, since i have no knowledge of the file system structure.
that way, the filesystem contained in mfsroot-generic would remain
structurally identical.

using my linux box, i gzipped it back up to a new mfsroot.gz, then split
it into pieces no bigger than 1MB.  using exec.php, i uploaded each piece
one at a time to /tmp on the m0n0.  i replaced /cf/mfsroot.gz in this
manner:

umount /cf
mount /dev/ad0a /cf  # re-mounts read-write
# uploaded xaa (first part) to /tmp in exec.php
cp /tmp/xaa /cf/mfsroot.gz
rm /tmp/xaa
# uploaded xab
cat /tmp/xab >> /cf/mfsroot.gz
# uploaded xac
cat /tmp/xac >> /cf/mfsroot.gz
# uploaded xad
cat /tmp/xad >> /cf/mfsroot.gz
umount /cf
sync

i had to do it in pieces like this because there's just slightly more than
1MB free in /tmp on a m0n0.

i then downloaded /dev/ad0 in exec.php.  this generated an 80MB file (80MB
ide drive in the m0n0).  i used dd to grab the first 5MB, and then split
that onto a floppy set for re-assembly onto the ide drive of my
troublesome multia, using tom's rootboot linux-on-a-floppy.

ugly.  *UGLY*.  but it worked.  i boot the modified m0n0, assign the
interfaces in the console menu, and voila!  there's my XJ10BT!  sn1.  but
it's not listed as "up".

i am now definitely at an impasse.  is there anyone who can help?
---------end-ugly-dirty-tricks-----------


This one time, at band camp, Joey Morin said:

> i'm trying to get my PCMCIA netcards working with m0n0wall:  a megahertz
> XJ10BT/BC (same as CC10BT) and/or a xircon PS-CE2-10.
>
> ok, so i've seen the other posts in the archive regarding getting
> NON-wireless PCMCIA netcards working.  i understand that the source of
> the problem is that generic-pc-1.0.img includes only a very limited
> pccard.conf, with only wireless cards listed.  i've also grabbed
> http://dwaalspoor.org/pccard.conf (thank you M. G. (Michael) de Bruin)
> as a first step.
>
> my problem is that i can't figure out how to incorporate the pccard.conf
> back into generic-pc-1.0.img (or at least into /dev/ad0a/mfsroot.gz), as
> i do not have a netbsd machine at my disposal, nor the expertise to work
> that kind of magic.  i did manage to remount /dev/ad01 as writable, and
> copied the new pccard.conf permanently to the hard drive.  i also found
> /cf/boot/loader.rc, and that it contains:
>
> 	load /kernel
> 	load -t mfs_root /mfsroot
> 	autoboot 0
>
> however, according to loader.help, there doesn't seem to be a way to
> pre-mount mfsroot before the autoboot and replace /etc/pccard.conf.
>
> yes, i know all i have to do is upload the new pccard.conf into /etc
> using exec.php, then restart pccardd.  however, these changes don't
> survive a reboot, and in any case it doesn't help me at all because....
>
> ... i'm trying to get this working on a DEC multi (intel), which has one
> built-in ethernet interface, and two pcmica slots.  yes, the built-in
> ethernet is recognized, but since it is the ONLY interface recognized
> and available, and since the console menu won't let me set LAN and WAN
> to the same interace, i can't connect over the LAN using the webGUI.
>
> so i'm stuck.  has anyone come up with a clever way to incorporate a new
> pccard.conf (or any other file, for that matter) into generic-pc-1.0.img
> (or mfsroot.gz)?  or, perhaps someone can provide me with a rebuilt
> image? i can provide you with ftp access to push up such an image...
>
> many thanks in advance, jj