Wednesday, June 20, 2007

NextG on Linux

This is how I managed to connect to the Telstra HSDPA, (NextG) network on my Ubuntu Fiesty installation with a pcmcia Turbo Card, (ZTE MF332 3G). However I think it should work on any distro with the right packages installed.

  • You need to create a nextg-chat file. Just make sure you put your pin in. HereÅ› what mine looks like.

##################################­ #########
# Suggested chat script called by PPPD
# Modified 20/6/07 by Tim Vonderwall
# File: /etc/ppp/nextg-chat
##################################­ #########
ABORT BUSY
ABORT 'NO CARRIER'
ABORT ERROR
REPORT CONNECT
TIMEOUT 10
"" "AT+CPIN?"
"+CPIN: SIM PIN" "AT+CPIN=****"
OK "AT&F"
OK "ATE1"
OK "AT+CGDCONT=1,\042IP\042,\042telst­ ra.pcpack\042"
SAY "Calling Telstra NextG\n"
TIMEOUT 60
OK "ATD*99#"
CONNECT \c
##################################­ #########
##################################­ #########

  • Here is a copy of my /etc/ppp/peers/nextg file
#Set this to the device allocated to the GlobeTrotter
/dev/ttyUSB0
#Baudrate
460800
#Idle time for closing connection
idle 7200
#Lock the device for this PPPD process use only
lock
#Use normal handshaking
crtscts
#Assume it is a modem device and force modem control methods
modem
#Any user can start the connection
noauth
#Make the ppp link the default root
defaultroute
#Username and Password for computer/GlobeTrotter ppp link
#Normally ignored. Change if GSM Operator requires it
user Anyname
password Anypassword
#Change the path to chat if required for your version of Linux
connect "/usr/sbin/chat -V -f /etc/ppp/nextg-chat"
#Accept IP address provided by network
noipdefault
#Get DNS addresses from operator
usepeerdns
#Don't use VJ compression for ppp link
novj
# make the connection permanent
persist
# add debugging
debug
  • Now I insert the card and discover the vendor and product ID. Using the lsusb command. Here is my output.
Bus 006 Device 118: ID 19d2:0001
Bus 006 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 005 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
Bus 005 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
  • Next I load the usbserial module using the following command, entering the ID from the lsusb output.
modprobe usbserial vendor=0x19d2 product=0x0001
  • You should now be able to see the ports /dev/TTYusb0 etc
  • Now create a soft link using the following command
ln -s /dev/ttyUSB0 /dev/modem
  • Now make the connection using this command
pppd call nextg
  • I use kppp and I had to muck around with the settings a bit. I needed to alter a few things like entering a static default gateway 10.64.64.73 , the phone number *99# and specifying authentication as PAP.
  • Next I plan on automating all these processes. If you wish to try for yourself, below are all the links where I got the information to get this to work for me.
  • http://www.maxon.com.au/3gblog/2007/01/08/next-g-on-linux/
  • http://quozl.linux.org.au/bp3-usb/
  • http://forums.whirlpool.net.au/forum-replies-archive.cfm/645115.html
  • http://www.maxon.com.au/3gblog/2007/01/12/next-g-on-linux-part-2/

Monday, June 4, 2007

VMWare ESX backups using vmbk.pl

Download vmbk.pl from here. http://www.vmts.net/vmbk.htm

Using scp copy it to your esx box.
#scp vmbk.tar.gz root@esx3:vmbk.tar.gz

ssh (or putty) into your esx machine. Move the file to a temp directory or wherever you like.
#cp vmbk.tak.gz /tmp

Move to the directory where you placed the file. Extract the archive.
#tar zxf vmbk.tar.gz

Change to the directory where the archive was unpacked
#cd vmbk

Run the installer
#./install.pl

Create a mount point
#mkdir /mnt/backup

Mount a windows share to your newly created mount point.
#mount -t smbfs //10.3.2.5/reporting$ /mnt/backup -o username="********"/"domain",password="********"

Create a backup of the desired VM.
#vmbk.pl -c -d /mnt/backup -x /home/vmware/intranet/intranet.vmx

Or to backup all VMs with auto specified in the vmx config file
#vmbk.pl -c -d -a /mnt/backup