Problem With TP-Link Wn722n

Hi All.
I’ve recently purchased this TP-Link wn722n card. it has AR9271 chipset.
This card is High-Gain usb card and can transmit up to 500 mW of power. but in linux i can’t use this feature.
I have done the country registar code to BO (“iw reg set BO”) , but when try to change the txpower to 500mw (“iwconfig wlan1 txpower 27”), the command executes with no problem,but have no effect. when i type iwconfig again,it’s showing it’s preliminary value (“20 db”).
How to do that?
I guest that it’s a bug with kernel.
I really need this feature and ask please to solve this bug.
Some body please tell me where to report the bug.

On Sat, 24 Aug 2013 19:56:03 +0000, phenomx64 wrote:

> Anybody Help pleaseeeeeeeeeeee.
>
> Wireless moderators and kernel team,heeeeeeeeeelp:’(:’(
>
> how to do it?

You can report the bug at http://bugzilla.novell.com - I don’t know
anything more about how to solve the issue you’re having, unfortunately.
You haven’t said what version of openSUSE you’re using, which might be
helpful to those who can help.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On 2013-08-24 21:56, phenomx64 wrote:
>
> Anybody Help pleaseeeeeeeeeeee.

I’m sorry. I did read your initial post, and marked it for reading
again, but I have no idea about your issue. I’m just answering so that
you know that some people have read it with attention.

Suggest you also mention your country. I recently bought a router from
that brand, and while it can be configured for several countries, units
sold in the USA have the country capability removed: they are hardwired
for the USA alone. Guess they don’t trust their citizens from setting
something wrong and bad :-p


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On 08/25/2013 01:56 AM, phenomx64 wrote:
>
> robin_listas;2581466 Wrote:
>> On 2013-08-24 21:56, phenomx64 wrote:
>>>
>>> Anybody Help pleaseeeeeeeeeeee.
>>
>> I’m sorry. I did read your initial post, and marked it for reading
>> again, but I have no idea about your issue. I’m just answering so that
>> you know that some people have read it with attention.
>>
>>
>> Suggest you also mention your country. I recently bought a router from
>> that brand, and while it can be configured for several countries, units
>> sold in the USA have the country capability removed: they are hardwired
>> for the USA alone. Guess they don’t trust their citizens from setting
>> something wrong and bad :-p
>>
>> –
>> Cheers / Saludos,
>>
>> Carlos E. R.
>> (from 12.3 x86_64 “Dartmouth” at Telcontar)
>
> Thanks dude for your attention. I don’t know exactly what’s the problem
> with the vendors. This chipset (ar9271) have the capability to power up
> to 2000mW! but for some ******** reasons they have limited the card to
> 500mW in this model (wn722n). Yes, they don’t trust their customers and
> i see this special in TpLink products. I saw in web that they have done
> this via eeprom. One question is that what this eeprom do exactcly? Can
> we change the ath9k_htc module? Because if I dont go wrong the ath_9k go
> to the eeprom by the kernel logs :
>
> Code:
> --------------------
> 16.140275] usb 1-2.1: ath9k_htc: Firmware htc_9271.fw requested
> 16.140739] usbcore: registered new interface driver ath9k_htc
> 21.385136] usb 1-2.1: ath9k_htc: Firmware - htc_9271.fw download failed
> 21.391094] usb 1-2.1: ath9k_htc: USB layer deinitialized
> 127.784809] usb 1-2.1: ath9k_htc: Firmware htc_9271.fw requested
> 128.074311] usb 1-2.1: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272
> 128.318874] ath9k_htc 1-2.1:1.0: ath9k_htc: HTC initialized with 33 credits
> 128.707984] ath9k_htc 1-2.1:1.0: ath9k_htc: FW Version: 1.3
> 128.707998] ath: EEPROM regdomain: 0x809c
> 128.708001] ath: EEPROM indicates we should expect a country code
> 128.708003] ath: doing EEPROM country->regdmn map search
> 128.708005] ath: country maps to regdmn code: 0x52
> 128.708008] ath: Country alpha2 being used: CN
> 128.708010] ath: Regpair used: 0x52
> 128.804348] Registered led device: ath9k_htc-phy0
>
> --------------------
>
>
> I bought this card especially for pentesting usage. I have a Kali linux
> (a newer version of backtrack) too. In Kali when I try to give up the
> card higher transmit power than 20 it gives me the argument error
>
> Code:
> --------------------
> Error for wireless request “Set Tx Power” (8B26) :
> SET failed on device wlan1 ; Invalid argument.
>
> --------------------
>
> , but the suse even never show this.
>
> I found one soulution ,if anybody like it.
> I saw in Kali kernel logs when this card will be pluged in , it calls
> crda for CN (china) that will not give higher than 100mW in that
> regulatory domain, but even when I change the regulatory domain to
> example BZ or BO via
> Code:
> --------------------
> iw reg set BO
> --------------------
> nothing changes.
> I downlaoded the wireless regulatory domain and crda source files and
> changed the CN entry in the regulatory “db.txt” and compiled them again.
> additional help at ‘ar9271 and BT5r1 Fully working! Reg_Domain change
> APmode full power! ^_^’
> (http://www.backtrack-linux.org/forums/showthread.php?t=47385).
> I could now even run the card at 1000mW. Didn’t try higher because of
> risk to damage to the card.
>
>
>
> but in opensuse something is wrong,because it even dont give up the
> argument error at the beggining when trying to change the transmit power
> and doesn’t change it too.

You may, of course, change your code any way you want, but we (the driver
developers) cannot. One of the reasons for slow acceptance of Linux was its
total lack of power and channel regulatory restrictions. That meant that it
could never be used by any governmental organizations where they wanted wireless
devices to be used. That was the reason that CRDA was developed. It enforces the
restrictions for the particular regulatory domain. Of course power is the
minimum of the max recorded in the device PROM and the regulatory max.

The utilities in openSUSE are just implicitly obeying the laws of whatever
domain you specify when you load cfg80211, or when you change the domain with a
command.

As far as I can tell from your description, it is doing exactly what it should.

On 08/25/2013 10:56 AM, phenomx64 wrote:
>
> No. It’s not doing well. Kali is doing well but Opensuse isn’t.I have
> an Alfa036 card (chipset RTL8187) and is working well under both Kali
> and Opensuse. but the Tplink not under opensuse.
>
> 1) The first problem is even without changing the regulatory domain,
> you can change the transmit power of the card but it has no effect!
> You can enter :
> Code:
> --------------------
> iwconfig wlanX txpower 50
> --------------------
> or even set it to 100 , 1000, 10000 , every nonsense number. It accepts
> , even doesn’t gives error.
>
> 2)The second problem is that even changing the regulatory domain for
> example to BO or BZ ,you cannot change the transmit power. this card can
> transmit up to 500mW, but in Opensuse it’s stock in 100mW and doesn’t
> get higher. I think there’s a conflict between eeprom regulatory domain
> and linux regulatory domain especially for this chipset & driver.

Please post the lines in dmesg that were output by cfg80211. You should see
something like


[482155.907429] cfg80211: Calling CRDA for country: BO
[482155.918289] cfg80211: Regulatory domain changed to country: BO
[482155.918298] cfg80211:   (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[482155.918301] cfg80211:   (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 3000 mBm)
[482155.918304] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (N/A, 3000 mBm)

You should create a file named /etc/modprobe.d/50-cfg80211.conf containing the
line “options cfg80211 ieee80211_regdom=BO”. Then you will not have to change it.

The utility iwconfig is obsolete, and most drivers implement only a portion of
the commands. Some return errors when you try one that is not implemented, and
others implement just enough to let the command be a null request.

Utility iw should be the one used. You need to

dev <devname> set txpower <auto|fixed|limit> <tx power in mBm>]

In the BO domain, you should be able to set 3000 mBm.