Skip to contentSkip to conversation

p54: ad-hoc mode doesn't work

DISCUSSION Fabio Rossi 3 participants 9 messages Dec 23, 2008 – Dec 29, 2008

lore
Share & tools
lore
#0 lore raw

I was trying to test the ad-hoc mode with my wireless nic (p54 driver, latest wireless-testing git) but I get the following error result:

# iwconfig wlan0 mode ad-hoc
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Operation not supported.

The documentation page on linuxwireless.org states that the ad-hoc mode should be supported: what's wrong?

Thank you,
Fabio

#1 lore raw
Quoted 9 lines · Fabio Rossi

I was trying to test the ad-hoc mode with my wireless nic (p54 driver, latest wireless-testing git) but I get the following error result:

# iwconfig wlan0 mode ad-hoc
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Operation not supported.

The documentation page on linuxwireless.org states that the ad-hoc mode should be supported: what's wrong?

I think you need to install crda:
http://wireless.kernel.org/en/developers/Regulatory/CRDA

Once CRDA is installed, use "iw" to set your regulatory domain. Without CRDA, the kernel uses very conservative rules that don't allow beaconing and thus the ad-hoc mode.

Signature · 2 lines
Regards,
Pavel Roskin
#2 lore raw

It seems strange to me, on the other PC I'm using the ath5k driver with a PCI wireless NIC and the interface enters in ad-hoc mode without complaining (CRDA is not installed).

I'll try to install also CRDA to see if something changes, maybe there is a difference between the ath5k and p54 drivers.

Thanks,
Fabio

Quoted 3 lines · Pavel Roskin

Once CRDA is installed, use "iw" to set your regulatory domain. Without CRDA, the kernel uses very conservative rules that don't allow beaconing and thus the ad-hoc mode.

#3 lore raw

Quoting Fabio Rossi <[email protected]>:

Quoted 3 lines

It seems strange to me, on the other PC I'm using the ath5k driver with a PCI wireless NIC and the interface enters in ad-hoc mode without complaining (CRDA is not installed).

Maybe you have CONFIG_WIRELESS_OLD_REGULATORY enabled on the systems with ath5k.

Signature · 2 lines
Regards,
Pavel Roskin
#5 lore raw
In reply to Fabio Rossi
Quoted 6 lines · Fabio Rossi

It seems strange to me, on the other PC I'm using the ath5k driver with a PCI wireless NIC and the interface enters in ad-hoc mode without complaining (CRDA is not installed).

I'll try to install also CRDA to see if something changes, maybe there is a difference between the ath5k and p54 drivers.

Most distributions are using >= 2.6.28 kernels with CONFIG_WIRELESS_OLD_REGULATORY which means the US is the default regulatory domain and its built statically into the kernel so the values are used CRDA does not have to be queried. If CRDA is present the regulatory domain is just updated with CONFIG_WIRELESS_OLD_REGULATORY.

To find out the details of your channel configuration install iw and then do: iw list

http://wireless.kernel.org/en/users/Documentation/iw

For example for my dual band card I get (after running iw reg set US though) for the frequencies:

Frequencies:
* 2412 MHz
* 2417 MHz
* 2422 MHz
* 2427 MHz
* 2432 MHz
* 2437 MHz
* 2442 MHz
* 2447 MHz
* 2452 MHz
* 2457 MHz
* 2462 MHz
* 2467 MHz (disabled)
* 2472 MHz (disabled)
* 2484 MHz (disabled)
Frequencies:
* 5180 MHz
* 5200 MHz
* 5220 MHz
* 5240 MHz
* 5260 MHz (radar detection)
* 5280 MHz (radar detection)
* 5300 MHz (radar detection)
* 5320 MHz (radar detection)
* 5500 MHz (radar detection)
* 5520 MHz (radar detection)
* 5540 MHz (radar detection)
* 5560 MHz (radar detection)
* 5580 MHz (radar detection)
* 5600 MHz (radar detection)
* 5620 MHz (radar detection)
* 5640 MHz (radar detection)
* 5660 MHz (radar detection)
* 5680 MHz (radar detection)
* 5700 MHz (radar detection)
* 5745 MHz
* 5765 MHz
* 5785 MHz
* 5805 MHz
* 5825 MHz

Luis

#4 lore raw
In reply to Pavel Roskin
Quoted 2 lines · Pavel Roskin

Maybe you have CONFIG_WIRELESS_OLD_REGULATORY enabled on the systems with ath5k.

Thank you very much Pavel, you got the point :-) I had set CONFIG_WIRELESS_OLD_REGULATORY on the PC with the ath5k card.

Regards,
Fabio

#6 lore raw
In reply to Luis R. Rodriguez
Quoted 6 lines · Luis R. Rodriguez

Most distributions are using >= 2.6.28 kernels with CONFIG_WIRELESS_OLD_REGULATORY which means the US is the default regulatory domain and its built statically into the kernel so the values are used CRDA does not have to be queried. If CRDA is present the regulatory domain is just updated with CONFIG_WIRELESS_OLD_REGULATORY.

Thank you for the explanation! Now I have disabled CONFIG_WIRELESS_OLD_REGULATORY and I have installed CRDA and iw. After setting the country I'm able to create the ad-hoc IBSS between the two PCs.

According to my opinion the error message posted in the original message of this thread might be misleading for the user: the network card doesn't enter in ad-hoc mode because the country for the CRDA is not set while the error says that the ad-hoc mode is not supported. What do you think about?

Regards,
Fabio

#7 lore raw

Quoting Fabio Rossi <[email protected]>:

Quoted 4 lines

According to my opinion the error message posted in the original message of this thread might be misleading for the user: the network card doesn't enter in ad-hoc mode because the country for the CRDA is not set while the error says that the ad-hoc mode is not supported. What do you think about?

Perhaps we need a separate error code "not permitted by regulations". Or we need to reuse one of the existing error codes for that.

Signature · 2 lines
Regards,
Pavel Roskin
#8 lore raw
Quoted 2 lines · Pavel Roskin

Perhaps we need a separate error code "not permitted by regulations". Or we need to reuse one of the existing error codes for that.

Yes, this would be better for the end-user.

Fabio