Connect ANY 3G dongle to ANY android tablet...

Search This thread

Bhaskar1109

Member
Jan 31, 2013
26
61
I have found a way to connect any modem to the tablet even if the tablet does not recognizes it. your device must be ROOTED to do so. I am not a developer, i just found out somewhere and modified the instructions to make it easy. i am not responsible to any thing that happens to your device (however this method isn't risky at all):cool:.

Just follow the instructions and enjoy. First download the attachment...

. First you need to move the modem to "modem only" for this you will need a terminal, you can use Hyper Terminal on windows.
Google search for AT commands for your modem to make it modem only mode and how to do that.

All right .... transferred the modem to the modem-only mode ....

Then note the vid and pid of your modem. one way to do this is to connect the modem to computer then go to device manager, expand modems, right click your modem >properties>details.


2. Next we need ES File Explorer

Install it on your tablet ... Open, go to settings -> Root rights, and tick all checkboxes.

3. Then go to /system/bin/preinstall.sh on your tablet and add a line to the file using es file explorer echo "19d2 1176" > /sys/bus/usb-serial/drivers/option1/new_id (see my preinstall.sh in the archive).

here 19d2 is my modem (vodafone K3370-z) vid and 1176 the pid. replace the vid and pid with your own.

REEBOT YOUR TABLET

4.There is a folder peers in the archive you downloaded. open conf-chat in the folder with es file explorer and replace your apn here with the apn of your service provider .

When the tablet does not recognize the modem it will not generate ttyUSB files which are needed to communicate with the modem. In Step 3 you made the tablet to recognize the modem and it now generates the ttyUSB files. You can check that in Terminal emulator(download from play store) by typing "dmesg" command(without qoutes). scroll the output down, you will see the generated ttyUSB ports as given in attached screenshot Pic1. It also gives the number of ports genetated. If you see these lines you can Connect your modem to Internet. But wait a minute you have additional things to do in order to get connected.

Now you need to find which port is pppd port because we need it to insert in the file Conf-pppd in peers folder of the archive you downloaded. (open the conf-pppd using wordpad you would see ttyUSB1 on the top because pppd port of my modem is 1, those modems who has pppd port at 1 would be able to connect without any modifications, if the pppd port of your modem is not 1 you would have to edit it e.g if the pppd port of your modem is 2, the top line in conf-pppd would look like ttyUSB2 and so on)


To determine which is pppd port follow the below steps...(see the attached screenshots)

Open 2 windows in terminal emulator. (you can copy paste the commands in terminal emulator)

(1) In first window type busybox tr -s "\n" < /dev/ttyUSBx (Pic2)
where x is the first port generated by your modem.(this command opens the port)

(2) Now in window 2 type echo -e "ATi\r" > /dev/ttyUSBx (pic3)
Here x is the same you typed in window 1.
You would see OK in WINDOW 1(Not in window 2). IF YOU DONT SEE ANY OUTPUT IN WINDOW 1(pic4), YOU HAVE TO UNPLUG YOUR MODEM AND PLUG IT AGAIN AND THEN USE NEXT PORT. yOU HAVE TO DO THIS EVERY TIME YOU DONT SEE ANY OUTPUT. IF YOU DO SEE AN OUTPUT PROCEED TO NEXT STEP.(pic 5, 6, and 7)

(3) Again type echo -e "AT+CGDCONT=1,\"IP\",\"www\"\r" > /dev/ttyUSBx in window 2. (Pic8)
Here replace www with your apn
You will see the OK again in window 1.(pic9)

(4) Again type echo -e "ATDT*99#\r" > /dev/ttyUSBx in WINDOW 2(pic10)
You will See the output in window 1. if you see ERROR in window 1, then it is your AT port not PPPD port. Unplug your modem and try next port untill you get CONNECT message in window 1(pic11). If you get Connect Message the at any port then it is your pppd port. IF you get these messages at port 2, then replace 1 in ttyUSB with 2, ehich then reads ttyUSB2 at the top of conf-pppd file.

Now copy the folder Peers in /etc/ppp/ in your sd card.



Install the application GScript_Mod.apk lies just in the archive .... open it and add the two scripts in the folder gscript of your sdcard : inet-ON.sh (Which brings up connection) and inet-OFF.sh (which disables the connection)

5. REBOOT TABLET. insert the modem. Start the application Gscript and run inet-ON.sh(pic12)

If you do everything on the instructions, your modem will connect to the Internet, although you will not see the 3G connection on the tablet...(pic13)

Thanks for reading..
 

Attachments

  • Guide.zip
    32.1 KB · Views: 64,721
  • Screenshots.zip
    946.4 KB · Views: 28,832
Last edited:

manb7

New member
Mar 4, 2013
3
0
Dear Bhaskar1109,

Kindly tell me how to use Hyper Terminal and make it a modem only mode. I have Micromax 310G modem with aircel connection and Micromax Funbook Infinity P275. I am unable to connect my modem as it says damaged sd card.

Thank You for your wonderful guide.
 

Bhaskar1109

Member
Jan 31, 2013
26
61
Micromax 310G..

Dear Bhaskar1109,

Kindly tell me how to use Hyper Terminal and make it a modem only mode. I have Micromax 310G modem with aircel connection and Micromax Funbook Infinity P275. I am unable to connect my modem as it says damaged sd card.

Thank You for your wonderful guide.

Select COM port in HyperTerminal and try AT Commands.. i know AT commands to disable Emulated CDROM for few modems. Try it otherwise google commands for your modem

Huawei AT^U2DIAG=x command to control emulated CD-ROM and Micro-SD card
values of <x>:
0: disable CD-ROM and Micro-SD
1: enable CD-ROM only
255: enable CD-ROM and Micro-SD
256: enable Micro-SD only

ZTE AT+ZCDRUN=x command to control emulated CD-ROM and Micro-SD card
values of <x>:
8: disable autorun (modem appears when plugged in)
9: enable autorun (only CD-ROM appears when plugged in)
E: enable download mode (CD-ROM does not appear when plugged in)
F: disable download mode (CD-ROM appears when plugged in)

ZTE(ICERA chipsets) AT%USBMODEM?: to check the actual state

AT%USBMODEM=x command to control emulated CD-ROM and Micro-SD card
values of <x>
0: modem only mode
1: modem + CD-ROM + microSD
 
Last edited:

Bhaskar1109

Member
Jan 31, 2013
26
61
Instructions added...


oops, i forgot some vital instructions earlier which i have added in bold letters now. Please view those if you were not able to connect to internet earlier and give your experiences.
 

siraci

New member
Apr 18, 2013
4
0
Hi there,

I have checked the presence of ttyUSB into the /dev, but when I run the inet-ON I get.

Waiting ttyUSB1
Starting pppd
stderr: pppd: in file /etc/ppp/peers/conf-pppd unrecognized option TIMEOUT
Connecting....

Can anybody help me on this issue?
Thanks.
 

Bhaskar1109

Member
Jan 31, 2013
26
61
Hi there,

I have checked the presence of ttyUSB into the /dev, but when I run the inet-ON I get.

Waiting ttyUSB1
Starting pppd
stderr: pppd: in file /etc/ppp/peers/conf-pppd unrecognized option TIMEOUT
Connecting....

Can anybody help me on this issue?
Thanks.

which sim r u using? and what are the settings for the connection? these problems arise due to incorrect settings. check pm
 

siraci

New member
Apr 18, 2013
4
0
Hi Bhaskar1109,

thanks for your reply. As you suggested, I have check all installation and I found the mistake, using the adb command I pushed the conf-pppd file but with the conf-chat's file contents :).
So now "almost" it works fine. Almost because I have to give manually from adb shell or terninal:
echo "1ee8 0014" > /sys/bus/usb-serial/drivers/option1/new_id
in order to create the USBtty
and when the connection is on
setprop net.dns1 208.67.222.222
to set the dns server, because when I run the inet-ON.sh i get the error:
stderr: usage: setprop <key> <value>
This time I have checked the preinstall.sh and inet-ON.sh contents and permissions.

Any clues?
 

Bhaskar1109

Member
Jan 31, 2013
26
61
Hi Bhaskar1109,

thanks for your reply. As you suggested, I have check all installation and I found the mistake, using the adb command I pushed the conf-pppd file but with the conf-chat's file contents :).
So now "almost" it works fine. Almost because I have to give manually from adb shell or terninal:
echo "1ee8 0014" > /sys/bus/usb-serial/drivers/option1/new_id
in order to create the USBtty
and when the connection is on
setprop net.dns1 208.67.222.222
to set the dns server, because when I run the inet-ON.sh i get the error:
stderr: usage: setprop <key> <value>
This time I have checked the preinstall.sh and inet-ON.sh contents and permissions.

Any clues?

Maybe that you have done some typing mistakes like extra spaces etc. and have you restarted your tablet?. you can set dns in inet-on.sh file. Are you able to browse internet normally after these commands?

p.s Google play and internal download manager may not work. You can browse play market but cannot install any apps(probably). UC browser download manager works fine. Use 1 mobile market instead of google play.
 

siraci

New member
Apr 18, 2013
4
0
I have done other tests and now the only small issue is that I have to run the
echo "1ee8 0014" > /sys/bus/usb-serial/drivers/option1/new_id
into a separate sh file because seems that doesn't work into preinstall.sh file.
Anyway all works fine and let me say that you have done a great and clever job.

Thanks
 

RASTAVIPER

Senior Member
May 2, 2011
3,702
815
Hello Bhaskar1109,
I have the tablet N101 by Yuandao and I was successfully using PPPwidget with a Huawei E173 stick for 3G browsing.
Recently it stopped connecting, so after searching new alternatives, I found your very useful topic. I would appreciate your help, since I am trying now to find a way to make it work with your way.

I started using your guide, but I cant pass Step 4 with the terminal emulators.
First of all in Terminal Emulator, when I run dmesg command I get "converter now disconnected from ttyUSB0" and I get this for all USB (0,1,2)
Then when I run busybox tr -s "\n" < /dev/ttyUSBx ( I tried with USB0 till USB2), I am getting a message "cannot open /dev/ttyUSB0 (0,1,2)"

Any help?
 
Last edited:

Bhaskar1109

Member
Jan 31, 2013
26
61
Hello Bhaskar1109,
I have the tablet N101 by Yuandao and I was successfully using PPPwidget with a Huawei E173 stick for 3G browsing.
Recently it stopped connecting, so after searching new alternatives, I found your very useful topic. I would appreciate your help, since I am trying now to find a way to make it work with your way.

I started using your guide, but I cant pass Step 4 with the terminal emulators.
First of all in Terminal Emulator, when I run dmesg command I get "converter now disconnected from ttyUSB0" and I get this for all USB (0,1,2)
Then when I run busybox tr -s "\n" < /dev/ttyUSBx ( I tried with USB0 till USB2), I am getting a message "cannot open /dev/ttyUSB0 (0,1,2)"

Any help?

the ports will be available only when the tab recognizes it as a modem. Following questions might help-

Is your tab Rooted?
Is your modem OK?
Is you modem vid pid correct?
Have You followed step 3 Correctly?Can You see the new line in preinstall.sh?
Have you restarted the tab?
Have You given su permissions to the scripts?
 

RASTAVIPER

Senior Member
May 2, 2011
3,702
815
the ports will be available only when the tab recognizes it as a modem. Following questions might help-

Is your tab Rooted?
Is your modem OK?
Is you modem vid pid correct?
Have You followed step 3 Correctly?Can You see the new line in preinstall.sh?
Have you restarted the tab?
Have You given su permissions to the scripts?
Since I mentioned before that this dongle was working right for some time with PPP widget, I think most of your questions are already covered.

From your experience, could the Otg cable have started to fail and create these problems that never had before?

The command dmesg is showing that first these ports are available and after they are not.
Also, I think its important that I get this ""cannot open /dev/ttyUSB0 (0,1,2). No such file or directory"

Unleashed by my rooted Nexus 4
 
Last edited:

Bhaskar1109

Member
Jan 31, 2013
26
61
Since I mentioned before that this dongle was working right for some time with PPP widget, I think most of your questions are already covered.

From your experience, could the Otg cable have started to fail and create these problems that never had before?

The command dmesg is showing that first these ports are available and after they are not.
Also, I think its important that I get this ""cannot open /dev/ttyUSB0 (0,1,2). No such file or directory"

Unleashed by my rooted Nexus 4

Sorry i didnt notice the ppp widget thing.
It may be otg problem, otherwise why would ppp widget failed suddenly at the first place. i suggest u to replace the cable and try again.
 

Devarishi

Member
Jun 18, 2012
40
6
Imphal
Error i faced...

I installed Gscript apk from your download link from your thread. I put that two script under sdcard/"another folder"/gscript. I opened gscript application and it says "process.android.com(alike this) stop working". What happened to my tablet. Im using micromax funbook p300. Is there is any way or the other to let it work ?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 58
    I have found a way to connect any modem to the tablet even if the tablet does not recognizes it. your device must be ROOTED to do so. I am not a developer, i just found out somewhere and modified the instructions to make it easy. i am not responsible to any thing that happens to your device (however this method isn't risky at all):cool:.

    Just follow the instructions and enjoy. First download the attachment...

    . First you need to move the modem to "modem only" for this you will need a terminal, you can use Hyper Terminal on windows.
    Google search for AT commands for your modem to make it modem only mode and how to do that.

    All right .... transferred the modem to the modem-only mode ....

    Then note the vid and pid of your modem. one way to do this is to connect the modem to computer then go to device manager, expand modems, right click your modem >properties>details.


    2. Next we need ES File Explorer

    Install it on your tablet ... Open, go to settings -> Root rights, and tick all checkboxes.

    3. Then go to /system/bin/preinstall.sh on your tablet and add a line to the file using es file explorer echo "19d2 1176" > /sys/bus/usb-serial/drivers/option1/new_id (see my preinstall.sh in the archive).

    here 19d2 is my modem (vodafone K3370-z) vid and 1176 the pid. replace the vid and pid with your own.

    REEBOT YOUR TABLET

    4.There is a folder peers in the archive you downloaded. open conf-chat in the folder with es file explorer and replace your apn here with the apn of your service provider .

    When the tablet does not recognize the modem it will not generate ttyUSB files which are needed to communicate with the modem. In Step 3 you made the tablet to recognize the modem and it now generates the ttyUSB files. You can check that in Terminal emulator(download from play store) by typing "dmesg" command(without qoutes). scroll the output down, you will see the generated ttyUSB ports as given in attached screenshot Pic1. It also gives the number of ports genetated. If you see these lines you can Connect your modem to Internet. But wait a minute you have additional things to do in order to get connected.

    Now you need to find which port is pppd port because we need it to insert in the file Conf-pppd in peers folder of the archive you downloaded. (open the conf-pppd using wordpad you would see ttyUSB1 on the top because pppd port of my modem is 1, those modems who has pppd port at 1 would be able to connect without any modifications, if the pppd port of your modem is not 1 you would have to edit it e.g if the pppd port of your modem is 2, the top line in conf-pppd would look like ttyUSB2 and so on)


    To determine which is pppd port follow the below steps...(see the attached screenshots)

    Open 2 windows in terminal emulator. (you can copy paste the commands in terminal emulator)

    (1) In first window type busybox tr -s "\n" < /dev/ttyUSBx (Pic2)
    where x is the first port generated by your modem.(this command opens the port)

    (2) Now in window 2 type echo -e "ATi\r" > /dev/ttyUSBx (pic3)
    Here x is the same you typed in window 1.
    You would see OK in WINDOW 1(Not in window 2). IF YOU DONT SEE ANY OUTPUT IN WINDOW 1(pic4), YOU HAVE TO UNPLUG YOUR MODEM AND PLUG IT AGAIN AND THEN USE NEXT PORT. yOU HAVE TO DO THIS EVERY TIME YOU DONT SEE ANY OUTPUT. IF YOU DO SEE AN OUTPUT PROCEED TO NEXT STEP.(pic 5, 6, and 7)

    (3) Again type echo -e "AT+CGDCONT=1,\"IP\",\"www\"\r" > /dev/ttyUSBx in window 2. (Pic8)
    Here replace www with your apn
    You will see the OK again in window 1.(pic9)

    (4) Again type echo -e "ATDT*99#\r" > /dev/ttyUSBx in WINDOW 2(pic10)
    You will See the output in window 1. if you see ERROR in window 1, then it is your AT port not PPPD port. Unplug your modem and try next port untill you get CONNECT message in window 1(pic11). If you get Connect Message the at any port then it is your pppd port. IF you get these messages at port 2, then replace 1 in ttyUSB with 2, ehich then reads ttyUSB2 at the top of conf-pppd file.

    Now copy the folder Peers in /etc/ppp/ in your sd card.



    Install the application GScript_Mod.apk lies just in the archive .... open it and add the two scripts in the folder gscript of your sdcard : inet-ON.sh (Which brings up connection) and inet-OFF.sh (which disables the connection)

    5. REBOOT TABLET. insert the modem. Start the application Gscript and run inet-ON.sh(pic12)

    If you do everything on the instructions, your modem will connect to the Internet, although you will not see the 3G connection on the tablet...(pic13)

    Thanks for reading..
    3
    Micromax 310G..

    Dear Bhaskar1109,

    Kindly tell me how to use Hyper Terminal and make it a modem only mode. I have Micromax 310G modem with aircel connection and Micromax Funbook Infinity P275. I am unable to connect my modem as it says damaged sd card.

    Thank You for your wonderful guide.

    Select COM port in HyperTerminal and try AT Commands.. i know AT commands to disable Emulated CDROM for few modems. Try it otherwise google commands for your modem

    Huawei AT^U2DIAG=x command to control emulated CD-ROM and Micro-SD card
    values of <x>:
    0: disable CD-ROM and Micro-SD
    1: enable CD-ROM only
    255: enable CD-ROM and Micro-SD
    256: enable Micro-SD only

    ZTE AT+ZCDRUN=x command to control emulated CD-ROM and Micro-SD card
    values of <x>:
    8: disable autorun (modem appears when plugged in)
    9: enable autorun (only CD-ROM appears when plugged in)
    E: enable download mode (CD-ROM does not appear when plugged in)
    F: disable download mode (CD-ROM appears when plugged in)

    ZTE(ICERA chipsets) AT%USBMODEM?: to check the actual state

    AT%USBMODEM=x command to control emulated CD-ROM and Micro-SD card
    values of <x>
    0: modem only mode
    1: modem + CD-ROM + microSD
    1
    d link DWM-156 A7 3g modem

    hi my friend .
    i have D-link DWM-156 A7 3g modem , i searched in the internet about this model AT command . but i can't found .
    do you know AT command about this model ?
    thanks .
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone