Jonathan Wilson
2012-08-03 20:03:00 UTC
I have written a clone of the Nokia wl1251-cal package (used for setting
regulatory domain, NVS and MAC address for N900 wl1251 WiFi chip)
Source is available here:
http://www.cncmods.net/files/wl1251-cal_1.0-1.tar.gz
To compile you need libcal-dev and libnl-dev installed.
No .deb file posted because its not intended for people to install this,
its intended for this code to go into CSSU and other things.
Like my bt-cal work, its intended that this be used for CSSU and also for
Meego/Mer/Nemo/etc. Its also been written so that someone can modify this
in some way so that it only uses standard kernel things, thus allowing the
removal of the non-standard Nokia netlink interfaces. Note that on
MeeGo/Mer/Nemo/etc if you use this and my bluetooth-cal stuff, you can
eliminate the libppu-bin, libwl1251-bin, sysinfod-rx51 and wl1251-cal-bin
packages. On Maemo, you can eliminate bluetooth-sysinfo, wl1251-cal and
libppu if you are updating mp-blah-pr appropriately. Removing libwl1251
will force a removal of testserver, whatever that is (no clue if testserver
is important or not)
Differences from the Nokia tool:
1.It does not use sysinfo, it reads everything directly from cal via libcal.
2.WiFi regulatory domain (FCC vs not FCC) is read from CAL (same place in
CAL as sysinfo-tool -g /certs/ccc/pp/wlan-channel would get it from) rather
than being determined based on the current mobile network country code. (if
you wanted to make it use current MCC it would be easy enough to support on
Maemo5 at least, dont know about ofono)
3.It doesn't print the same output to stdout when its run as wl1251-cal
from Nokia (as of now it only prints what it thinks the regulatory domain is)
4.It probably doesn't have the same error handling as the Nokia tool
5.The order that it does the 3 steps (set MAC address, send NVS, set
regulatory domain) is different to the Nokia tool (easily fixed if
necessary and I doubt it matters in any case)
6.My tool may leak resources (e.g. not closing handles properly) where the
Nokia tool does not (or in some cases the Nokia tool may leak resources
that my tool does not)
It appears to be working (in that I see the right IOCTL being triggered,
the right MAC address appearing and the right data being sent over netlink
for regulatory domain and for NVS) but I cant be sure that there are no
problems with it resulting from the differences between my tool and Nokias.
This will NOT work for any device other than the N900 nor do I have any
plans to do anything for any device other than the N900.
regulatory domain, NVS and MAC address for N900 wl1251 WiFi chip)
Source is available here:
http://www.cncmods.net/files/wl1251-cal_1.0-1.tar.gz
To compile you need libcal-dev and libnl-dev installed.
No .deb file posted because its not intended for people to install this,
its intended for this code to go into CSSU and other things.
Like my bt-cal work, its intended that this be used for CSSU and also for
Meego/Mer/Nemo/etc. Its also been written so that someone can modify this
in some way so that it only uses standard kernel things, thus allowing the
removal of the non-standard Nokia netlink interfaces. Note that on
MeeGo/Mer/Nemo/etc if you use this and my bluetooth-cal stuff, you can
eliminate the libppu-bin, libwl1251-bin, sysinfod-rx51 and wl1251-cal-bin
packages. On Maemo, you can eliminate bluetooth-sysinfo, wl1251-cal and
libppu if you are updating mp-blah-pr appropriately. Removing libwl1251
will force a removal of testserver, whatever that is (no clue if testserver
is important or not)
Differences from the Nokia tool:
1.It does not use sysinfo, it reads everything directly from cal via libcal.
2.WiFi regulatory domain (FCC vs not FCC) is read from CAL (same place in
CAL as sysinfo-tool -g /certs/ccc/pp/wlan-channel would get it from) rather
than being determined based on the current mobile network country code. (if
you wanted to make it use current MCC it would be easy enough to support on
Maemo5 at least, dont know about ofono)
3.It doesn't print the same output to stdout when its run as wl1251-cal
from Nokia (as of now it only prints what it thinks the regulatory domain is)
4.It probably doesn't have the same error handling as the Nokia tool
5.The order that it does the 3 steps (set MAC address, send NVS, set
regulatory domain) is different to the Nokia tool (easily fixed if
necessary and I doubt it matters in any case)
6.My tool may leak resources (e.g. not closing handles properly) where the
Nokia tool does not (or in some cases the Nokia tool may leak resources
that my tool does not)
It appears to be working (in that I see the right IOCTL being triggered,
the right MAC address appearing and the right data being sent over netlink
for regulatory domain and for NVS) but I cant be sure that there are no
problems with it resulting from the differences between my tool and Nokias.
This will NOT work for any device other than the N900 nor do I have any
plans to do anything for any device other than the N900.