Wireless driver

58 views
Skip to first unread message

johna...@gmail.com

unread,
Aug 26, 2007, 3:27:51 PM8/26/07
to neptune354-dev
As we all know wireless driver of wag354g is closed source. It comes
as a binary file.
An open source driver that is known to work can be found here:
http://acx100.sourceforge.net

The idea is to backport the driver for the 2.4 linux kernel. With some
reverse engineering I have found I can extract the firmware from the
driver.

I think there are many benefits and it deserves the effort.

Marco Vedovati

unread,
Aug 27, 2007, 3:59:49 PM8/27/07
to neptune...@googlegroups.com
hi, i dont see what are the benefits of using the acx100 drivers,
apart the fact that they are open source. I had some experiences with
those drivers and openwrt, they only support open and wep encryption.
The good thing is that they fully support linux wireless extension and
they can be used in client/monitor mode.
I have sources of the apdk drivers used in wag354g, but i'm not able
to compile them...
If you need ask, or maybe i'll post them later....

bye

Jim Halfpenny

unread,
Aug 28, 2007, 2:22:03 AM8/28/07
to neptune...@googlegroups.com
Monitor mode is particularly interesting to me. If you wanted to deploy a WAG354G as something other than an access point e.g. a kismet drone, monitor mode would be essential. If WPA is not supported it's pretty useless for normal use though.

Jim

Marco Vedovati

unread,
Aug 28, 2007, 4:56:36 AM8/28/07
to neptune...@googlegroups.com
I have uploaded the sources of the wireless drivers on google groups:
http://groups.google.it/group/neptune354-dev/web/AP-DK5.7.0.4.tar.gz

About the fact that monitor mode would be useful, in that case I think
the best thing to do is simply to install openwrt on it.

johna...@gmail.com

unread,
Aug 31, 2007, 5:31:45 PM8/31/07
to neptune354-dev
I have downloaded the sources of the apdk drivers. I didn't know about
it. I have succesfully compiled it and loaded it without problem. I
first unload the original driver with wlcfg stop then insmod my
driver. Commands like ifconfig wlan0 up and brctl addif br0 wlan0
work. But when I run wlcfg start I get a seg fault. wlcfg is still
closed.

On Aug 28, 11:56 am, "Marco Vedovati" <marco....@gmail.com> wrote:
> I have uploaded the sources of the wireless drivers on google groups:http://groups.google.it/group/neptune354-dev/web/AP-DK5.7.0.4.tar.gz
>
> About the fact that monitor mode would be useful, in that case I think
> the best thing to do is simply to install openwrt on it.
>

> On 8/28/07, Jim Halfpenny <jim.halfpe...@gmail.com> wrote:
>
> > Monitor mode is particularly interesting to me. If you wanted to deploy a
> > WAG354G as something other than an access point e.g. a kismet drone, monitor
> > mode would be essential. If WPA is not supported it's pretty useless for
> > normal use though.
>
> > Jim
>

> > On 27/08/07, Marco Vedovati <marco....@gmail.com> wrote:
>
> > > hi, i dont see what are the benefits of using the acx100 drivers,
> > > apart the fact that they are open source. I had some experiences with
> > > those drivers and openwrt, they only support open and wep encryption.
> > > The good thing is that they fully support linux wireless extension and
> > > they can be used in client/monitor mode.
> > > I have sources of the apdk drivers used in wag354g, but i'm not able
> > > to compile them...
> > > If you need ask, or maybe i'll post them later....
>
> > > bye
>

cyberstorm

unread,
Sep 1, 2007, 6:28:26 AM9/1/07
to neptune354-dev
yes i know there aren't sources avaiable for wlcfg yet. Maybe we
should look how other ar7 router configure the wireless, since they
use tiap.o too.
I suppose that using wireless tools: http://neptune354-dev.googlegroups.com/web/wireless_tools.26.tar.bz2
you cant do nothing useful, right??

johna...@gmail.com

unread,
Sep 1, 2007, 8:51:10 AM9/1/07
to neptune354-dev
Ok I 'll try them. I have uploaded the wireless driver I compiled
here: http://l1nux.h4ck3r.googlepages.com/tiap.o if anyone wants to
play with it.

johna...@gmail.com

unread,
Sep 3, 2007, 6:44:18 AM9/3/07
to neptune354-dev
Ok something strange happens. I have tested the wireless driver
unstripped and commands like ifconfig wlan0 up work. The driver I
uploaded was stripped and doesn't work!! I reupload the unstripped so
download it again.

Wirelesstools, as expected, don't do something special. The original
driver and mine come from the same codebase. We have to implement the
wireless extensions to the driver to give this functionality. Look
here: AP-DK5.7.0.4/src/os/linux/dda_wext_ioctl.c:123

I take the challenge but firstly I have to know the driver I compile
_really_ works.
Running ifconfig wlan0 up gives:

wlan0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

No hardware address. Trying to set it manually fails like this

~ # ifconfig wlan0 hw ether 00:01:02:03:04:05
SIOCSIFHWADDR: Device or resource busy

wlcfg segfaults with my driver. In my try to reverse engineer wlcfg I
compiled strace (download here http://l1nux.h4ck3r.googlepages.com/strace
) but wlcfg forks much and running strace -f wlcfg start (also trace
forks) freezes the whole process.


Help or ideas needed.

On Sep 1, 3:51 pm, johnath...@gmail.com wrote:
> Ok I 'll try them. I have uploaded the wireless driver I compiled

> here:http://l1nux.h4ck3r.googlepages.com/tiap.oif anyone wants to

johna...@gmail.com

unread,
Sep 3, 2007, 11:52:58 AM9/3/07
to neptune354-dev
The right order is:

wlcfg stop
insmod tiap.o


ifconfig wlan0 hw ether 00:01:02:03:04:05

ifconfig wlan0 up
brctl addif br0 wlan0

But wireless still don't work... Wireless led is off. Still something
missing. Does anyone know what?


On Sep 3, 1:44 pm, johnath...@gmail.com wrote:
> Ok something strange happens. I have tested the wireless driver
> unstripped and commands like ifconfig wlan0 up work. The driver I
> uploaded was stripped and doesn't work!! I reupload the unstripped so
> download it again.
>
> Wirelesstools, as expected, don't do something special. The original
> driver and mine come from the same codebase. We have to implement the
> wireless extensions to the driver to give this functionality. Look
> here: AP-DK5.7.0.4/src/os/linux/dda_wext_ioctl.c:123
>
> I take the challenge but firstly I have to know the driver I compile
> _really_ works.
> Running ifconfig wlan0 up gives:
>
> wlan0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:100
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
>
> No hardware address. Trying to set it manually fails like this
>
> ~ # ifconfig wlan0 hw ether 00:01:02:03:04:05
> SIOCSIFHWADDR: Device or resource busy
>
> wlcfg segfaults with my driver. In my try to reverse engineer wlcfg I

> compiled strace (download herehttp://l1nux.h4ck3r.googlepages.com/strace


> ) but wlcfg forks much and running strace -f wlcfg start (also trace
> forks) freezes the whole process.
>
> Help or ideas needed.
>
> On Sep 1, 3:51 pm, johnath...@gmail.com wrote:
>
> > Ok I 'll try them. I have uploaded the wireless driver I compiled

> > here:http://l1nux.h4ck3r.googlepages.com/tiap.oifanyone wants to

Marco Vedovati

unread,
Sep 3, 2007, 1:34:02 PM9/3/07
to neptune...@googlegroups.com
yes, what you do is ok for the layer 3. It lacks of the configuration
of the network level, eg channel to use, mode (managed or master) and
encryption.... that is, the work that wlcfg does.

Maybe I have found something interesting. Look at the file cfg/cli.c .
It is described as "Demo application console commands". And yes, it
contains a int main(int argc, char **argv) !

Try to compile it and let's see what happens...in the main Makefile
there also reference to other programs, take a look...

good luck

johna...@gmail.com

unread,
Sep 6, 2007, 5:48:07 AM9/6/07
to neptune354-dev
Marco was completely right. Insmoding the driver is not enough.
Initialization is needed. Compiling cfg folder creates 2 tools. Init
and cli. Init initialize the wireless driver and wireless works for
the original driver doing this:

wlcfg stop
./init /usr/sbin/wpa_authenticator /lib/modules/2.4.17_mvl21-malta-
mips_fp_le/kernel/drivers/net/tiap.o wlan0 br0

Now you can run cli to configure and test everything. It rocks!

Unfortunately when I try to use my driver I get a segmentation fault.
I think it has to do with some compilation flags, maybe -fomit-frame-
pointer. I will keep trying to make it work.

For now I have uploaded the tools if somebody wants to experiment:

http://l1nux.h4ck3r.googlepages.com/init
http://l1nux.h4ck3r.googlepages.com/cli

On Sep 3, 8:34 pm, "Marco Vedovati" <marco....@gmail.com> wrote:
> yes, what you do is ok for the layer 3. It lacks of the configuration
> of the network level, eg channel to use, mode (managed or master) and
> encryption.... that is, the work that wlcfg does.
>
> Maybe I have found something interesting. Look at the file cfg/cli.c .
> It is described as "Demo application console commands". And yes, it
> contains a int main(int argc, char **argv) !
>
> Try to compile it and let's see what happens...in the main Makefile
> there also reference to other programs, take a look...
>
> good luck
>

> > > > here:http://l1nux.h4ck3r.googlepages.com/tiap.oifanyonewants to

cyberstorm

unread,
Sep 7, 2007, 11:23:45 AM9/7/07
to neptune354-dev
i see there a lot of parameters to configure in the cli app. However
the only useful I have seen so far is the possibility to use a radius
server...
I hope there is at least a way to set the wireless in client mode.


On 6 Set, 11:48, johnath...@gmail.com wrote:
> Marco was completely right. Insmoding the driver is not enough.
> Initialization is needed. Compiling cfg folder creates 2 tools. Init
> and cli. Init initialize the wireless driver and wireless works for
> the original driver doing this:
>
> wlcfg stop
> ./init /usr/sbin/wpa_authenticator /lib/modules/2.4.17_mvl21-malta-
> mips_fp_le/kernel/drivers/net/tiap.o wlan0 br0
>
> Now you can run cli to configure and test everything. It rocks!
>
> Unfortunately when I try to use my driver I get a segmentation fault.
> I think it has to do with some compilation flags, maybe -fomit-frame-
> pointer. I will keep trying to make it work.
>
> For now I have uploaded the tools if somebody wants to experiment:
>

> http://l1nux.h4ck3r.googlepages.com/inithttp://l1nux.h4ck3r.googlepages.com/cli

johna...@gmail.com

unread,
Sep 16, 2007, 4:58:50 AM9/16/07
to neptune354-dev
I finally compiled a driver that works. The problem was, for my bad
luck, the firmware image in the source was corrupted and it took me
ages to find that. Using the strip tool to the driver removes the
firmware as unneeded. I use some safe parameters ( mips_fp_le-strip -X
-x --strip-debug tiap.o ) to make it 250k smaller and keep it work. I
will optimize it even more. Now that we have a codebase that works we
can add features like client mode and everything else. You can
download the driver here: http://l1nux.h4ck3r.googlepages.com/tiap.o
and use it with the wlcfg utility.

Have fun,
John

On Sep 7, 6:23 pm, cyberstorm <marco....@gmail.com> wrote:
> i see there a lot of parameters to configure in the cli app. However
> the only useful I have seen so far is the possibility to use a radius
> server...
> I hope there is at least a way to set the wireless in client mode.
>
> On 6 Set, 11:48, johnath...@gmail.com wrote:
>
> > Marco was completely right. Insmoding the driver is not enough.
> > Initialization is needed. Compiling cfg folder creates 2 tools. Init
> > and cli. Init initialize the wireless driver and wireless works for
> > the original driver doing this:
>
> > wlcfg stop
> > ./init /usr/sbin/wpa_authenticator /lib/modules/2.4.17_mvl21-malta-
> > mips_fp_le/kernel/drivers/net/tiap.o wlan0 br0
>
> > Now you can run cli to configure and test everything. It rocks!
>
> > Unfortunately when I try to use my driver I get a segmentation fault.
> > I think it has to do with some compilation flags, maybe -fomit-frame-
> > pointer. I will keep trying to make it work.
>
> > For now I have uploaded the tools if somebody wants to experiment:
>

> >http://l1nux.h4ck3r.googlepages.com/inithttp://l1nux.h4ck3r.googlepag...

Marco Vedovati

unread,
Sep 19, 2007, 3:18:38 AM9/19/07
to neptune...@googlegroups.com
Great work johnathana!
If you have done some changes in the source code, please make it
available so that others can go through for changes.

best regards,
marco

johna...@gmail.com

unread,
Sep 19, 2007, 6:05:15 PM9/19/07
to neptune354-dev
Yes I completely forgot :-) You can find a clean source code here:
http://l1nux.h4ck3r.googlepages.com/tiap_src.tar.bz2 .

To compile successfully you have to edit make/Config.make. Change the
variables KERNEL_DIR_PRE, UCLIBCDIR and GCCINCLUDEDIR to what fits
for you.

Have fun,
John

On Sep 19, 10:18 am, "Marco Vedovati" <marco....@gmail.com> wrote:
> Great work johnathana!
> If you have done some changes in the source code, please make it
> available so that others can go through for changes.
>
> best regards,
> marco
>

Reply all
Reply to author
Forward
0 new messages