Archive

Archive for the ‘Networking’ Category

Sony UWA-BR100

October 27th, 2012 2 comments
    Today, I purchased the WiFi adapter for Sony 32EX650 LED TV, which is exclusively built for the Sony HD LED TV with USB connectivity.  When I tried plugging that in my Windows 7 x64 PC, the device was not recognized as there was no Windows driver, but the device showed up as CEWL-1.  While discussing about that with my wife, I had to take the brickbats for wasting the money, while we already have wifi access from the available devices.  Now, I had to prove that my investment is worth, but I have no clue how to. 

    Started my search for unofficial drivers for the device in Linux and Windows, following that gracefully landed at http://wikidevi.com/wiki/Sony_UWA-BR100, which said that the device is indeed Atheros chipset based and detectable in Linux as ath9k_htc and moreover they had also provided a free download link for getting the all-windows driver.

    Now, I have installed the windows driver and the wifi device works like a breeze.  I have been testing it against B/G wifi network, so the speed I am seeing is 54Mbps.  I will try this again with A/N/B/G to check whether it goes to higher speeds as claimed in the website.  Interestingly, Windows 8 would support these devices out of the box as per this Sony support page.

Update: I have tested the device against a A/N/B/G router in the 5Ghz spectrum and found that the device is connected at 300Mbps speed 🙂  And, indeed it is using the ath9k_htc driver supplied via compat-wireless package.

BSNL Broadband Connectivity Issue on Noise phone lines

April 10th, 2010 No comments

If you are an exclusive BSNL broadband user, you might not have attached the telephone to the phone line.  I have connected my Netgear modem to the DSL/Phone line splitter and left the other connection floating.  Lately, when I noticed that the Netgear modem was not able to make the connection with BSNL servers, originally I thought the telephone line is dead.  To my surprise the telephone line was fine, but I perceived the lines to be little noisy.  I made a complaint to the BSNL portal and as usual nothing much happened.  Accidently, I had to connect my telephone to the splitter for making a local call.  To surprise, the Netgear modem managed to connect to the server this time.  So, the hypothesis is;

When the telephone line is noisy, attach the telephone to the splitter along with the modem connection to get connected to the BSNL Servers.  Most likely it could be because of the Reactive load offered by the telephone on the phone line ends up conditioning the Phase modulated signals for the Netgear modem to connect to the Servers.

Powered by ScribeFire.

BSNL Broadband Unlimited usage

April 4th, 2010 No comments

Are you a BSNL Broadband user enjoying the 2AM-8AM unlimited access ?  Are you a person who has automated downloads programmed between 2AM – 8AM IST ? Are you seeing higher bill amount despite your carefully planning internet downloads during the unlimited access times ?  You should read this article for sure.

Do you know, you could track your internet usage on daily basis ? If not, register yourself at http://www.data.bsnl.in/. If you send the webmaster an email requesting for user account, you promptly get response within a couple of days with the required credentials.  You could login to the website to check your usage on a daily basis.  Infact, you can see your usage data for the past months also.  It is really very useful.  Alternately you could register your mobile number with BSNL and activate the notification service.   Upon activation, BSNL would send you SMS if your usage crosses the set-limit for your account.  See the following excerpts from BSNL website about this service.

If you are an user of BSNL Broadband and are not on any one of the unlimited plans, then you must keeping tabs on the data usage you have done. But what if you are on the move and not able to access the internet to check the data usage?

Simple, Send an SMS.

Yes, BSNL has now introduced a new feature where in you can now know your broadband usage via SMS.

How to Register for this New Feature?

Just SMS “REG Landline Number” prefixed with your STD code (For Example REG 080 23456789) to the following numbers:

52295: For Bsnl Mobile Customers.

9448077777: For Any Other Mobile Customers other than BSNL.

After Registering your landline number, you will receive a Thank you message and from then onwards, you can check the broadband usage of your account anytime by just sending an SMS.

How to Check the Broadband Usage of My Account?

Just SMS “BBU Landline Number” prefixed with the STD Code (EG BBU 080 23456789) to the following numbers:

52295: For Bsnl Mobile Customers.

9448077777: For Any Other Mobile Customers other than BSNL.

Note: This service is completely free, and you will be charged only for the SMS, based on your operator’s sms charges.

Coming back to the billing issue.  Lately, I noticed that I get very high BSNL broadband usage bills.  I wanted to keep a tab on that and sent a couple of complaint mails to BSNL billing.  But I did not get any response from them.  Following that I registered on the Broadband Usage statistics website mentioned before and was surprised to see that I had indeed used beyond my 2.5Gb limit (I have subscribed to 500C+ plan). 

When I looked the data usage pattern, I could figure out something very interesting about the way BSNL charges.  Consider that I have my automated download scheduled to start at 2:05 AM and stop at 7:55 AM.  I generally keep my machine in Sleep mode and have enabled the Scheduler application to wake up the machine for downloads.  Sometime, I keep the machine on over night.  I figured out that whenever I kept my machine on, I was charged for the usage even for the free-usage timespan.

Consider the case of a machine running over night.  When the machine is running the router to BSNL connection stays in “connected” state.  If the machine was in sleep mode, the connection is “offline” and whenever the machine wakes up, the connection is reestablished.  BSNL has setup the usage measurement exclusion only for the connections started after 2AM. Meaning if a computer was running over night and the connection status is “connected”, one may not get the free usage time-span.  Because the current connection is active and it was started before 2AM and hence the current connection is billable, as per the BSNL usage algorithm. 

The thumbrule here is: “Unlimited usage only for connections start at or after 2AM”.But interestingly, the 8AM connection is correctly handled by BSNL.  If you connection stretches beyond 8AM, the usage is billable for all the bytes transferred from 8AM onwards.

The following are the action points:

  1. Avoid running the computer over night with the connection is “connected state”. Because if the connection stretches beyond 2AM, you would not get the benefit of unlimited usage.
  2. Prefer to put the machine on sleep mode and make the scheduler wake up the machine for running your download tasks.
  3. Make the time of your computer synchronized with a standard time server like in.ntp.pool.org or time.windows.com
  4. Plan to start the download at 2:05 AM and stop at 7:55 AM
  5. Register on http://www.data.bsnl.in and keep a tab on your usage
  6. Register for SMS notification service

Powered by ScribeFire.

Restrict MSN file transfer

November 27th, 2009 No comments

MSN uses port 1863 to transmit messages and for file transfer.

Lot of people have said that the file-transfer using MSN happens via port range 6891-6900.  But when I experimented, I found that MSN is using same 1863 port.  Linux machines are able to identify this port as “msnp”.  I used “tcpdump” to verify this.  Whenever MSN attempts to send a file across the Internet, I creates several smaller packets (typically in the range of 536-1350 bytes) and sends them one after the other.  During the file transfer process, if there are messages (text or IM) to be transmitted, the message data block is piggy-backed on the file-transfer packets and sent across.

I was desperately looking for filtering the MSN based file-transfer for some official purposes and wrote some iptables rules based on the Internet literature that said file transfers happen via 6891-6900 by TCP.  Then, to validate the rules, I used tcpdump again on the gateway machine to monitor the packets that are originated from my machine. 
tcpdump src host dev02 -i eth1 -vvv
To my surprise, the file transfer was still happening also the ports are blocked.  Then I made an “iptables” rule to drop all the packets other than 1863 and repeated the experiment.  Still the file-transfer was happening.  I could see using tcpdump that the packet transfer is happening via port 1863.
tcpdump src host dev02 and dst port 1863 -i eth1 -vvv
So, it became apparant that the file-transfer and the text messaging are all happening via port 1863 instead of the port range 6891-6900.  I then decided to write an iptables rule to filter the packets using the packet size constraint.  A rule was written to drop packets that are more then 600 bytes assuming that the IM packets shall never reach the limit.

iptables -A FORWARD -i eth1 -m length -p tcp –length 600:65535 –dport 1863 -j DROP
iptables -A FORWARD -i eth1 -p tcp –dport 1863 -j ACCEPT
iptables -A FORWARD -i eth1 -p tcp -j DROP

I did see that the packet size is around 1350 bytes when files are transferred and that’s why I chose 600 bytes as the limit.  When I monitoring using the “tcpdump” command as before, I was surprise to see that the protocol adjusted the packet size automatically to 560 bytes to continue the transmission.  It tried with 1350 bytes for 3 times and as the acknowledgments were not received, it’s flow control mechanism reduced the packet size to 560 bytes and finished the transfer.  So, I had to redo the iptables rule:-

iptables -A FORWARD -i eth1 -m length -p tcp –length 600 512:65535 –dport 1863 -j DROP

It worked like charm.

The happiness did not last long.  When people logout and tried logging in, they were not able to login at all.  When I investigated the cause of this problem, I could see that the packets that are exchanged during the login process is more than 512 bytes (typically 1350 bytes).  So, I had to relax the rule for a brief time to let people login to MSN messenger service.  I enabled the file-transfer restriction after everybody logged in by enabling the iptables rule.
NOTE: iptables based filtering shall work only for packets that travel across the network.  If the MSN file-transfer happens inside the LAN, MSN cleverly does the file-transfer using P2P where the gateway is not involved at all.

Although, this is not a very good solution, it is definitely worth knowing about!
Happy firewalling!.

Netgear Router & BSNL Broadband

November 8th, 2009 No comments

During Raining Days, BSNL broadband line gets little noisy. I used to connect only my router and never my land line phone in the phone line as I use the BSNL telephone line only for Internet access. Lately, I noticed that the Netgear router having difficulty in establishing connection with the BSNL server whenever it was raining or the phone line is noisy. The “i” indicator keeps blinking in ORANGE color and never stabilizes into a GREEN color indication. Having the “i” indicator blink made sure that the link exists. When I wanted to check the condition of the link (telephone line connection), I connected the BSNL telephone to the splitter port which splits the telephone line to the router and the telephone. When I lifted the cradle, I could notice that the telephone line is little noisy. When I was wondering when and how to make the complaint to BSNL, surprisingly the Netgear router made a stable connection with BSNL gateway. I have used this hack several times, whenever the router (modem) had difficulty in establishing connection.

One theory behind this could be the “loading” effect of the telephone on the telephone line which is subsiding the noise ripples coming over the telephone line.

Mr Jayachandran, JE/Avadi BSNL Exchange

July 17th, 2008 No comments

I solemnly agree that there are few passionate people in public service departments. I reside at Thirumullaivoyil which comes under the control of Avadi Township. I had recently applied for BSNL broadband connection, which took little more than a month to really materialize. The broadband department of Avadi Exchange was quick, but the Linemen and the Broadband servicemen were poor. The guy who had come for installation knew nothing about broadband connection. But he was boasting that he is the incharge of all broadband activities. Poor we!

Though, it had taken little extra time, it was really worth waiting for. The speed of BSNL broadband is awesome. While checking the download speed, the ticker showed more than 1.6Mbps. Hmm, all these excitements shattered on day 3. The telephone line went dead. I had made complaints through all possible channels viz. BSNL portal, via 198 AVR, and also
through the customer care centre of Avadi Exchange. It is more than a week now, and there is no improvement to this.

But like a ray of hope, I got hold of the BSNL JE’s office number. The JE is Mr. Jayachandran. This man is very different from another government employees. I was told that the JE would respond to customer problems ASAP. I had to try several times to get the number connected. At around 11 AM, I got lucky to get the JE on phone. To my surprise, this man is really different. He heard my problem patiently and instantly gave orders to the field people (I was able to hear him calling the Linemen by name to fix the problem immediately). It was like breeze to see a public service person in action. I thanked him several times to have responded very fast.

But, when I came back home, to my surprise the phone line is still dead. Most likely it should be the mistake of the Lineman again. Even though the service call is not completed, I am not getting frustrated. It is just because the way Mr. Jayachandran acted so responsibly.

Mr. Jayachandran, JE BSNL Avadi Exchange, may be contacted at 044-20029423. He comes to office only at 10.00AM Monday-Saturday.

Update 27.01.2009
1. JE’s number has changed to 044-26383456
2. Thirumullaivoyil::CholambeduMainRoad Line man’s number is 044-20006064

DG834G and BSNL Broadband

July 17th, 2008 1 comment

I have a super-fast (by today’s standards) broadband connection provided by BSNL. But BSNL had provided me a wired ADSL router, which has only one RJ45 Ethernet port. I have two desktops and one laptop with me which needs to be connected to the Internet through the broadband connection. BSNL also provides a wireless type 2 ADSL modem, but the general review about that is not so appreciable. Lately, I was told about Netgear DG834G which could be used for my rescue.

I bought Netgear DG834G from Ritchie street, Chennai for Rs 2900. This is a type 2 modem that comes with IEEE 802.11b/g hardware that can support upto 54Mbps data transfer speed and four 10/100Mbps Ethernet ports. The configuration of the modem is pretty straight forward. I had chosen the manual ADSL configuration method in setting up. I had all the details borrowed from the UTStarCom modem given by BSNL. A quick summary of the modem setting is as follows:

ADSL Setting

VPI: 0

VCI: 35

Multiplexing Mode: LLC BASED

DSL Mode: ADSL 2+

Basic Settings

Does your Internet connection require a login? YES

Encapsulation: PPPoE

Login:

Password:

Service Name: dataone

Idle timeout: 5

Internet IP Address: Get Dynamically from ISP

Domain Name Server: Get Automatically from ISP

Network Address Translation: Enable

There was a catch here. I did not know the BSNL password. From the ADSL modem, I could get only the username. So I tried using “password revealer” to get the password configured in the BSNL modem (I got the modem pre-configured while BSNL installed it in my home). None of the
password revealers work on XP and Vista.

Linux Fedora came for the rescue. Fedora comes with Ethernet promiscuous mode intercepting
tools like “tcpdump”, “iptraf” etc. I decided to intercept the ADSL modem configuration page for capturing the password which “could” be sent as plain text in the URL. TCPDUMP becomes an ideal tool for this requirement. I summoned “tcpdump” to capture all the packets destined to 192.168.0.1 (ADSL router IP). The command is the following:

tcpdump -A dst host 192.168.0.1 -s 5000 > dump.file

I had asked the command to redirect the outputs to “dump.file”, so that I can check the content offline. Once the command started, I opened the ADSL page in my browser (on a machine connected to ADSL via ethernet; also to remind, “tcpdump” runs on this machine!). While browsing
through the authentication page and the following pages, “tcpdump” started capturing all the html text transferred between my machine and the ADSL router.

Bingo, the URLs are dumped in the file. To my surprise, the password assigned for my BSNL account was “password”. Later, I figured out that “password” is the default password assigned
to all pre-configured ADSNL modems. Anyways, even if the password is different, my technique would have fetched the password for me.

This technique will not work for sites like yahoo, etc. Because they don’t send the password as plain text, rather they send the MD5 hash equivalent of the password. This technique will not work for any site that is running on HTTPS, as everything sent across or received is encrypted using 128bit SSL encryption.

Netgear DG834G promises reasonable signal strength for 35M (~100feet). It works even if I keep
the router is one corner of the house and try to access it from any other place out of which some areas are reachable only after multiple left and right turns.

DG834G is awesome. I recommend this router for domestic BSNL broadband use.

Configuring Wireless LAN of Dell XPS 1530 in Fedora 8

July 17th, 2008 No comments

Dell XPS 1530 comes with an Intel Pro Wireless 3945ABG Hardware.

In fedora 8, by default the device is detected and an appropriate driver (iwl3945) is loaded as well. If the wireless network is not secured, the interface works without any modification.

I had configured by ADSL router to have WPA-PSK encryption based security. To make my laptop work with this secured network, the default network configuration dialog does not suffice. But still, we need to setup something in that dialog as well.

  1. Open system-config-network dialog, choose to edit the wlan0 interface.
  2. Select the “Wireless Settings” tab.
  3. Set Mode as “Managed”
  4. Set Network name (SSID) as “XYZ”, where “XYZ” is the SSID you had
    configured in the router. You may also leave it in “Auto” as well.
  5. Leave the other inputs as it is.

From the command line, run “iwconfig” to see the status of your interface. You may see something like the following:

wlan0 IEEE 802.11g ESSID:”NETGEAR”
Mode:Managed Frequency:2.462 GHz Access Point: Not-Associated
Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Encryption key:off
Link Quality=0 Signal level=0 Noise level=0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Note, I have configured my SSID to be “NETGEAR”.

Since we have not enabled the security “thing”, we are not able to reach the Wireless Access Point. To enable that we need to have the “wpa_supplicant” tool. Using wpa_supplicant, we can bridge the connectivity and security.

First create the wpa configuration file using “wpa_passphrase” command.

wpa_passphrase
Ex: wpa_passphrase NETGEAR alphabeta

This command would generate a file like the following:

network={
ssid=”NETGEAR”
#psk=”alphabeta”
psk=d0392dff9de884a7163058cebb41592bf7872decda1c8b79b072359bc5e93cac
}
 

Dump this output to /etc/wpa.conf

Now, you have to run wpa_supplicant as:

bash# /usr/sbin/wpa_supplicant -Dwext -iwlan0 -c/etc/wpa.conf &  

Note,
I have used the “wireless generic extension (wext)” for the driver configuration. You may get some log message like the following:

Trying to associate with 00:1b:2f:a3:54:f8 (SSID=’NETGEAR’ freq=2462 MHz)
Associated with 00:1b:2f:a3:54:f8
WPA: Key negotiation completed with 00:1b:2f:a3:54:f8 [PTK=TKIP GTK=TKIP]
CTRL-EVENT-CONNECTED – Connection to 00:1b:2f:a3:54:f8 completed (auth) [id=0 id_str=]

At this point you are probably connected to the Wireless Access Point. Try running “iwconfig” command. The correct output should be like:

wlan0 IEEE 802.11g ESSID:”NETGEAR”
Mode:Managed Frequency:2.462 GHz Access Point: 00:1B:2F:A3:54:F8
Bit Rate=54 Mb/s Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Encryption key:5A83-9BBE-BA9F-5C2B-46D1-0FEC-CE66-475F-A44A-DD05-4B16-63F3-3474-0C46-464A-6CF0 [3]
Link Quality=97/100 Signal level=-29 dBm Noise level=-64 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
 

try running “/sbin/ifconfig” to see whether you have the device up with an IP address. If IP address is not assigned, run

/sbin/service network restart
or
/sbin/dhclient wlan0
or
/sbin/ifup wlan0

You may probably see a “wmaster0” interface as well, which may be ignored.

Most likely you are done by now.
Happy wireless networking.