[Prism54-users] slightly OT: SMC2835W - How to automate network setup?

Nicolai Langfeldt janl@linpro.no
Sun, 30 Nov 2003 21:04:02 +0100


Stefan U. Hegner (Mobil) wrote:
> Hi Nicolai,
> 
> Am Don, 2003-11-27 um 23.46 schrieb Nicolai Langfeldt:
> 
>>>my prism54 driver seems to work ... But I need to do a couple of things
>>>manually after inserting the cardbus card to my notebook. How can I
>>>automate this?
>>
>>>In order to esatablish an IP connection I need to do the following:
>>>- iwconfig eth1 mode Managed
>>>- iwconfig eth1 essid "myessid"
>>>- dhclient eth1
>>>- route add default gw my.default.gate.way
>>>
>>>I thought, to automate this, you use the wireless.opts file. In mine it
>>>says:
>>
>>What to do is distribution specific.  Atempt any network config tool 
>>that it may have first.
> 
> 
> Hmmmm. I was reading some docu over the weekend and I rather get the
> idea, that it might have to do with the cardservices. - i.e. there is no
> entry for SMC2835/prism54 in the /etc/pcmcia/config. - Could this be the
> problem? Has someone a "sample-entry" for this?

Ah, but you said that the driver was working already so I assumed you 
were past that.

The format of /etc/pcmcia/config is pretty simple.

Start with "cardctl ident" as root (a orinoco card for convenience):

Socket 0:
   no product info available
Socket 1:
   product info: "Lucent Technologies", "WaveLAN/IEEE", "Version 01.01", ""
   manfid: 0x0156, 0x0002
   function: 6 (network)

Corresponding to that you find this in config:

card "Lucent Technologies WaveLAN/IEEE Adapter"
   version "Lucent Technologies", "WaveLAN/IEEE"
   bind "orinoco_cs"

And corresponding to the bind "orinoci_cs" you find (earlier)

device "orinoco_cs"
   class "network" module "hermes", "orinoco", "orinoco_cs"

which is the stack of modules required to be loaded, in order.  I don't 
have my prism54 card here, and I can't recall 100%, but I expect that 
you first want the firmware module and then the prism54 module.  After 
that restart cardservices and inserting the card should result in 
loading the drivers.

>>But then I suggest you read your distributions ifup - or whatever script 
>>it uses to take up interfaces.  On Redhat they have several different 
>>hooks for pre-up and wireless initialization, and in 
>>/etc/sysconfig/network-scripts/ifup-post they hook to /sbin/ifup-local 
>>as a post-up script.
> 
> 
> Seems to be similar in MDK (IMHO they have borrowed some of this stuff
> from RH). However, the ifup and ifup-wireless scripts don't make much
> sense to me. - I'm rather a dumb user than a bright guru. -So, what are
> you trying to tell me? - Modifying the scripts? What? How?

Yes, with some editor.  After studying them carefully.  But first the 
config file as you say.