ORBIT-USER: BSSID/IBSS madwifi idea?
chris at orderonenetworks.com
chris at orderonenetworks.com
Fri Aug 25 00:32:49 EDT 2006
oops.. Turns out ic->ic_des_esslen isn't well calculated.
Change this:
int i;
for (i=0;i<IEEE80211_ADDR_LEN;i++) {
ni->ni_bssid[i] = ic->ic_des_essid[i % ic->ic_des_esslen];
}
to this:
int len = 0;
while (ic->ic_des_essid[len] != 0) len++;
int i;
for (i=0;i<IEEE80211_ADDR_LEN;i++) {
ni->ni_bssid[i] = ic->ic_des_essid[i % len];
}
or basically any consistent hash function that gets placed into ni->ni_bssid.
Chris
> I think I have the ad-hoc BSSID problem solved.
>
> I've adjusted the behaviour slightly to make it behave better with
> non-tweaked nodes.
>
> If there is a non-tweaked node that turns on first, (ie. better timestamp)
> it will use that non-tweaked nodes' BSSID. If it gets there first, it will
> make up its on tweaked/hashed value. This allows it to play better with
> others, and yet if all nodes are running the tweaked version, you're
> guaranteed they'll share BSSID's, since it either gets the BSSID from the
> 'head node' (that is a tweaked BSSID) or it makes up its own BSSID (which
> is tweaked).
>
> All that said, the code change is very simple. Working off the
> baseline.ndz you need to open a file called:
>
> /usr/src/madwifi/trunk/net80211/ieee80211_node.c
>
> On line 427 you see code that looks like this (which you could probably
> delete):
>
> if (ic->ic_flags & IEEE80211_F_DESBSSID)
> IEEE80211_ADDR_COPY(ni->ni_bssid, ic->ic_des_bssid);
> else
> ni->ni_bssid[0] |= 0x02; /* local bit for IBSS */
>
> Right after those lines add these lines:
>
> int i;
> for (i=0;i<IEEE80211_ADDR_LEN;i++) {
> ni->ni_bssid[i] = ic->ic_des_essid[i % ic->ic_des_esslen];
> }
>
> Thats it.
>
> And yes, the hash function is rather simple. However, I don't think it
> matters much, since so long as the first byte is in the ascii range it
> will not look like a MAC address on the ORBIT lab (which is where the
> non-tweaked nodes get thier BSSID from if they don't find someone elses to
> use).
>
> to get all this running:
>
> 1. cd /usr/src/madwifi/trunk
> 2. make
> 3. cp /usr/src/madwifi/trunk/net80211/*.ko /lib/modules/2.6.12/net
> 4. modprobe -r ath_pci
> 5. modprobe ath_pci
>
> and then do your standard iwconfig/ifconfig stuff.
>
> I plan to run full tests tomorrow on the main grid and verify this, but I
> feel pretty good about this solution - mainly because it alters the
> original behavior in a way that should have no dependencies.
>
> Chris
>
>> Glad to hear we came up with the same idea.
>>
>> I really need to get this solved, so I hope I can get it implemented in
>> the next few days.
>>
>> If you beat me to it though, don't hesitate to send me an email :)
>>
>> Chris
>>
>>> Nice timing. We were just in a discussion on this topic and the same
>>> idea was proposed.
>>>
>>> My understanding is that the nodes are not seeing each other's beacons,
>>> maybe in part because of some buggy implementation or as a result of
>>> near simultaneous node-power-on in orbit.
>>>
>>> Anyways, for ORBIT like scenario, we agreed that a hash function was
>>> the
>>> solution.
>>>
>>> So please go ahead with the idea.
>>>
>>> -Pandurang
>>>
>>> chris at orderonenetworks.com wrote:
>>>> Hello All,
>>>>
>>>> I've spent a bunch of time reading madwifi source and google trying to
>>>> come up with a decent solution to the BSSID problem where it jumps
>>>> around
>>>> on me.
>>>>
>>>> I think I've come up with a solution that I'm going to try and
>>>> implement,
>>>> but I'd like to see if anyone knows if it is a bad idea, or
>>>> fundamentally
>>>> flawed from the start.
>>>>
>>>> Basically in adhoc mode each node finds the oldest BSSID it can and
>>>> uses
>>>> that. Unfortunately this is doesn't work as advertised.
>>>>
>>>> The solution I'm thinking of implementing is simply hashing the ESSID
>>>> (ie.
>>>> iwconfig essid 'blah') into one of those XX:XX:XX:XX:XX:XX addresses
>>>> and
>>>> then when a node is in ad-hoc mode, I'll force the BSSID to that hash.
>>>>
>>>> Since each 'tweaked' node will use the same hash function they will
>>>> all
>>>> start off on the same BSSID. Any un-tweaked nodes will either follow
>>>> along
>>>> or do something else, but they should not be unduly affected.
>>>>
>>>> I like this solution since it appears that:
>>>> 1. it will not muck with un-modified nodes
>>>> 2. does not require any fiddling with the beaconing system, etc.
>>>> 3. allows different ad-hoc networks with different ESSID's to
>>>> co-exist.
>>>>
>>>> I'd appretiate any thoughts, comments, etc.
>>>>
>>>> Thanks!
>>>> Chris
>>>>
>>>
>>
>>
>>
>
>
>
More information about the orbit-user
mailing list