SO!

NEC ATerm WARPSTAR E client for Linux.

A quick hack to get the NEC ATerm WARPSTAR E WB45RL working with a computer that cannot run the provided drivers (ie: a linux computer).

I was most frustrated with this silly product because all the manuals are in Japanese, which I can't read, and all the drivers are for windows, which I can't stand. Fortuately, the orinoco_cs wireless module seems to work for the wireless card (labeled as an NEC Aterm WL11CA). And it was relatively simple to snoop out what the windows driver was doing in order to get internet access.

Download It.

PROGRAMS:

 init.d/aterm_client - an init.d start/stop script for debian.
 aterm_client.c - a socket program that activates the internet.
 aterm_simple - a shell script that does the same.
 aterm_terminal - types the japanese password and logs in to the aterm terminal server.

COMPILE:

gcc -Wall -o aterm_client aterm_client.c

INSTALL:

My system is a debian woody. I do the following:

#  cp ./init.d/aterm_client /etc/init.d/aterm_client
#  cp aterm_client /usr/local/sbin/aterm_client
In my /etc/network/interfaces I have the following entry:
iface eth1 inet dhcp
  wireless_essid WARPSTAR-1B0F66
  wireless_mode Managed
  up /etc/init.d/aterm_client start
  down /etc/init.d/aterm_client stop
This will make the client start and stop with the card service, as well as configure the wireless card with the correct ESSID.

RUNNING:

I was playing with the GNU getopt call and decided to support a bunch of options, none are really neccessary tho.

  -s 
    Sets the server's ip address to something other than the default:
    192.168.0.1

  -p 
    Sets the server port to something other than the default: 75

  -t 
    Sets the timeout to something other than 2 seconds.

  -r 
    Sets the number of retries to something other than the default: 0
    (aka: infinity)

  -f 
    Sets the pidfile to something other than the default:
    /var/run/aterm_client.pid

  -d
    Turns on debugging output, shows what the TA has to say.

NOTES:

This is not very reliable. I often have to restart (/etc/init.d/aterm_client restart) several times before pings start making it thru. But at least it works.

The windows client also logs into a telnet server on the router to get configuration information. Due to the fact that the login part of these sessions are in Japanese I have not been able to snoop the username and password. Fortuately, you do not need to login in order to use the network. Unfortuately, if you need to configure the base station you will probably need to be able to login. Sadly, since I cannot read Japanese I cannot configure the windows client, but all of the config text I snooped was in english, so i know that if I could login I could probably config it without every using windows. Yeay!

UPDATE: when some silly theif walked off with the laptop I was using I replaced it with an old powerbook G3 that was available. Since the wireless card does not work in Mac I could not figure out the correct settings for the ESSID from some registry setting like I had with the windows aterm software. So I had to sniff out the password, and figure out the config from the telnet server. The script aterm_terminal is a simple script that will enter the password for you and let you carry out a session. Some of the commands I have figured out are:

 show config - Shows the current configuration of the NAT and DHCP services
 show default - Shows some more configs.
 show status device - gives some info about the available ports.
 show device - Gives an error message, but suggests that something is possible.
 show wan - Gives info about the WAN settings
 show air - Gives info about the wireless config. Shows the ESSID and the WEP stuff.
 show syslog - Gives the syslog function config settings.
 show sys - Shows, among others, the name of the router... donno what it is good for.
 at - goes into some kind of AT mode, but i couldnt make it dial, or do any of the other normal AT commands.
 exit - obvious

I have not found the way to set variables. But should not be too difficult to find.

Internet access: The way this ATerm WARPSTAR appears to work is that the local network (192.168.0.*) is fully functional. But, in order to get name resolution and any routing to the outside world you have to be connected to port 75 on the base station (and give it a couple magic words). These magic words are as follows:

REG_CLIENT:MODE=TA,TIMEOUT=500 

  - this informs the base station of your desire to use it. Setting the
    timeout to something big allows you to use a regular telnet client
    to get internet access. Just cut and paste the other commands and
    then periodically issue a KEEP_ALIVE.

CONNECT_REQ:CHANNEL=01

  - this informs the base station that you want to actually use the
    internet now (why else would you?!). I believe that issuing this
    command starts up the dial-on-demand routines in the base station,
    so it could be a couple seconds before the internet becomes
    available.

DISCONNECT_REQ:CHANNEL=01

  - the polite way to say goodbye.

KEEP_ALIVE

  - Have to send one of these every TIMEOUT atleast.

STATUS_REQ

  - Gets the current status of the dialin.

Killing your telnet session (ctrl-]) will disconnect you.

Also, you might want to enable the ProtocolKeepAlives for your ssh client. Mine dies if I do not enable this (quite annoying).

You may freely use this software, but you may consider your licence to modify it covered by those priviledges outlined in the latest and greatest version of the GNU General Public License, last visible at http://www.gnu.org/licenses/gpl.html

Have a nice day.