Wednesday, May 2, 2012

running micromax 352g modem on ubuntu 12.04


This blog covers how to run the micromax 352g usb modem on ubuntu 12.04. The basic problem that arise is the device is detected as an usb device not as a modem.
So for that you have to configure it using usb_modeswitch which is installed by default or if you have an external internet connection via dsl then install the following packages....

usb_modeswitch::: sudo apt-get install usb-modeswitch
wvdial::: sudo apt-get install wvdial

if you are using ubuntu 12.04 download wvdial from the link below

download wvdial.deb

next fire up terminal and enter ...
$ watch lsusb
it will show something like this ...
Bus 002 Device 007: ID 1c9e:9605

which is your device, where 1c9e is the vendor id and 9605 is the device id...
make changes to usb_modeswitch configuration file...
$ sudo gedit /lib/udev/rules.d/40-usb_modeswitch.rules
nter some text below the line that said
LABEL="modeswitch_rules_begin"
It looks something like this :-
LABEL="modeswitch_rules_begin" 
 
#Micromax MMX352G USB 3G MODEM
ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9605", RUN+="usb_modeswitch '%b/%k'"
 
save and then exit the editor.
 
next create a new file using ..
$ sudo gedit /etc/usb_modeswitch.d/1c9e\:9605
 
and add the following lines....


######################################################### Micromax MMX 352G USB 3G Modem
DefaultVendor= 0x1c9e
DefaultProduct=0x9605
TargetVendor= 0x1c9e
TargetProduct= 0x9605
CheckSuccess=20
MessageContent="55534243123456780000000000000606f50402527000000000000000000000"
 
finally we have to work out with usbserial module (that is what drivers are referred to in UNIX)

$ sudo gedit /etc/modules
 
Add the below mentioned line at the end of the file.
#MICROMAX 352G 3G USB MODEM
usbserial vendor=0x1c9e product=0x9605
 
note ::: remove lp if there in last line...

reboot and voila the connect through mobile broadband option shows up in the network connections icon... select ur country, network and enjoy....

Saturday, March 3, 2012

getting tomcat 6 to work on ubuntu 10.04

Finally after an hour of experiment got the tomcat to run successfully ... hoping will help u too ... 

Apache Tomcat is a free and open source software implementation for JavaServlets, providing support for Java Server Pages (JSP). Many popular web-based applications use servlets. You may choose to run Tomcat with either Sun’s Java implementation or the OpenJDK implementation of Java.
Because Tomcat version 6 was included in Ubuntu 10.04, installing a working Tomcat server is reasonably straightforward. However, before we can start installing Tomcat itself, we must first install Java.

First Install Sun Java in ubuntu 10.04

Install tomcat 6 in ubuntu


sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples
 
Start tomcat server


sudo /etc/init.d/tomcat6 start
 
Stop tomcat server

sudo /etc/init.d/tomcat6 stop
 
Restart tomcat server

sudo /etc/init.d/tomcat6 restart
 
Get tomcat server status


sudo /etc/init.d/tomcat6 status
 
After installation type http://localhost:8080 or http://serverip:8080/examples/servlets/ in your browser.Now you should see tomcat welcome page

* To enable admin web based features add the following lines to your /etc/tomcat6/tomcat-user.xml


<role rolename="manager"/>
<role rolename="admin"/>
<user name="admin" password="secret_password" roles="manager,admin"/>
 
* you should be able to see your manage page here http://your_ip_goes_here:8080/manager/html

* log in with the name and password you just set in /etc/tomcat6/tomcat-users.xml

* ls /var/lib/tomcat6 directory.

* you should see these directories conf, logs, webapps, work

* webapps is where your servlets will go ( or at least a xml file that points to them )

* as a test download this war file http://simple.souther.us/SimpleServlet.war

* then use the tomcat management page and select war file to deploy ( in the deploy section) to upload this file to your server

* optionally just wget http://simple.souther.us/SimpleServlet.war directly to the webapps folder

* tomcat should recognize the war file and expand it with everything you need

* browse to http://serverip:8080/SimpleServlet/

Change tomcat server to run on port 80
If you want to Change tomcat server to run on port 80 follow this procedure
You need to edit the /etc/tomcat6/server.xml file

nano /etc/tomcat6/server.xml
 
Now replace the part that says Connector port=”8080? with Connector port=”80?

Save and exit the file
Restart tomcat server with the following command

sudo /etc/init.d/tomcat6 restart