9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Bitsy's WaveLAN problem
@ 2008-05-11 12:44 David du Colombier
  0 siblings, 0 replies; 14+ messages in thread
From: David du Colombier @ 2008-05-11 12:44 UTC (permalink / raw)
  To: 9fans

After a massive print debugging, I found where the
problem appears.

In /sys/src/9/bitsy/wavelan.c, in the function w_cmd():

if(i==WTmOut){
    /*
     * WCmdIni can take a really long time.
     */
    enum { IniTmOut = 2000 };
    for(i=0; i<IniTmOut; i++){
        if(csr_ins(ctlr, WR_EvSts)&WCmdEv)
            break;
        microdelay(100);
    }
    if(i < IniTmOut)
        if(0) print("#l%d: long cmd %.4ux %d\n",
                     ctlr->ctlrno, cmd, i);
    if(i == IniTmOut){
        print("#l%d: execing cmd %.4ux: %.4ux\n",
               ctlr->ctlrno, cmd, csr_ins(ctlr, WR_EvSts));
        return -1;
    }
}

w_cmd() is returning -1.

The preceding print displays (with some junk in):

#l0: execing cmd 0000: 0000

Can this be a hardware problem?

Thank you.

--
David du Colombier



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] Bitsy's WaveLAN problem
  2008-05-12 15:13                 ` David du Colombier
@ 2008-05-12 15:42                   ` David du Colombier
  0 siblings, 0 replies; 14+ messages in thread
From: David du Colombier @ 2008-05-12 15:42 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I made two log files of messages displayed on the serial console by
Plan 9 during the boot on the iPaq.

The first file [1] is Wi-Fi "working" (but cannot ping, as described
before), the second [2] is Wi-Fi not working.

They used exactly the same kernel and the same ramdisk. There should
be only few minutes between them.

On these logs, you can see some of the print result I used to find the problem.
"second", "third", "fourth"... are the second, third, fourth...
"return -1" in the function.
Sometimes, messages are broken by others.

[1] http://www.9grid.fr/misc/plan9/ipaq_h3650/log/con.yes
[2] http://www.9grid.fr/misc/plan9/ipaq_h3650/log/con.no

--
David du Colombier



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] Bitsy's WaveLAN problem
  2008-05-12 14:56               ` Axel Belinfante
@ 2008-05-12 15:13                 ` David du Colombier
  2008-05-12 15:42                   ` David du Colombier
  0 siblings, 1 reply; 14+ messages in thread
From: David du Colombier @ 2008-05-12 15:13 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> do you have a single or double slot sleeve?
> the double slot sleeve needs extra code to work --
> hmm... if you would have such one it wouldn't have worked at all
> and you mentioned that it has somewhat worked, thus, single sleeve?

I have a single slot sleeve since I seen before on this mailing list
that the double sleeve is not supported.

It worked two or three times yesterday. I was able to connect to the
Access Point, but I was not able to ping other machines. The first
time, the kernel crashed 30 seconds after.
Since, I tried many times, and it does not work anymore.

bitsy# echo -n 'configure #l0 wavelan' > /dev/pcm0ctl
echo: write error: couldn't configure device

The cause of this problem was identified in my second e-mail, after
many print debugging. It was caused by the function w_cmd() in the
file /sys/src/9/bitsy/wavelan.c.
When it worked, I was using a timeout of 100000.

Even with the same kernel and ramdisk, sometimes it works (very
rarely), often it won't works.

--
David du Colombier



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] Bitsy's WaveLAN problem
  2008-05-12 14:35             ` David du Colombier
@ 2008-05-12 14:56               ` Axel Belinfante
  2008-05-12 15:13                 ` David du Colombier
  0 siblings, 1 reply; 14+ messages in thread
From: Axel Belinfante @ 2008-05-12 14:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> I thought this might be a hardware problem, but it does not seem to be the case.
>
> I tried the Lucent ORiNOCO Classic Gold PC Card on my Slackware Linux
> laptop, and it seems to work fine with the "orinoco" driver. The
> driver load without any problem. I can scan and connect to an essid.
> Even the lights are switched on.
>
> However, it would be a hardware problem from the iPaq PCMCIA sleeve.
> I will probably buy another to confirm that.

do you have a single or double slot sleeve?
the double slot sleeve needs extra code to work --
hmm... if you would have such one it wouldn't have worked at all
and you mentioned that it has somewhat worked, thus, single sleeve?



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] Bitsy's WaveLAN problem
  2008-05-12 13:20           ` Axel Belinfante
@ 2008-05-12 14:35             ` David du Colombier
  2008-05-12 14:56               ` Axel Belinfante
  0 siblings, 1 reply; 14+ messages in thread
From: David du Colombier @ 2008-05-12 14:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I thought this might be a hardware problem, but it does not seem to be the case.

I tried the Lucent ORiNOCO Classic Gold PC Card on my Slackware Linux
laptop, and it seems to work fine with the "orinoco" driver. The
driver load without any problem. I can scan and connect to an essid.
Even the lights are switched on.

However, it would be a hardware problem from the iPaq PCMCIA sleeve.
I will probably buy another to confirm that.

--
David du Colombier



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] Bitsy's WaveLAN problem
  2008-05-12 12:52         ` Paweł Lasek
@ 2008-05-12 13:20           ` Axel Belinfante
  2008-05-12 14:35             ` David du Colombier
  0 siblings, 1 reply; 14+ messages in thread
From: Axel Belinfante @ 2008-05-12 13:20 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> > > I copied what seemed to be the necessary bits from a lunix driver.
> >  > while I did get it working, I got carried away making other changes
> >  > inspired by the lunix driver, to the point where I no longer felt
> >  > like proposing it as a patch. I may help you, though.
> >  > I put it on sources under contrib/axel/wlanfastkey
> >
> >  i don't understand.  if it adds 802.1x stuff, and fixes bugs
> >  why should it not be submitted?

too much gratious change, too much copy/paste hacking,
too little insight, (too little cleanup?)

> Maybe OS advocacy had gone to levels where the notion of adding things
> from other OS is frowned upon by those who did it, regardless of the
> code in question...

lack of confidence about quality of result,
especially when I saw more ether errors than I remembered seeing before.
"it seemed to work" does not feel so convincing.

Axel.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] Bitsy's WaveLAN problem
  2008-05-12 11:49       ` erik quanstrom
@ 2008-05-12 12:52         ` Paweł Lasek
  2008-05-12 13:20           ` Axel Belinfante
  0 siblings, 1 reply; 14+ messages in thread
From: Paweł Lasek @ 2008-05-12 12:52 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, May 12, 2008 at 1:49 PM, erik quanstrom <quanstro@quanstro.net> wrote:
> > I copied what seemed to be the necessary bits from a lunix driver.
>  > while I did get it working, I got carried away making other changes
>  > inspired by the lunix driver, to the point where I no longer felt
>  > like proposing it as a patch. I may help you, though.
>  > I put it on sources under contrib/axel/wlanfastkey
>
>  i don't understand.  if it adds 802.1x stuff, and fixes bugs
>  why should it not be submitted?
>
>  - erik
>

Maybe OS advocacy had gone to levels where the notion of adding things
from other OS is frowned upon by those who did it, regardless of the
code in question...

--
Paul Lasek



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] Bitsy's WaveLAN problem
  2008-05-12 10:10     ` Axel Belinfante
@ 2008-05-12 11:49       ` erik quanstrom
  2008-05-12 12:52         ` Paweł Lasek
  0 siblings, 1 reply; 14+ messages in thread
From: erik quanstrom @ 2008-05-12 11:49 UTC (permalink / raw)
  To: 9fans

> I copied what seemed to be the necessary bits from a lunix driver.
> while I did get it working, I got carried away making other changes
> inspired by the lunix driver, to the point where I no longer felt
> like proposing it as a patch. I may help you, though.
> I put it on sources under contrib/axel/wlanfastkey

i don't understand.  if it adds 802.1x stuff, and fixes bugs
why should it not be submitted?

- erik




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] Bitsy's WaveLAN problem
  2008-05-11 16:21   ` David du Colombier
  2008-05-11 21:09     ` cinap_lenrek
@ 2008-05-12 10:10     ` Axel Belinfante
  2008-05-12 11:49       ` erik quanstrom
  1 sibling, 1 reply; 14+ messages in thread
From: Axel Belinfante @ 2008-05-12 10:10 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> > you might check out a few of the changes in the pc version of the
> >  driver.  (particularly parsekey.)
>
> I just tried the PC version of the WaveLAN driver, but it does
> not seem to work better.
>
> Since few hours, I am not able to run the Wi-Fi card anymore,
> even with a high timeout. It always crashes as reported in my
> first e-mail.

A while ago I tried to modify the PC version of the driver
to support changing the wep key without resetting the card -
functionality that is needed by the 802.1X stuff.

I copied what seemed to be the necessary bits from a lunix driver.
while I did get it working, I got carried away making other changes
inspired by the lunix driver, to the point where I no longer felt
like proposing it as a patch. I may help you, though.
I put it on sources under contrib/axel/wlanfastkey

I think I modified one interface between the driver and
its environment to pass through some additional information,
which means that it may not be a drop-in replacement.

Also, some time has passed since I did this, so it may lack
some changes that were made to the original driver.


Axel.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] Bitsy's WaveLAN problem
  2008-05-11 16:21   ` David du Colombier
@ 2008-05-11 21:09     ` cinap_lenrek
  2008-05-12 10:10     ` Axel Belinfante
  1 sibling, 0 replies; 14+ messages in thread
From: cinap_lenrek @ 2008-05-11 21:09 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 173 bytes --]

I have an Lucent WaveLAN (silver) card too and it works
fine on my T23. I could add debug statements in my
working setup if it helps you getting some reference.

cinap

[-- Attachment #2: Type: message/rfc822, Size: 2856 bytes --]

From: "David du Colombier" <0intro@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net>
Subject: Re: [9fans] Bitsy's WaveLAN problem
Date: Sun, 11 May 2008 18:21:04 +0200
Message-ID: <fc7f972d0805110921p1edcd025qdfedc09ad6e665f9@mail.gmail.com>

> you might check out a few of the changes in the pc version of the
>  driver.  (particularly parsekey.)

I just tried the PC version of the WaveLAN driver, but it does
not seem to work better.

Since few hours, I am not able to run the Wi-Fi card anymore,
even with a high timeout. It always crashes as reported in my
first e-mail.

--
David du Colombier

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] Bitsy's WaveLAN problem
  2008-05-11 15:37 ` erik quanstrom
@ 2008-05-11 16:21   ` David du Colombier
  2008-05-11 21:09     ` cinap_lenrek
  2008-05-12 10:10     ` Axel Belinfante
  0 siblings, 2 replies; 14+ messages in thread
From: David du Colombier @ 2008-05-11 16:21 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> you might check out a few of the changes in the pc version of the
>  driver.  (particularly parsekey.)

I just tried the PC version of the WaveLAN driver, but it does
not seem to work better.

Since few hours, I am not able to run the Wi-Fi card anymore,
even with a high timeout. It always crashes as reported in my
first e-mail.

--
David du Colombier



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] Bitsy's WaveLAN problem
  2008-05-11 15:10 David du Colombier
@ 2008-05-11 15:37 ` erik quanstrom
  2008-05-11 16:21   ` David du Colombier
  0 siblings, 1 reply; 14+ messages in thread
From: erik quanstrom @ 2008-05-11 15:37 UTC (permalink / raw)
  To: 9fans

you might check out a few of the changes in the pc version of the
driver.  (particularly parsekey.)

also, the linux driver writes 0x80 to the COR register during reset.
(location varies depending if you have a pci device or not.)

on a quick read, i didn't see the plan 9 drivers doing this.

- erik




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9fans] Bitsy's WaveLAN problem
@ 2008-05-11 15:10 David du Colombier
  2008-05-11 15:37 ` erik quanstrom
  0 siblings, 1 reply; 14+ messages in thread
From: David du Colombier @ 2008-05-11 15:10 UTC (permalink / raw)
  To: 9fans

I succeeded to run the ORiNOCO card.

I increased the timeout, and it works sometimes.

bitsy# echo -n 'configure #l0 wavelan' > /dev/pcm0ctl
bitsy# bind -a '#l0' /net

Now, I am able to connect the Bitsy to the Access Point.

bitsy# echo -n 'essid my_essid' > /net/ether0/clone

In /sys/src/9/bitsy/wavelan.c, in the function w_cmd():

    if(rc&WResSts){
        /*
         * Don't print; this happens on every WCmdAccWr
         * for some reason.
         */
        if(0) print("#l%d: cmd %.4ux: status %.4ux\n",
                    ctlr->ctlrno, cmd, rc);
        return -1;
    }

It returns -1 when I set the essid, but it seems to work
since the Access Point can see the Bitsy's Ethernet address.

I can also run ip/ipconfig. Sometimes it works, sometimes
it freezes the system and I must reset the Bitsy.

bitsy# ip/ipconfig ether /net/ether0 192.168.0.7
                                     255.255.255.0

But I am not able to ping other machines, and other
machines cannot ping the Bitsy.

--
David du Colombier



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [9fans] Bitsy's WaveLAN problem
@ 2008-05-09 17:22 David du Colombier
  0 siblings, 0 replies; 14+ messages in thread
From: David du Colombier @ 2008-05-09 17:22 UTC (permalink / raw)
  To: 9fans

Hello,

I bought a Compaq iPaq H3650 to install Plan 9.

After some difficulties, I successfully compiled 9bitsy
and paqdisk from a current Plan 9.
Plan 9 is now running fine on my Bitsy.

I also tried old 9bitsy and paqdisk from John and Nemo,
they are working well too.

As recommended, I also bought a Lucent ORiNOCO Classic
Gold PC Card to use Wi-Fi.

However, I haven't succeeded to make the Wi-Fi work on
my Bitsy.

During the boot, I can see some error messages on the
serial console:

increfp 0
increfp full power
wavelanreset, iob 0xa0204000
#l0: exec#l0: init failed
ing cmd 0000: 0000
echo: write error: couldn't configure devdecrefp 0
ice
increfp power down
bind: #l0: no free devices
ipconfig: /net/ipifc/clone: bind ether /net/ether0:
'/net/ether0' file does not exist
ndb/dns: can't read my ip address

The card seems to be visible from Plan 9:

bitsy# grep Wave /dev/pcm0ctl
version Lucent Technologies;WaveLAN/IEEE;Version 01.01;

I tried manually to run the card, but I get these error
messages again:

bitsy# echo -n 'configure #l0 wavelan' > /dev/pcm0ctl
echo: write error: couldn't configure device
bitsy# bind -a '#l0' /net
bind: #l0: no free devices

I get exactly the same errors from Nemo's (May 2003) and
John's (March 2004) 9bitsy and paqdisk.

How can I solve this problem?

Thank you.

--
David du Colombier



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-05-12 15:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-11 12:44 [9fans] Bitsy's WaveLAN problem David du Colombier
  -- strict thread matches above, loose matches on Subject: below --
2008-05-11 15:10 David du Colombier
2008-05-11 15:37 ` erik quanstrom
2008-05-11 16:21   ` David du Colombier
2008-05-11 21:09     ` cinap_lenrek
2008-05-12 10:10     ` Axel Belinfante
2008-05-12 11:49       ` erik quanstrom
2008-05-12 12:52         ` Paweł Lasek
2008-05-12 13:20           ` Axel Belinfante
2008-05-12 14:35             ` David du Colombier
2008-05-12 14:56               ` Axel Belinfante
2008-05-12 15:13                 ` David du Colombier
2008-05-12 15:42                   ` David du Colombier
2008-05-09 17:22 David du Colombier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).