How-To Configure Seagate FreeAgent Dockstar as a 3G Gateway

This how-to explains how to configure a Seagate Dockstar running Debian to establish a 3G connection using a USB data card like the Huawei E122 / UMG181 etc and configure it to act as a gateway so that the internet can be shared with the other devices connected to the network.

You need to have a Dockstar running Debian, if not check Jeff's site on how to install Debian on your Seagate Dockstar.

Configuring the USB Modem and PPP Dialler

First install the following packages using apt-get

  1. usb-modeswitch
  2. usb-modeswitch-data
  3. ppp
apt-get install usb-modeswitch usb-modeswitch-data ppp

After that connect your 3G USB modem, and wait for few seconds. After that give the command 'dmesg' and check if you can see something like this

option 1-1.4:1.0: GSM modem (1-port) converter detected usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB0 option 1-1.4:1.1: GSM modem (1-port) converter detected usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB1 option 1-1.4:1.2: GSM modem (1-port) converter detected usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB2 option 1-1.4:1.5: GSM modem (1-port) converter detected usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB3

If you see similar lines saying 'modem attached to ttyUSBx', then the USB modem is detected fine.

Now edit the file '/etc/ppp/peers/provider' and replace its contents with the following

holdoff 10  
lcp-echo-failure 2  
lcp-echo-interval 5  
maxfail 0  
connect "/usr/sbin/chat -v -f /etc/chatscripts/BSNL3G"

After that edit the file '/etc/chatscripts/BSNL3G' and replace its contents with the following

'' 'ATZ'  
'OK-AT-OK' 'ATZ'  
#'OK' 'ATZ'
#'OK' 'ATQ0 V1 E1 S0=0 &C1 &D2'
OK AT\^SYSCFG=14,2,2780380,0,1  
'OK' 'AT+CGDCONT=1,"IP","bsnlnet"'  
'OK' 'ATDT*99#'  

Now if everything works as expected you should be able to connect by giving the command 'pon'. Try pinging to verify if the internet is working. You can disconnect by giving the command 'poff'

To make the dock connect to the internet automatically on start-up, append the following to the '/etc/network/interfaces' file

auto ppp0  
iface ppp0 inet ppp  
provider provider

Reboot the Dockstar to verify if everything is working fine.

Configuring the Dockstar to act as a Gateway

If you do not have iptables installed, install it with the following command

apt-get install iptables

Now edit '/etc/sysctl.conf' and change the line that says 'net.ipv4.ipforward = 0' to 'net.ipv4.ipforward = 1' and also make sure that the line is uncommented.

After that execute the following commands

/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE  
/sbin/iptables -A FORWARD -i ppp0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -A FORWARD -i eth0 -o ppp0 -j ACCEPT

Now we need to get these rules loaded at boot time, for that follow the steps below

iptables-save > /etc/firewall.conf

Edit the file '/etc/network/if-up.d/iptables' and add the following

iptables-restore < /etc/firewall.conf

Next step is to make the file executable

chmod +x /etc/network/if-up.d/iptables reboot

That's it, now your Seagate Dockstar will act as a gateway and you can share your 3G internet connection with the other devices on your network. Make sure you manually set the Gateway IP address to that of the Dockstar in each device.

If there is any problem leave a comment.

Asianet Dataline Auto Login

Asianet had migrated to a new system Mettle Wire few months back and here is how you can set up the Auto Login for night downloads.

For this you need the following

First install Python to a location of your choice ( I used C:\login\Python ) Next extract the login script to C:\login. Open the login script with a text editor like Notepad and update the username and password. Do not use Microsoft Word as it may alter the file.

Now open JIT Scheduler and click the ‘New’ task button on top and enter the details as shown in the images below to login automatically at the specified time. Also repeat the process every 5 minutes in case you are automatically logged out by the system.

adl_1 adl_2 adl_3

You may need to update the command in the first image depending on the location you installed Python and where you extracted the login script.

adl_4 After creating the task, right click on the task and select ‘Task Properties’ and change the option in Window to Minimized in the System menu as shown in picture so that login script is run in the background.

Now you need to create another task to shutdown the system at 8 AM and can be done as shown below.

adl_5 adl_6

If you are facing any problems, leave a comment.

Is your laptop adapter dead?

Recently my HP 6510b laptop’s adapter died, actually the connector had some loose connections so it wasn’t charging properly. I tried many local repair shops to see if there was a replacement connector available, it uses a 7.4 mm x 5.0 mm connector with a central pin, but it wasn’t available anywhere.

A new HP Original Adapter costs 1.8k to 2.5k and I wasn’t willing to spend that much for a simple connector problem. So I was checking eBay and saw this replacement adapter for my laptop for about $10 only. Anyway ordered it and I got it really fast i.e. within 12 days Hong Kong to India by Normal Airmail.

IMG_3343 IMG_3344 IMG_3351 IMG_3354

The adapter looks just like the HP Original one and is working fine. So if your adapter is dead, check eBay for cheap replacement adapters.

I also found a seller who is selling the 7.4 mm x 5.5 mm connector and ordered two including the cable. The two cables alone came to $10 shipped. I received that too few days back, will be installing it shortly on the old adapter. :)

.COM Domain for FREE - 1and1 is conducting a free .com domain promotion. You can get a .com domain absolutely free. There are no promo codes or coupons needed, just visit their site and place the order. There is a limit of 1 domain per customer, also it may take 4-5 days for your domain to be active as they seem to do lot of checks to prevent fraud etc.

I tried it and got the domain few days back. So head over to and order your free domain. :)

GuruPlug Server Plus – Unboxing

Two weeks back I got the GuruPlugs that I ordered in April :) Here are the pics

IMG_3357 IMG_3358 IMG_3359 IMG_3360 IMG_3363 IMG_3365 IMG_3368 IMG_3370 IMG_3371 

Total damages for the two plugs 305 USD + 37 USD (Shipping) = 342 USD ~ 15000 INR and they also charged 15% Duty + Service Charges ~ 2500 INR :( So final cost 8750 INR per plug.

Cheap Replacement Housing for Nokia E51

The side and power button of my E51 had been completely worn out after just 1 year of usage. The quality of the buttons is really bad. Anyway I was looking for replacement buttons and I came across a listing in eBay for the complete housing including keypad, front cover, back plate etc for about $8 ~ Rs 375. Nokia Original one sells for Rs 1500+ I think.

From the pictures, it looked really good so I ordered it immediately. The seller is from Hong Kong and ships it via normal airmail, so it took about 2 weeks to reach me.IMG_1581

Overall the quality was good, the seller even included the necessary screwdriver and tools to open the case.

If you wondering how to open up the case take a look at this guide. Provides detailed info on how to disassemble the case and assemble it again.

There are housings available for almost all phones in eBay for very attractive rates. So do checkout eBay  if you are looking for replacement cases for your phone.