Friday, December 3, 2010

Setting up Tata Photon+ on Arch Linux or any other linux (ex. Ubuntu)

So,  setting up TATA Photon+ is easy.

Most of the guides out there are for the Huawei Modem. But, at the time I bought TATA Photon+ (ie today), it came with Olive Modem V-ME101 USB Modem.
Setting up that modem is pretty straight forward. I didnt try using networkmanager client nm-applet for installing as I dont use a desktop manager so I didnt have it (For the time being, I am a tiling managers fan, and now I am using dwm form suckless.org). I went the command line way.

$sudo wvdialconf /etc/wvdial.conf
Now, a new file /etc/wvdial.conf will be created. We will have to change the settings a bit.

Contents of wvdial.conf file:


Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Phone = #777
Username = internet
Init1 = ATZ
Password = internet
Modem = /dev/ttyUSB0
Baud = 3250586
Stupid Mode = 1

Now, load usbserial kernel module with proper options:-
sudo modprobe usbserial vendor=0x201e product=0x2009
If you wanna know, how I got those magical figures 0x201e blah blah.. I used lsusb to get the vendor and product id.

Ok. Thats it. Now you can connect to internet using command

$sudo wvdial
You will be asked to enter the password, and if you dont want to enter the password everytime you connect to internet, you can add wvdial to your /etc/sudoers with NOPASSWD option.

A typical sudo wvdial session looks like (Just for reference)


shadyabhi@archlinux-N210 ~ $ sudo wvdial
--> WvDial: Internet dialer version 1.61
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
CONNECT 3100000
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Fri Dec  3 21:27:38 2010
--> Pid of pppd: 17015
--> pppd: I[7f]
--> Using interface ppp0
--> pppd: I[7f]
--> pppd: I[7f]
--> pppd: I[7f]
--> pppd: I[7f]
--> pppd: I[7f]
--> local  IP address 14.96.17.95
--> pppd: I[7f]
--> remote IP address 172.29.244.49
--> pppd: I[7f]
--> primary   DNS address 121.242.190.210
--> pppd: I[7f]
--> secondary DNS address 121.242.190.180
--> pppd: I[7f]

Note: modemmanager can conflict and try to intialize the modem his way, so make sure you kill that before doing all this.

22 comments:

  1. When I did the same as you, my photon+ modem did not run! I'm running ubuntu 10.10 on a Dell vostro. listing usb devices shows it up as a Qualcomm USB MMC storage device. Do you think this is a driver problem?

    ReplyDelete
  2. As you might be knowing that your photon+ USB modem also has the ROM memory which contains the photon+ dialer, the linux detects that "MMC storage.
    To solve that, insert the photon+ modem and the fire-up terminal and run this command. $sudo eject

    Then reload the module with proper options, then everything will go fine.

    ReplyDelete
  3. Hi,
     At this moment Tata Indicom is providing Olive V-ME101 USB Modem. But it is not being recognized by Arch Linux. After inserting the device and executing the modprobe command no device file is being created for the device. So can you please send me steps for configuring Olive V-ME101 USB Modem in Arch Linux at my email address pankaj@glug4muz.org OR ccpplinuxgmail .com. My contact number is 9934222555.

    Awaiting reply ...
    Pankaj Kumar

    ReplyDelete
  4. Hi,
    Sorry for mistake in last message. In fact the modem is Olive V-ME102 USB Modem. It is not 101 but 102.

    ReplyDelete
  5. While issuing the modprobe command, did you change the vendor & product id?

    Also, what all comes in /var/log/messages while you do all this? (From the moment you start the device to the moment you issue the command). Make sure you don't have modemmanager running when you do all this.

    ReplyDelete
  6. Hi,
     Thanks for quick reply. Yes I changed the value of vendor and product id. Today I will send you file /var/log/messages. Please wait for that.

    ReplyDelete
  7. Lines 57136-57139 tells that you successfully got the ip addresses & line 57171 shows that you were connected to the net for 192.1 minutes.

    So, looks like you are connected to the internet. What's the problem, then?

    ReplyDelete
  8. Hi,
     When I inserted the device in the USB port then Internet was connected on the system using Tata Indicom Plug2Surf device. I am already having Tata Indicom Plug2Surf device using which I am connecting to Internet. After inserting this device a new file /dev/ttyACM0 is automatically created using which I am able to connect to Internet. Similarly after inserting the Olive VME102 device a new file with name /dev/ttyUSB0 should be created. But it is not creating. That is why I am saying that Olive VME102 model is not being recognized by Arch Linux. In case of Olive VME101 device it was happening. But how to achieve the same in case of Olive VME102 device so that I can connect to Internet?

    ReplyDelete
  9. Hi, When I inserted the device in the USB port then Internet was connected on the system using Tata Indicom Plug2Surf device. I am already having Tata Indicom Plug2Surf device using which I am connecting to Internet. After inserting this device a new file /dev/ttyACM0 is automatically created using which I am able to connect to Internet. Similarly after inserting the Olive VME102 device a new file with name /dev/ttyUSB0 should be created. But it is not creating. That is why I am saying that Olive VME102 model is not being recognized by Arch Linux. In case of Olive VME101 device it was happening. But how to achieve the same in case of Olive VME102 device so that I can connect to Internet?

    ReplyDelete
  10. In a 4.4MB logfile, it's hard for me to figure out, what is what. I actually requested you for the specific lines & you gave me the whole dump to analyze.

    I can't seem to make out, what lines in the log file are for VME102. To give me the log files, 
    - remove all USBs
    - do a $tail -f /var/log/messages
    - insert VME102, type all the commands necessary
    - Ctrl-C the tail command. 
    - Report that output. 

    ReplyDelete
  11. OK. I will follow your commands and send you the output tomorrow because the VME102 device is at my office and at this moment I am working from home. In between if possible then please have a look at the file http://www.glug4muz.org/photon_plus/VME102/dmesg.txt This file is containing the output of dmesg command just after executing the modprobe command. As per the file http://www.tataphoton.com/download/user-manuals/Olive-VME102-User-Manual.pdf on page 23, the last few lines of the output of the command dmesg should contain the term ttyUSB0. But in my case at http://www.glug4muz.org/photon_plus/VME102/dmesg.txt the name of this file is not appearing. So I think that this file will help you in detecting the problem. In addition to this I will send you the output of the command specified by you tomorrow.

    Best Regards ...
    Pankaj Kumar

    ReplyDelete
  12. OK. I will follow your commands and send you the output tomorrow because the VME102 device is at my office and at this moment I am working from home. In between if possible then please have a look at the file http://www.glug4muz.org/photon_plus/VME102/dmesg.txt This file is containing the output of dmesg command just after executing the modprobe command. As per the file http://www.tataphoton.com/download/user-manuals/Olive-VME102-User-Manual.pdf on page 23, the last few lines of the output of the command dmesg should contain the term ttyUSB0. But in my case at http://www.glug4muz.org/photon_plus/VME102/dmesg.txt the name of this file is not appearing. So I think that this file will help you in detecting the problem. In addition to this I will send you the output of the command specified by you tomorrow.
    Best Regards ...
    Pankaj Kumar

    ReplyDelete
  13. Looks like it's only being detected as Storage device. Did you try using usb_modeswitch?

    ReplyDelete
  14. How to use the command usb_modeswitch? Can you please help me in that regard?

    ReplyDelete
  15. https://wiki.archlinux.org/index.php/USB_3G_Modem should give you a start.
    Also, give networkmanager + modemmanager combo a try. It can work too.

    ReplyDelete
  16. Please send me the syntax of using usb_modeswitch command so that I can test it and then confirm you.

    ReplyDelete
  17. OK. I will try then let you know tomorrow.

    ReplyDelete
  18. Hi,
     On my system usb_modeswitch is installed. I have also tried the sakis3g package. And I have also followed the following steps:

    - remove all USBs
    - do a $tail -f /var/log/messages
    - insert VME102, type all the commands necessary
    - Ctrl-C the tail command. 

    Here is the output of this process:
    ==================================
    [root@archbang ~]# tail -f /var/log/messages.log
    Jan 20 10:45:59 localhost pppd[30081]: CHAP authentication succeeded
    Jan 20 10:45:59 localhost pppd[30081]: CHAP authentication succeeded
    Jan 20 10:45:59 localhost pppd[30081]: local IP address 121.245.80.203
    Jan 20 10:45:59 localhost pppd[30081]: remote IP address 172.29.145.129
    Jan 20 10:45:59 localhost pppd[30081]: primary DNS address 4.2.2.3
    Jan 20 10:45:59 localhost pppd[30081]: secondary DNS address 121.242.190.180
    Jan 20 10:48:39 localhost pppd[30081]: Terminating on signal 15
    Jan 20 10:48:39 localhost pppd[30081]: Connect time 2.7 minutes.
    Jan 20 10:48:39 localhost pppd[30081]: Sent 150222 bytes, received 678668 bytes.
    Jan 20 10:52:14 localhost kernel: usb 2-1: USB disconnect, address 13
    Jan 20 10:53:10 localhost kernel: usb 2-1: new full speed USB device using uhci_hcd and address 15
    Jan 20 10:53:10 localhost kernel: scsi8 : usb-storage 2-1:1.0
    Jan 20 10:53:11 localhost kernel: scsi 8:0:0:0: CD-ROM Qualcomm MMC Storage 2.31 PQ: 0 ANSI: 2
    Jan 20 10:53:11 localhost kernel: sr1: scsi3-mmc drive: 0x/0x caddy
    Jan 20 10:53:11 localhost kernel: sr 8:0:0:0: Attached scsi generic sg2 type 5
    Jan 20 10:53:11 localhost kernel: sr: Sense Key : 0x4 [current]
    Jan 20 10:53:11 localhost kernel: sr: ASC=0x0 ASCQ=0x0
    Jan 20 10:53:11 localhost kernel: sr: Sense Key : 0x4 [current]
    Jan 20 10:53:11 localhost kernel: sr: ASC=0x0 ASCQ=0x0
    Jan 20 10:53:38 localhost -- MARK --
    ^C
    [root@archbang ~]#
    ==================================
    I have also tried the modemmanager package. But I am not able to use VME102 as a modem. Can you please help me in this regard?

    ReplyDelete
  19. Jan 20 10:53:10 localhost kernel: scsi8 : usb-storage 2-1:1.0 says that it's detected as storage device. How did you use modemmanager & usb_modeswitch? I am pretty sure you just installed them through pacman and expected them to work magically. 

    ReplyDelete
  20. Hi,
     The package usb_modeswitch was already available on my system. So I executed both commands namely usb_modeswitch and usb_modeswitch_dispatcher. In addition to this I have also installed modemmanager package and executed the modemmanager command. But when I am inserting the VME102 device then modemmanager is not recognizing it. Can you please tell me how to use usb_modeswitch and modemmanager commands?

    ReplyDelete
  21. Playaround with the usb_modeswitch. Make it work somehow. Ask it's developer or the mailing list. It's the issue of your modem being detected as storage device.

    ReplyDelete
  22. I am glad that you could actually sort the things out. :) 

    ReplyDelete