Jump to content

chputney

Active Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

1,017 profile views

chputney's Achievements

Newbie

Newbie (1/14)

  1. I think that I understand the issue with "Random mac". When you click on this, it gives the new mac address to wlan0 or wlan1 okay. The problem is that if you "Save" after this, then the /etc/wireless/config file is updated with the "option macaddr xx:xx:...". This is a problem because during boot if the wireless mac address is not found in the etc/config/wireless file, a new configuration is added. This could be fixed by not saving the mac address in the configuration file.
  2. I am having trouble understanding why Wifi Manager is adding radio configurations. I am seeing several things that I don’t understand. I start with a clean configuration by: rm /etc/config/wireless wifi detect > /etc/config/wireless reboot First issue – new radio configurations Now I use the Wifi Manager option Random Mac to scramble the mac accress for radio0. This shows me a new mac address. I use “Save” and “Commit” to make this permanent. Looking at the /etc/wireless/config file, a new line “option macaddr '2C:AC:41:8D:45:A8'” has been added to the file under radio0. Now I reboot – expecting to see the new mac address on radio0. After reboot, looking at the Wifi Manager panel, I see a new configuration called radio2 has been added with the original assigned mac address. The random mac is not working. (I don’t think the mac address option in /etc/config/wireless works.) Looking at the /etc/config/wireless file, I see that it is disabled but Wifi Manager says it is enabled. What is going on ? Second issue – cannot delete configurations Now I try to get rid of this new configuration. I use “Remove config” in the Wifi Manager window, then “Save” and “Commit”. Looking at the /etc/config/wireless file, the radio2 configuration is gone. Now I reboot – and the radio2 configuration is back! Third issue- Auto Detect I think that “Auto-Detect” is intended to reset the wifi configuration to defaults. When I perform “Auto-Detect” “Save” and “Commit”, it seems to have no effect sometimes. The /etc/wireless/config file is unchanged. If the /etc/wireless/config file is deleted manually, it can restore an original configuration. One time I tried it and it restored a configuration with the radios swapped. Is there a “right” way to use this ?
  3. In my search to get wlan0 to be able to use Channel 12 and 13, I found that wlan0 uses the country stored in the EEPROM and this is not over-ridden by the /etc/config/wireless file. The cfg80211 code first uses the “world” reg rule and then uses the country in the /etc/config/wireless, but whatever the country, it cannot be have more tx power or channels than the “world” reg rule or the US rule. I decided to change the “world” and US definitions in cfg80211.ko to be less restrictive so that the country definition in /etc/config/wireless would be obeyed. Looking at cfg80211.c, we see that the “world” reg rule and the others are defined like: 45 static const struct ieee80211_regdomain mwifiex_world_regdom_custom = { 46 .n_reg_rules = 7, 47 .alpha2 = "99", 48 .reg_rules = { 49 /* Channel 1 - 11 */ 50 REG_RULE(2412-10, 2462+10, 40, 3, 20, 0), 51 The channels extend from 2402 MHz to 2472 MHz and the Tx power is 20dBm, so we will just patch the end frequency from 2472 MHz to 2482 MHz and and patch the Tx power to 30dBm. The value is stored in kHz so 2472 Mhz is 2472000 or in hex 0x0025b840. We need to change two world definitions and the US definition to 2482 MHz or 0x25df50. The Tx power is stored as dBm*100 or 2000 or 0x000007d0 and we need to change this to 3000 or 0x00000bb8. Use WinSCP to get the file “/lib/modules/3.3.8/cfg80211.ko” into a hex editor. Change these addresses: 0x23344: was: 0x0025b840, is: 0x0025dff0 // 2472000 to 2482000 0x23350: was: 0x000007d0, is: 0x00000bb8 // 2000 to 3000 0x23df4: was: 0x0025b840, is: 0x0025dff0 // 2472000 to 2482000 0x23e00: was: 0x000007d0, is: 0x00000bb8 // 2000 to 3000 0x26ac4: was: 0x0025b840, is: 0x0025dff0 // 2472000 to 2482000 0x26ad0: was: 0x00000a8c, is: 0x00000bb8 // 2700 to 3000 After making these patches, use WinSCP to put the cfg80211.ko back in /lib/modules/3.3.8/cfg80211.ko. Add your country to the /etc/config/wireless file as: uci set wireless.@wifi-device[0].country=NZ; uci commit wireless uci set wireless.@wifi-device[1].country=NZ; uci commit wireless Reboot, and check that your channels are present with: iwlist wlan0 channel iwlist wlan1 channel I have attached the modified cfg80211.ko as a zip. I think in the future the way to resolve this issue is to build Openwrt with: CONFIG_ATH_USER_REGD=y I think that this will default to the US allowed settings, but will allow a county code to be used. I got this from http://sadevil.org/blog/2013/04/29/openwrt-atheros-channel-availability/ Here are some other references: http://wireless.kernel.org/en/developers/Regulatory#CRDA http://wireless.kernel.org/en/developers/Documentation/cfg80211#Regulatorysupport http://wireless.kernel.org/en/developers/Regulatory/processing_rules http://wireless.kernel.org/en/users/Drivers/ath http://lxr.free-electrons.com/source/drivers/net/wireless/mwifiex/cfg80211.c http://lxr.free-electrons.com/source/drivers/net/wireless/mwifiex/cfg80211.h http://lxr.free-electrons.com/source/include/net/regulatory.h http://lxr.free-electrons.com/source/net/wireless/reg.c cfg80211.zip
  4. The uci set wireless is just another way of editing the file to add the country, and so it has no effect. I will try the suggestion in the link and report back.
  5. OK, the last info was wrong. Here is some better stuff. For radio1, you can temporarily allow channels 12 and 13 by the command “iw reg set NZ”. A permanent solution is to edit the file /etc/config/wireless (using WinSCP) and add the following line. config wifi-device 'radio1' . . . . . . option country 'NZ' ß------- add this This change now will show activity on the Site Survey infusion. I don't have radio0 working on channel 13 yet.
  6. I am new to my Pineapple V and finding some strange things happening with the radios. When I first got it up and running I was able to have both radios broadcasting BSSID in AP mode. (I am pretty sure of this but maybe I was dreaming.) Now I have upgraded to 1.01 and radio1 will no longer be an AP. The receiver is working however, because I can see packets with airodump-ng. I am enabling it with Wifi Manager and am checking the signal on my phone with Wifi Analyzer. I have reverted to 1.00 and still cannot get radio1 to show BSSID. I have tried “rm /etc/config/wireless && wifi detect > /etc/config/wireless && retboot” several times to reset the configuration but cannot get radio1 broadcasting.
  7. Issue with search: Searching for something like etc/config/wireless won't work because the slashes are deleted
  8. Change the config file in etc/config/wireless. For radio0 change the line "option hwmode 11ng" to "option hwmode 13ng" and for radio1 it is "option hwmode 13g" This fixes airodump-ng so that it works, but "Site Survey" must have this limit hard coded somewhere.
  9. OK, I understand. airodump-ng is showing channel 13. Site survey is not checking above 11.
  10. I can't figure out how to add channel 12 and 13 capability ? What is the secret ?
×
×
  • Create New...