Saturday, April 16, 2016

Setting up 3G dongle(TATA Photon plus) on Raspberry Pi Rev B

For setting up this initially one needs to have the internet connection to the Raspberry pi. In my case, I have the wifi dongle which is connected to the Home internet.

Note: I tried the same with Tata Photon Wifi. But was not successful
 
I partially followed the below links for setting the 3G dongle on my pi
http://www.instructables.com/id/Raspberry-Pi-as-a-3g-Huawei-E303-wireless-Edima/
http://www.arundhaj.com/blog/connecting-internet-with-usb-modem.html
https://shkspr.mobi/blog/2012/07/3g-internet-on-raspberry-pi-success/
http://raspberry-at-home.com/installing-3g-modem/

First install ppp, wvdial, usd-modemswitch

sudo apt-get install ppp

sudo apt-get install wvdialsudo apt-get install usb-modeswitch

Open wvdial config file using the below command
sudo leafpad /etc/wvdial.conf

replace all the existing lines in wvdial.conf with lines below

 --------------------------------------------------
[Dialer Defaults]
Modem = /dev/ttyUSB0
Baud = 115200
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CRM=1
Stupid Mode = 1
ISDN = 0
Modem Type = USB Modem
Phone = #777
Username = internet
Password = internet
---------------------------------------------------------
 ################################################################################
Open usb-modemswitch config file using the below command
sudo leafpad /etc/usb_modeswitch.conf

replace all the existing lines in usb_modeswitch.conf with lines below
----------------------------------------------------------------------------------------
# Configuration for the usb_modeswitch package, a mode switching tool for
# USB devices providing multiple states or modes
#
# Evaluated by the wrapper script /usr/sbin/usb_modeswitch_dispatcher
#
# To enable an option, set it to "1", "yes" or "true" (case doesn't matter)
# Everything else counts as "disable"


# Disable automatic mode switching globally (e.g. to access the original
# install storage)

DisableSwitching=0


# Enable logging (results in a extensive report file in /var/log, named
# "usb_modeswitch_<interface-name>" and probably others

EnableLogging=0

TargetVendor = 0x12d1
TargetProduct = 0x1505
MessageEndPoint = "0x01"
MessageContent = "55534243000000000000000000000011060000000000000000 000000000000"

--------------------------------------------------------------------------------------------------


 Now we will disable the serial so that ttyUSB0 is enabled. Using the below command

sudo raspi-config
  and then 
 



 
 

 Once reboot raspberry pi.
Once the system is ON, give the below command

sudo wvdial to get some like below and you can open the browser for internet

--------------------------------------------------------------------------------------------------
pi@raspbmc:~$ sudo wvdial play &
[1] 3143
pi@raspbmc:~$ --> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: ATH
ATH
OK
--> Sending: ATE1
ATE1
OK
--> Sending: AT+CGDCONT=1,"IP","internet"
AT+CGDCONT=1,"IP","internet"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Fri Jun 14 22:35:19 2013
--> Pid of pppd: 3145
--> Using interface ppp0
--> pppd: Ęy
--> pppd: Ęy
--> pppd: Ęy
--> pppd: Ęy
--> pppd: Ęy
--> pppd: Ęy
--> pppd: Ęy
--> local  IP address 10.133.163.246
--> pppd: Ęy
--> remote IP address 10.64.64.64
--> pppd: Ęy
--> primary   DNS address 89.108.202.20
--> pppd: Ęy
--> secondary DNS address 89.108.195.20
--> pppd: Ęy

-----------------------------------------------------------------------------------------------


Another method:
Sakis3G will help in updating the USB modem. So download it from the below link
http://raspberry-at-home.com/files/sakis3g.tar.gz
 and then extract the script and give permissions with below commands

sudo tar -zxvf sakis3g.tar.gz
sudo chmod +x sakis3g
 

Saturday, April 5, 2014

Hi,
Re-Started Blogging after long..long time. Just wanted to put my ideas, thoughts and information at one place. Hope it will help some more people in finding their way....