Friday, December 30, 2011

Solution to Atheros AR9285 Wireless Card - Pinging works, but browsing the web does not.

A few years back I purchased a Compaq CQ62-215DX notebook for $300.00. Based on the AMD V120 CPU, it is all the power you need to watch movies, run microsoft word an surf the web.

Recently I updated some drivers, or I think I did during a routine Windows Update, and afterwards I was unable to surf the web. I was able to ping google.com/yahoo.com, but could not retrieve pages for major web sites. Other laptops worked so I knew it wasn't a router issue.

Doing a search yielded plenty of results with people having the same problem.

System: 
Windows 7 64-bit Home Edition
Netgear WNDR3700 - has b/g/n and supports 2.5 and 5ghz. 150mbps to 300 mbps.
Compaq CQ62-215DX Atheros AR9285 b/g/n

Step 1: Try all the drivers available for this card

There are about 2-3 driver packages on hp.com and the sketchy www.atheros.cz site.

Link to the Atheros 2011 drivers sp52131.exe
Link to atheros.cz drivers

I probably installed these 20 times and still got no connectivity. Not to mention the Auto Update Installation on Windows 7 home would keep trying to install the old drivers without my permission. (gpedit.msc is not available on windows 7 home which lets you stop this from happening).

Step 2: Found a post with a possible solution

After spending a few days researching, I stumbled upon a post on the hp forums where a user who had an ASUS laptop turned off the Wireless Mode from Auto to b/g and then was able to connect.

Problem is when you go to device properties for your wireless network card you may not have a Wireless Mode setting. I reinstalled all the old drivers to see if there was a wireless mode setting in previous versions and nope, HP did not make these settings available.

Step 3: Look at the .inf files

The next step was to determine where in the registry the advanced settings for the atheros wireless card were located. Long story short I was able to track the location of the registry keys used to configure the device, and I found a bunch of registry settings in the .inf files from the atheros.cz drivers. Next would be to add the registry settings to my Windows 7 registry.

Solution

TLDR; Wireless N did not work on the AR9285. Might be hardware, might be drivers. Whatever is I had to turn it off so that I could at least connect to the internet.

I first tried to unpack the driver packages and modify the .inf files so I could get the setup.exe to do this for me. After a few failed attempts I gave up trying to automate key registration, and instead went with hand editing the registry. (yes regedit.exe can blue screen/kill your computer so be careful)

From the .inf file in the atheros.cz we have these settings.

HKR, Ndi\params\NetBand,     ParamDesc, 0,  %WirelessMode%
HKR, Ndi\params\NetBand,
     Base, 0,  "10"
HKR, Ndi\params\NetBand,
     default, 0, "26636"
HKR, Ndi\params\NetBand,
     type, 0,  "enum"
HKR, Ndi\params\NetBand\enum,
"26636", 0,  %WirelessModeAuto%
HKR, Ndi\params\NetBand\enum,
"12",  0,  %WirelessMode11bgOnly%

[Strings]
WirelessMode                 = "Wireless Mode Selection"
WirelessMode11bgOnly         = "802.11b/g"
WirelessModeAuto             = "Auto"

Step 4: Enter these in the registry in the right place - good luck with that

To find where, I did a search for "Adhoc 11n" in regedit.exe. This is one of the settings you can choose for your drivers and it seemed unique enough. I only found two cases of this in my registry so I decided to add the above keys and values next to the Adhoc 11n. One of these had to be the correct settings for my device. Lucky for me the first one I chose happened to be the right one.

This is how your registry should look. (Yeah you can't see the Adhoc 11n, but it's within the htAdhocEnable)


Create a key called NetBand, and add each value as a string. You can compare the format to the shortPreamble above it which is a setting that was installed by the driver. (If you don't trust me look at the .inf file from atheros.cz)

Next create a sub key within NetBand called enum. This is where you get to choose Auto or Wireless b/g


After doing this, go to your wireless network card, click properties, configure, advanced and you should now be able to choose b/g or auto.



Set it to 802.11 b/g and hit OK. Your wireless connection will restart and hopefully you will now be able to connect. It did for me. Woot!

NOTE: For those who have a little more time and effort, or maybe someone at HP can figure this out - change the .inf file and add above registry fields so we can configure the Wireless Mode. This would save a lot of people time and effort.

Friday, December 2, 2011

Install 389 in Fedora 16 Starting and Stopping LDAP

Refer to this page for some info about starting and stop the 389 server.
http://directory.fedoraproject.org/wiki/Howto:systemd

1) To setup the system for testing add an entry into your /etc/hosts such as

127.0.0.1 example.com 

2) To install 389 add the packages to fedora 16.

3) Run the command sudo setup-ds-admin.pl There is a setup-ds.pl but that I believe sets up separate ldap servers and not config the entire system including the admin.

4) When it asks for a host, it will give something like example.com.locahost Enter example.com

5) Enter the domain.

On mine it asks for dc=com. I entered instead dc=example,dc=com

6) Answer the remaining questions and complete the installation
(If you make a mistake run sudo remove-ds-admin.pl)

7) To connect to 389 as an admin
run 389-console 
Enter User ID: dc=Directory Manager 
Passsword: [whatever u entered during the setup process] Administration 
URL: http://localhost/9830 

If you have problems use the java from sun instead of openjdk.
(google java sun alternatives linux)

---

Starting and Stop the service.


1) Start the 389 admin service

service dirsrv-admin start

This however starts up the admin portion of 389 and not the ldap server that stores data.

2) Start your 389 ldap service

I usually use service to start and stop my services
sudo service dirsrv@example start

With fedora 16, I'm finding that I'm using systemctl more often

This will also start and stop the dirsrv service
sudo systemctl start dirsrv@example

To start and stop all your ldap services
sudo systemctl start dirsrv.target


3) The ldap server does not start on boot.

Current unsure why service dirsrv start does not work.

 -