Home

Forums

Statistics

Surveys

Top Ten

Your Account


Login
Nickname

Password

Security Code: Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like a private journal and posting comments or additions to articles.

Who's Online
There are currently, 10 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here

Donations
If you find the information here useful,
help keep this web site online with a donation!
YTD Donations
$1.00
Thank You!

Host referer


  
5: Adding serial ports to your magnia
Posted on Friday, January 23 @ 11:32:19 CST
Topic: 2: Toshiba Magnia hacks

One of the most annoying aspects of the SG20 is the lack of ports for add-ons.

I wanted, very badly, to utilize the machine to run MisterHouse - a perl based home automation program.

All of the required software exists, but there is no serial interface for controlling the X10 modules.

I decided upon a network based serial port.

I have purchased and tested several, the only one I have gotten to work properly - due mostly to lack of linux based drivers - was the COMTROL ROCKETPORT SERIAL HUB.

With this device I now have FOUR external serial ports for my magnia!

The older unit was fairly easy and inexpensive to acquire on eBay - about $50.

I now have MisterHouse running flawlessly on my Magnia!



Preparation:

You will need:
1. Kernel source code installed on your magnia
2. VS1000 driver
3. Comtrol RocketPort serial hub

The VS1000 driver is available here: http://www.anoldman.com/files/vs1000.tar.gz (268kb)

Installing kernel source code:

Find kernel-source-2.4.18-3.i386.rpm somewhere on the internet.  RPM.pbone.net is great for that.

Log onto WebMin (yes, you should install it! (WebMin Installation)

WEBMIN--> System--> Software Packages-->

Browse to the location of your rpm file(s) and install. - this will take a while!

Fix your kernel-source symlink and ID - article here: READ THIS ARTICLE

Installing VS1000 driver:

1. Copy the vs1000.tar.gz file to /usr/src via ftp

2. Log onto the magnia via telnet and untar the file using GNU tar:

192.168.1.1 is the default address.

Red Hat Linux release 7.3 (Valhalla)
Kernel 2.4.18-3custom on an i686

login: telnetuser
Password: ********** (password is whatever your default -appliance admin- password is)
bash-2.05a$ su -
Password: ********** (password is whatever your default -appliance admin- password is)
[root@magnia]# cd /usr/src
[root@magnia src]# tar xzvf vs1000.tar.gz
vs1000/Makefile
vs1000/mod_vs1000.o
vs1000/parse.c
vs1000/parse.o
vs1000/rc.vs1000
vs1000/setup.sh
vs1000/test_version.sh
vs1000/vboot.c
vs1000/version.h
vs1000/vs1000.c
vs1000/vs1000.conf
vs1000/vs1000d
vs1000/vs1000d.c
vs1000/vs1000d.h
vs1000/vs1000d.o
vs1000/vs1000.h
vs1000/vs1000_int.h
vs1000/vs1000.o
vs1000/vslinka.bin


A subdirectory of /usr/src now exists called vs1000. This contains the driver and associated files.

3. Change directories into this directory:

[root@magnia src]# cd vs1000
[root@magnia vs1000]#

4. Compile the driver:

[root@magnia vs1000]# make clean
rm -f *.o vboot vs1000d *~ lput vtst .kver
[root@magnia vs1000]#
make
Kernel sources found at /usr/src/linux-2.4.18-3
Building VS1000 driver for Linux 2.4.18-3

gcc -m486 -g -O2 -D__KERNEL__ -DLINUX -DMODULE -Wall -I/usr/src/linux-2.4.18-3/include -c -o vs1000.o vs1000.c
make[1]: Entering directory `/usr/src/vs1000'
gcc -m486 -g -O2 -D__KERNEL__ -DLINUX -DMODULE -Wall -I/usr/src/linux-2.4.18-3/include -DMODVERSIONS -c -o mod_vs1000.o vs1000.c
make[1]: Leaving directory `/usr/src/vs1000'
gcc -m486 -g -O2 -D__KERNEL__ -DLINUX -DMODULE -Wall -I/usr/src/linux-2.4.18-3/include -c -o vs1000d.o vs1000d.c
gcc -m486 -g -O2 -D__KERNEL__ -DLINUX -DMODULE -Wall -I/usr/src/linux-2.4.18-3/include -c -o parse.o parse.c
gcc -o vs1000d vs1000d.o parse.o
[root@magnia vs1000]#


5. Install the driver :

[root@magnia vs1000]# make install
[root@magnia vs1000]#

6. Edit the /etc/vs1000.conf file to reflect the MAC ethernet addresses and number of ports supported by the device.

The ethernet hardware address (MAC) is on the bottom of the RocketPort Serial Hub.

The MAC address has this format: 00:C0:4E:xx:xx:xx.

The network interface is normally eth0, unless you have multiple ethernet cards, in which case you should set the interface that is servicing the ethernet LAN on which the driver resides. I use brg0 on my magnia.  4 is the number of ports my serial hub has.

#
# /etc/vs1000.conf --- configuration file for vs1000
#

bootfile /etc/vslinka.bin

# Ethernet address interface number of ports

00:C0:4E:12:34:56 brg0 4


of course, you will have to enter your MAC id in the above file.

7. Reboot the system to start and reload the driver. If you do not want to reboot your machine, you may also use the following command to start using the VS1000 driver immediately:

/usr/src/vs1000/rc.vs1000 start

You may also use webmin to start/restart/stop the driver.

Port names use this format: ttyV# - where # is the port number 0,1,2, or 3
The vs1000 driver also supports 8 port rocketports.

Additional documentation for the RocketPort can be found at www.comtrol.com

To use an older rocketport  you will need an 8 pin rj45 crimper and end to replace the serial port end of the device cable you are using with a rj45 end.

For additional information relating to pinouts of the rocketport, please view the documentation at comtrol.com or elswhere.  I googled it and found the hardware manual here:

RocketPort Serial Hub Hardware Documentation

With kernels > 2.4.20 you may have to tweak the makefile a bit. I have also found that you need to stty the port after yuo open it, unless your serial device works with default settings.

Remember: Questions can be posted in the FORUM section !

 
Related Links
· More about 2: Toshiba Magnia hacks
· News by anoldman


Most read story about 2: Toshiba Magnia hacks:
1: Magnia SG20


Article Rating
Average Score: 5
Votes: 1


Please take a second and vote for this article:

Excellent
Very Good
Good
Regular
Bad


Options

 Printer Friendly Printer Friendly

 Send to a Friend Send to a Friend


Please take a second and vote for this article.
Web site powered by PHP-Nuke

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2003 by AnOldMan.com
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.07 Seconds