Connect UZIX to Windows NT/2000/XP

Written by Adriano C. R. da Cunha
and Laurens Holst
Last update: 22/08/2002

Introduction

This text describes how you can connect your MSX to the Internet using a serial connection and a Windows NT-based host computer via the PPP protocol. Even if you don't have a connection to the internet, you can still feel the flavor of networking.

I will usually refer to Windows NT/2000/XP as either simply Windows or Windows XP. In the first case, I'm referring to 'NT-based Windows', meaning all three of them, but definately not Windows 9x, and in the latter case I am specifically referring to Windows XP, this because although the specific menu's might be in the same or a similar location in NT and 2000, I am not familiar with those and the steps might not be exactly the same.

What is needed

So, this is what you need:

Optional:

System configuration

1. Setting up the hardware

That's simple. Just insert the RS232 interface in your MSX, and connect your MSX and Windows machine with the Null-Modem cable. Be sure what serial port of your Windows machine you are using. Uzix will silently autodetect the presence of the RS232.

2. Configuring your MSX

If you're connecting your MSX and your Windows NT-machine via the PPP protocol, UZIX doesn't need to know what IP will be assigned to it. Your IP address will be given by Windows, unless you specifically indicate it not to. The same goes for the DNS, which also won't have to be specified. This is mainly where PPP differs from SLIP, as far as UZIX is concerned.

Boot UZIX on your MSX, logon as root and go to the shell prompt.

You should create a '/etc/hosts' file. In this file you define the IP (and an alias) of your MSX if you're using the SLIP protocol - this information is irrelevant if you're using the PPP protocol. But you can also define names, alias and IPs of other hosts (like your Windows computer its IP and alias).

The format of each line in '/etc/hosts' file is:

	x.y.z.w      alias      name

It's recommended to create the '/etc/hosts' file for compatibility purposes. It should have at least one line, with IP 127.0.0.1 and alias 'localhost' (no host name). More lines can be added with other IPs/hostnames. These entries will be checked when you specify a hostname (or alias) in a network application. If the hostname or alias exists in '/etc/hosts', MSX will not need to contact a DNS server to get the host IP.

For example, here is my '/etc/hosts' file:

	127.0.0.1       localhost
	10.0.0.2        linux          linux.alsoft.com

Do a 'cat /etc/hosts' to check the hosts that are configured. To create a new '/etc/hosts' file, just do a 'rm /etc/hosts' and a 'tee /etc/hosts'. Type the lines (they will be repeated after you press RETURN, don't mind) and hit CONTROL+D to save the file.

If you had read the other document, about SLIP configuration, you probably noticed that the only difference between the '/etc/hosts' file for both protocols is the line with IP/alias/hostname of your MSX. The files '/etc/HOSTNAME' and '/etc/resolv.conf' are irrelevant to the PPP daemon.

Now you should create a secrets file. This file stores the passwords used to authenticate the user when connecting to your Windows computer. If you will not use authentication on your Windows computer (as far as I know, this is actually impossible, but maybe one could use the guest account for this), you can skip this step. There are two files were the secrets are stored: '/etc/ppp/pap-secrets' and '/etc/ppp/chap-secrets'. By now, UZIX does not recognize the difference between them. So, create one file and make the other just a link to the first.

The format of each line in the secrets file is:

	user	server	secret	IP

The fields 'server' and 'IP' are ignored by UZIX, so you just need to fill the 'user' and 'secret' fields, leaving the others as '*'. If a certain user doesn't need a password, put a * there aswell (although UZIX its current pppd doesn't support that, it most likely will in the future).

For example, here is my '/etc/ppp/pap-secrets' file:

	# Secrets for authentication using PAP/CHAP
	# client        server  secret                  IP addresses
	msx		*	msx			*
	adrcunha	*	msxrules		*

The pppd program with which you make the actual connection will by default use the username of the current user (e.g. root), and if an entry for that user does not exist in pap-secrets, it will try to login without password. So there's two options, either you use your UZIX login name as the login name for Windows, or you manually tell pppd to use another username by using the 'user ....' option. Personally, I prefer the second method.

To create a new '/etc/ppp/pap-secrets' file, just do 'mkdir /etc/ppp' and 'tee /etc/ppp/pap-secrets'. Type the lines (they will be repeated after you press RETURN, don't mind) and hit CONTROL+D to save the file. Finally, do a 'ln -s /etc/ppp/pap-secrets /etc/ppp/chap-secrets'. For security reasons, also do a 'chmod 0700 /etc/ppp/pap-secrets' and a 'chmod 0700 /etc/ppp' to prevent that other user than root have access to the secrets files.

Now you need to set up a chat-script. The document about creating a dialup connection has more information on that, and for even more detail you can look up the chat man pages (for example at http://unixhelp.ed.ac.uk/CGI/man-cgi?chat). The chat-script is used to 'dial in' on the Windows machine before the PPP connection can be made. Please note that you will need the new version of chat which is included from Uzix build 0.2.2 on...

In an easily-accessible directory (for example /root/ or /bin/), enter "tee chat.winxp" to edit the so-called chat script, and enter the following lines (once again, they repeat after entering them, don't mind that), followed by the key-combination CTRL-D, to finish editing the file:

	"" CLIENT\dCLIENT\c
	CLIENTSERVER ""

Next, it's easiest to use a shell script for the dialing in, I simply use a file called 'c'. So if all has been set up, all you have to do is type 'c' to dial in on your Windows computer and gain access to the network. This time, enter "tee c", and enter the following lines, once again followed by CTRL-D.

	#!/bin/sh
	pppd 19200 user msx connect chat -e -v -t 3 chat.winxp

And afterwards, when you're back on the prompt, type "mode 0755 c" to make the shell script executable.

Please note that the baudrate (the number 19200) and the user login name (msx) actually depend on what your settings in Windows are, but those are the recommended settings if you're using one of the faster RS232 interfaces (Sunrise, ACCNET). However if you might choose different values in step 3, you ofcourse need to adapt the file c.

All done, reboot your MSX (type 'reboot' at the prompt), now it's time to configure your PC.

3. Configuring your Windows XP (/2000/NT) machine

To let Windows XP listen for a PPP connection on its serial port you'll need to enable it's built-in dial-in program + PPP Daemon (the latter also often being called pppd). Although the names might not entirely be correct due to the fact that I have to translate them to English from a Dutch Windows installation, the procedure to do this in Windows XP is as follows:

Go to Configuration Panel / Network Connections. When you're there, select File / New Connection, and then a wizard will pop up. Start out with clicking Next to skip the introduction. Then, choose "Setup an advanced connection", "Accept incoming connections", now select the COM port you want to connect your MSX with, next, choose "Do not allow VPN's". Now you're in the user setup menu, but just leave that as it is, we'll come to that later on. So click Next again, then Next again, and finally click Complete.

If all went ok there will now be a new item in the network connections window, called "Incoming connections". Right-click on it, and choose properties, to make the rest of the settings. There will be three tabs, one being General, one being Users, and the last being Network. In the first tab you can enable and disable the listening on the COM port (which is useful if you want to use another application which uses the COM port, for example HyperTerminal). For now, select the COM port connection, and choose properties. Now in the new window popping up, change the baudrate to the value you want to use (I recommend 19200 bps if you're using a fast Sunrise or ACCNET interface, read the article about RS232 speeds in UZIX for more information about other interfaces), and then click OK again.

Next, the Users tab. Here you can add users which can have access to your computer. Create a new user, with the user name "msx", full name "MSX Connection", and the password "msx" aswell (the current uzix pppd doesn't support empty passwords).

And finally, the Network tab. Keep everything checked as it is, it's probably all ok, but do select the "Internet protocol (TCP/IP)" part, then push the properties button. There, there are several options to configure the access of your MSX. Check the box "Give callers access to the LAN". Next you can do three things: either let your network's DHCP server deal out an IP address to your MSX (if there is a DHCP server in your network that is probably the best choice), or let the PC act as a DHCP and deal out IP-addresses by itself (specify a range from your LAN's addresses, for example 10.0.0.10 - 10.0.0.20), or allow the MSX to decide on its IP address on its own. After that, you're set for the next step!

4. Logging in on Windows NT/2000/XP from MSX

And, uhh, this final step is actually rather simple. If all's well, simply executing the 'c' shell script we created before by typing 'c' after the command prompt should do the trick for you.

Troubleshooting

• The UZIX SLIP or PPP module fails during initialization.
If you're running UZIX 1.0, be sure your MSX RS232 is standard and that it has a ROMBIOS. Standard interfaces with ROMBIOS add many new calls in BASIC: CALL COMINI, CALL COMSTAT, CALL COMTERM, etc. If you're running UZIX 2.0, check startup messages to see if UZIX detects your RS232.

• The UZIX TCP/IP module fails during initialization.
Be sure you configured UZIX for network as described in this document, and be sure your user has access to your Windows machine if you're using authentication. You can check Windows its logs (configuration panel / administrative tools / log entries (event viewer)), the system section, to see if RemoteAccess generated any errors.

• UZIX boots ok, but no communication between MSX and my Windows computer.
Be sure which serial port you're setting in your Windows machine is the same your MSX is connected. To test if your MSX and your Windows machine are communicating, first (temporarily) disable the incoming connection, and then try hooking up your MSX to your PC using regular terminal programs. On MSX, start Erix, in Windows, start HyperTerminal. Make sure both are set to the same speed, and then try typing some text on both computers. If nothing appears on the other side, either your settings don't match (check again), or there is something wrong with your cable and/or serial port(s).

• The 'telnet' command doesn't work with my Windows machine.
Be sure that Windows has this service enabled in Configuration Panel / Administration Tools / Services, and that you've read its user's manual. Please note though that the built-in Windows Telnet Daemon is quite vulnerable to amongst others DoS attacks.

• 'nslookup' can't resolve queries.
Be sure MSX is receiving at least one DNS server IP (check with 'netstat -s'); be sure 'pppd' is sending the DNS server IP(s). If it does not, manually configure them in a '/etc/resolv.conf'-file, as described in the document about SLIP.

Critics, bugs, doubts, comments, corrections, questions

Any comments, help or bug reports will be welcome. Also, if I wrote something wrong, corrections are also welcome. Please, write to adrcunha@yahoo.com.br.

Official UZIX Home Page:
http://uzix.sf.net/