element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
TE Connectivity
  • Products
  • Manufacturers
  • TE Connectivity
  • More
  • Cancel
TE Connectivity
Forum Can any one guide me that how to get internet connection over usb 3g dongle(any) for Raspberry pi?
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join TE Connectivity to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 3 replies
  • Answers 2 answers
  • Subscribers 18 subscribers
  • Views 10352 views
  • Users 0 members are here
Related

Can any one guide me that how to get internet connection over usb 3g dongle(any) for Raspberry pi?

Former Member
Former Member over 9 years ago

I am trying to get internet connection form usb 3g dongle for Raspberry pi 2 B. I have tried with wvdial.conf and usb_modeswitch.conf. I have got ip address from ppp0 but i am not getting internet connection. and even i tried with sakis3g, here also same result and no internet connection. Below i have pasted my configurations. If any one worked on this pleas let me know where i am wrong?

1)

pi@raspberrypi:~ $ lsusb

Bus 001 Device 005: ID 12d1:1436 Huawei Technologies Co., Ltd. E173 3G Modem (modem-mode)

Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter

Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

2)

file : /etc/wvdial.conf

 

[Dialer Defaults]

Modem = /dev/ttyUSB0

Init1 = ATZ

Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

Init3 = AT+CGDCONT=1,"IP","TATA.DOCOMO.INTERNET"

Stupid Mode = 1

Modem Type = Analog Modem

Phone = *99#

ISDN = 0

Username = { }

Password = { }

Baud = 460800

 

3)

pi@raspberrypi:~ $ ifconfig

eth0      Link encap:Ethernet  HWaddr b8:27:eb:46:f5:a0

          inet addr:192.168.2.174  Bcast:192.168.2.255  Mask:255.255.255.0

          inet6 addr: fe80::ba27:ebff:fe46:f5a0/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:21866 errors:0 dropped:0 overruns:0 frame:0

          TX packets:425 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:1933201 (1.8 MiB)  TX bytes:71065 (69.3 KiB)

 

 

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:65536  Metric:1

          RX packets:528 errors:0 dropped:0 overruns:0 frame:0

          TX packets:528 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:42672 (41.6 KiB)  TX bytes:42672 (41.6 KiB)

 

 

ppp0      Link encap:Point-to-Point Protocol

          inet addr:100.84.67.20  P-t-P:10.64.64.64  Mask:255.255.255.255

          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1

          RX packets:8 errors:0 dropped:0 overruns:0 frame:0

          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:3

          RX bytes:158 (158.0 B)  TX bytes:221 (221.0 B)

 

 

wwan0     Link encap:Ethernet  HWaddr 02:50:f3:00:00:00

          inet addr:169.254.12.135  Bcast:169.254.255.255  Mask:255.255.0.0

          inet6 addr: fe80::edd:24ae:b709:88d8/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:77 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 B)  TX bytes:22395 (21.8 KiB)

 

Any help is appreciated......

 

and what is difference between connecting GSM modem and usb 3g dongle to raspberry pi for internet connection?

  • Sign in to reply
  • Cancel

Top Replies

  • Nate1616
    Nate1616 over 9 years ago +1 suggested
    Mahantesh- Typically a powered usb hub is required for those devices. I know its trivial but have you tried a powered Hub? I had a similar issue in the past with a 3g dongle and it was just not getting…
  • Nate1616
    0 Nate1616 over 9 years ago

    Mahantesh-

    Typically a powered usb hub is required for those devices.  I know its trivial but have you tried a powered Hub? I had a similar issue in the past with a 3g dongle and it was just not getting enough juice to run.   Here is a link that is useful when setting up a 3G modem Installing 3G modem | Raspberry-at-home.com – Your ultimate source of Raspberry Pi tutorials (WiFi, 3G, XBMC, Subtitles,…

     

    Nate

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • clem57
    0 clem57 over 9 years ago

    Nate1616is right. I noticed you have eth0 active:

    When I was testing this I realized that you should not be connected to the internet (i.e. via eth0) when modem connection is initiated. For some reason RPi would not get proper DNS even if you disconnect eth0 after you connect with the modem, so: first disconnect your lan cable and then connect.

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago

    Sorry i am late to reply.... Fist, thanks for your reply.. As Nate and Clem told i tried with both steps ie, with powered USB hub and without ethernet cable. But still i got same result. and i executed the command "route -n" to check default gateway. There i was getting only ip address for destination  and not for GateWay for ppp0. Will it be a cause for my problem? ??? Do i need to add default gateway for ppp0???

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube