Re: setting bssid in adhoc mode

John Hay <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
On Thu, Sep 25, 2008 at 04:41:30PM +0200, Paul B. Mahol wrote:
> On 9/22/08, John Hay <[email protected]> wrote:
> > Hi
> >
> > I'm trying out the new ath/wlan stuff in current. Should one still be
> > able to set the bssid in adhoc mode? We normally lock the bssid in
> > an adhoc network because of problems that the network split and does
> > not merge, if you do not do it.
> >
> > What I have done is this:
> >
> > # ifconfig wlan0 create wlandev ath0 wlanmode adhoc
> > # ifconfig wlan0 ssid ptamesh up
> >
> > Up to here works well. It will scan and if it finds another node with the
> > same ssid, it will "lock" on that channel and use the correct bssid.
> >
> > If it does not find another node with the same ssid, it will start it
> > own thing on channel 10. But it looks like one cannot set the bssid.
> >
> > # ifconfig wlan0 bssid 02:07:ca:fe:ba:be
> > ifconfig: 02:07:ca:fe:ba:be: bad value
> 
> I had similar experience with STA mode, instead I use ap (ap is alias
> for bssid, at least it works in STA mode)
> I never bothered is this bug in manual page, ifconfig or in something else ...

Ah, thanks yes, "ifconfig wlan0 ap 02:07:ca:fe:ba:be" works just fine.
Just do not try to unset it with "ifconfig wlan0 ap -". That is an
alias for "panic now" :-)

So it looks like ifconfig is getting confused with the many different
uses of the keyword bssid.

I must say I still do not understand what the other use for bssid is.
Close to the end of ifconfig/ifieee80211.c there are these:

DEF_CMD_ARG("bssid",            set80211bssid),
DEF_CMD_ARG("ap",               set80211bssid),
...
DEF_CLONE_CMD("bssid",  1,      set80211clone_bssid),
DEF_CLONE_CMD("-bssid", 0,      set80211clone_bssid),

So my guess is that I was hitting the clone version when in fact I
needed the other version. Luckily ap does not have a clone version.
So when should the clone version be used? And how does ifconfig
decide which one to use?

John
-- 
John Hay -- [email protected] / [email protected]
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.