wanted to connect my Airtel4G with ubuntu 12.04 64 bit.

137 views
Skip to first unread message

Sandeep Dange

unread,
Jan 15, 2014, 2:03:11 AM1/15/14
to vg...@googlegroups.com
I had been through many articles about this. but found no specifics with airtel 4g dongle.

problem is whenever i connect it detects it as mass storage device. despite all the mobile settings
and usb-mode-switch i found no luck on it.

could any one got succeded plz share your "how-to" or any links you would have referred.

thanks,
sandeep

Vasant Talpada

unread,
Jan 16, 2014, 3:28:55 AM1/16/14
to vg...@googlegroups.com
Hey friends,
Finally I have found out the solution!!!
The scene was something like this - whenever I attached the dongle, it was taken as cd-rom (Zero-CD mode) attached at /dev/sr0 or sr1.
This was due to Windows drivers on that part of dongle.
I ejected /dev/sr0 and wow!! productid changed from usb to modem automatically!!!
Rest of the things I handle with the help of Sakis3G.



--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG+un...@googlegroups.com
To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG
 
---
You received this message because you are subscribed to the Google Groups "VGLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vglug+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

sakis3g.zip

ElectroMech

unread,
Jan 16, 2014, 11:17:31 PM1/16/14
to vg...@googlegroups.com

This is great for reference.

Thanks for sharing your solution.

--
Nilesh Vaghela
ElectroMech Corporation
302, New York Plaza, Opp. chief Justice Bunglow
Bodakdev, Ahmedabad - 380054
www.electromech.info
fb.com/electromechcorp

Iftikhar Hossain

unread,
Jan 18, 2014, 11:37:48 AM1/18/14
to vg...@googlegroups.com
HI friends, 

Me also solve this problem by this tutorial. 
but I want to make scripts to every 5 mins to run command wvdial. How to do it ?


Thanks

Iftikhar

Iftikhar Hossain

unread,
Jan 18, 2014, 12:33:24 PM1/18/14
to vg...@googlegroups.com
Hi friends.

This is my script to check ping status and if not, then it will give command to run wvdial.

root@site01:~/script1# vim modem.sh
#!/bin/bash
  HOSTS="google.com"
  COUNT=4
  for myHost in $HOSTS
  do
  count=$ (ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk
  if [$count -eq 0]; then
  wvdial
fi
done

By root user,
root@site01:~/script1# crontab -e

5 * * * * /bin/sh ~/script1/modem.sh


But it not works. whats the problem?

Tejas Barot

unread,
Jan 18, 2014, 1:02:20 PM1/18/14
to VGLUG
Hello,

On Sat, Jan 18, 2014 at 11:03 PM, Iftikhar Hossain <iftikh...@gmail.com> wrote:
Hi friends.

This is my script to check ping status and if not, then it will give command to run wvdial.

root@site01:~/script1# vim modem.sh
#!/bin/bash
  HOSTS="google.com"
  COUNT=4
  for myHost in $HOSTS
  do
  count=$ (ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk
  if [$count -eq 0]; then
  wvdial
fi
done

Script is having issue. Incomplete command as well as some minor mistake like space count=$ (ping ...

Following is changed script, You can compare with your script :-

#!/bin/bash
HOSTS="4.2.2.2"
COUNT=4
for myHost in $HOSTS
do
pcount=$(ping -c 4 $HOSTS | grep 'received' | awk -F',' '{ print $2 }' | awk -F" " '{print $1}')
if [ $pcount -eq 0 ]; then
wvdial
fi
done

 

By root user,
root@site01:~/script1# crontab -e

5 * * * * /bin/sh ~/script1/modem.sh

Crontab entry seems fine. Just confirm path.
 


But it not works. whats the problem?

I have posted changed script above, Just copy paste and try, Let me know if it doesn't work for you.

Hope this helps you.



--
Thanks & Regards,
Tejas Barot
Linux Consultant,
Red Hat Certified Engineer,
Linux Blog:- http://www.tejasbarot.com
Linux Forums :- http://linuxforums.tejasbarot.com
Facebook :-  http://www.fb.me/tejasbarot.official
Facebook Page :- http://www.fb.me/AllLinuxUsersBlog
Twitter :- https://twitter.com/imtejasbarot
LinkedIn :- http://in.linkedin.com/in/imtejasbarot

"Windows not bad at all but only if its limited to Walls, 
For Computers, Linux is already doing Best Job" - Tejas Barot

Rahul Patil

unread,
Jan 18, 2014, 1:16:07 PM1/18/14
to vg...@googlegroups.com
Hi,

Also we can simply use :

nc -vzw1 google.com 80 || wvdial


Best Regards,
Rahul Patil

Iftikhar Hossain

unread,
Jan 19, 2014, 9:32:23 AM1/19/14
to vg...@googlegroups.com
Dear Friends,

Mr. Tejas, It has an error. I cant solve it 
Mr. Rahul, your script is so simple. I tried but it not works. 
I dont know what's the problem?


Thanks

Iftikhar

Tejas Barot

unread,
Jan 19, 2014, 11:37:02 AM1/19/14
to VGLUG
Hello,


On Sun, Jan 19, 2014 at 8:02 PM, Iftikhar Hossain <iftikh...@gmail.com> wrote:
Dear Friends,

Mr. Tejas, It has an error. I cant solve it 

Can you please copy/paste that error here ?

I will check it out and will update you.

Waiting for your reply.

Iftikhar Hossain

unread,
Jan 19, 2014, 11:56:27 AM1/19/14
to vg...@googlegroups.com
if i use script, below this error:

root@site01:~/script1# cat modem.sh
#!/bin/bash
HOSTS="8.8.8.8"

COUNT=4
for myHost in $HOSTS
do
pcount=$(ping -c $COUNT $HOSTS | grep 'received' | awk -F',' '{ print $2 }' | awk -F" " '{print $1}')

if [$pcount -eq 0]; then
wvdial
fi
done

root@site01:~/script1# sh modem.sh
modem.sh: 7: modem.sh: [4: not found

If i use this below, it's ok. but don't know why it's not working. Now I am using this script.

root@site01:~/script1# cat wvdial.sh
nc -vzw1 google.com 80 || wvdial

root@site01:~/script1# sh wvdial.sh
Connection to google.com 80 port [tcp/http] succeeded!


root@site01:~/script1# crontab -l

5 * * * * /bin/sh ~/script1/wvdial.sh


root@site01:/var/log# grep cron /var/log/syslog
Jan 19 08:15:21 site01 anacron[1229]: Job `cron.daily' terminated (exit status: 1) (mailing output)
Jan 19 08:15:21 site01 anacron[1229]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Jan 19 08:15:21 site01 anacron[1229]: Normal exit (1 job run)
Jan 19 08:17:01 site01 CRON[4592]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 09:17:01 site01 CRON[4768]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 10:17:01 site01 CRON[4944]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 11:17:01 site01 CRON[5118]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 12:17:01 site01 CRON[5295]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 12:44:45 site01 cron[5943]: (CRON) INFO (pidfile fd = 3)
Jan 19 12:44:45 site01 cron[5944]: (CRON) STARTUP (fork ok)
Jan 19 12:44:45 site01 cron[5944]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Jan 19 12:44:56 site01 crontab[5945]: (cairns) BEGIN EDIT (cairns)
Jan 19 12:45:00 site01 crontab[5945]: (cairns) END EDIT (cairns)
Jan 19 12:45:20 site01 crontab[5973]: (root) LIST (root)
Jan 19 13:17:01 site01 CRON[6300]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 14:17:01 site01 CRON[6483]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 15:17:01 site01 CRON[6667]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 16:17:01 site01 CRON[6852]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 16:54:20 site01 cron[6990]: (CRON) INFO (pidfile fd = 3)
Jan 19 16:54:20 site01 cron[6991]: (CRON) STARTUP (fork ok)
Jan 19 16:54:20 site01 cron[6991]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Jan 19 17:07:02 site01 crontab[9781]: (root) BEGIN EDIT (root)
Jan 19 17:07:32 site01 crontab[9781]: (root) REPLACE (root)
Jan 19 17:07:32 site01 crontab[9781]: (root) END EDIT (root)
Jan 19 17:07:37 site01 crontab[9915]: (root) LIST (root)
Jan 19 17:07:54 site01 cron[9931]: (CRON) INFO (pidfile fd = 3)
Jan 19 17:07:54 site01 cron[9932]: (CRON) STARTUP (fork ok)
Jan 19 17:07:54 site01 cron[9932]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Jan 19 17:08:06 site01 cron[10060]: (CRON) INFO (pidfile fd = 3)
Jan 19 17:08:06 site01 cron[10061]: (CRON) STARTUP (fork ok)
Jan 19 17:08:06 site01 cron[10061]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Jan 19 17:17:01 site01 CRON[12272]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 17:27:01 site01 crontab[15036]: (root) LIST (root)
Jan 19 18:17:01 site01 CRON[18318]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 18:56:25 site01 crontab[19244]: (cairns) LIST (cairns)
Jan 19 18:56:47 site01 crontab[19256]: (root) LIST (root)
Jan 19 19:17:01 site01 CRON[19338]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 19:36:02 site01 crontab[23641]: (root) LIST (root)
Jan 19 19:51:40 site01 cron[27571]: (CRON) INFO (pidfile fd = 3)
Jan 19 19:51:40 site01 cron[27572]: (CRON) STARTUP (fork ok)
Jan 19 19:51:40 site01 cron[27572]: (CRON) INFO (Skipping @reboot jobs -- not system startup)


On Sun, Jan 19, 2014 at 7:54 PM, Iftikhar Hossain <iftikh...@gmail.com> wrote:
if i use script, below this error:

root@site01:~/script1# cat modem.sh
#!/bin/bash
HOSTS="8.8.8.8"

COUNT=4
for myHost in $HOSTS
do
pcount=$(ping -c $COUNT $HOSTS | grep 'received' | awk -F',' '{ print $2 }' | awk -F" " '{print $1}')

if [$pcount -eq 0]; then
wvdial
fi
done

root@site01:~/script1# sh modem.sh
modem.sh: 7: modem.sh: [4: not found

If i use this below, it's ok. but don't know why it's not working. Now I am using this script.

root@site01:~/script1# sh wvdial.sh
Connection to google.com 80 port [tcp/http] succeeded!


root@site01:~/script1# crontab -l

5 * * * * /bin/sh ~/script1/wvdial.sh


root@site01:/var/log# grep cron /var/log/syslog
Jan 19 08:15:21 site01 anacron[1229]: Job `cron.daily' terminated (exit status: 1) (mailing output)
Jan 19 08:15:21 site01 anacron[1229]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Jan 19 08:15:21 site01 anacron[1229]: Normal exit (1 job run)
Jan 19 08:17:01 site01 CRON[4592]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 09:17:01 site01 CRON[4768]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 10:17:01 site01 CRON[4944]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 11:17:01 site01 CRON[5118]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 12:17:01 site01 CRON[5295]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 12:44:45 site01 cron[5943]: (CRON) INFO (pidfile fd = 3)
Jan 19 12:44:45 site01 cron[5944]: (CRON) STARTUP (fork ok)
Jan 19 12:44:45 site01 cron[5944]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Jan 19 12:44:56 site01 crontab[5945]: (cairns) BEGIN EDIT (cairns)
Jan 19 12:45:00 site01 crontab[5945]: (cairns) END EDIT (cairns)
Jan 19 12:45:20 site01 crontab[5973]: (root) LIST (root)
Jan 19 13:17:01 site01 CRON[6300]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 14:17:01 site01 CRON[6483]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 15:17:01 site01 CRON[6667]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 16:17:01 site01 CRON[6852]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 16:54:20 site01 cron[6990]: (CRON) INFO (pidfile fd = 3)
Jan 19 16:54:20 site01 cron[6991]: (CRON) STARTUP (fork ok)
Jan 19 16:54:20 site01 cron[6991]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Jan 19 17:07:02 site01 crontab[9781]: (root) BEGIN EDIT (root)
Jan 19 17:07:32 site01 crontab[9781]: (root) REPLACE (root)
Jan 19 17:07:32 site01 crontab[9781]: (root) END EDIT (root)
Jan 19 17:07:37 site01 crontab[9915]: (root) LIST (root)
Jan 19 17:07:54 site01 cron[9931]: (CRON) INFO (pidfile fd = 3)
Jan 19 17:07:54 site01 cron[9932]: (CRON) STARTUP (fork ok)
Jan 19 17:07:54 site01 cron[9932]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Jan 19 17:08:06 site01 cron[10060]: (CRON) INFO (pidfile fd = 3)
Jan 19 17:08:06 site01 cron[10061]: (CRON) STARTUP (fork ok)
Jan 19 17:08:06 site01 cron[10061]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Jan 19 17:17:01 site01 CRON[12272]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 17:27:01 site01 crontab[15036]: (root) LIST (root)
Jan 19 18:17:01 site01 CRON[18318]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 18:56:25 site01 crontab[19244]: (cairns) LIST (cairns)
Jan 19 18:56:47 site01 crontab[19256]: (root) LIST (root)
Jan 19 19:17:01 site01 CRON[19338]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan 19 19:36:02 site01 crontab[23641]: (root) LIST (root)
Jan 19 19:51:40 site01 cron[27571]: (CRON) INFO (pidfile fd = 3)
Jan 19 19:51:40 site01 cron[27572]: (CRON) STARTUP (fork ok)
Jan 19 19:51:40 site01 cron[27572]: (CRON) INFO (Skipping @reboot jobs -- not system startup)

Tejas Barot

unread,
Jan 19, 2014, 12:10:47 PM1/19/14
to VGLUG

Hello,

On Sun, Jan 19, 2014 at 10:26 PM, Iftikhar Hossain <iftikh...@gmail.com> wrote:
if i use script, below this error:

root@site01:~/script1# cat modem.sh
#!/bin/bash
HOSTS="8.8.8.8"

COUNT=4
for myHost in $HOSTS
do
pcount=$(ping -c $COUNT $HOSTS | grep 'received' | awk -F',' '{ print $2 }' | awk -F" " '{print $1}')

if [$pcount -eq 0]; then

Please copy/paste it carefully. You made a mistake in copy/pasting. 

It's [ $pcount -eq 0 ]; not [$pcount -eq 0 ]; 

anyway i am sending you the same script to your personal mail (only if you permit). So you can download and use it.

 
wvdial
fi
done

root@site01:~/script1# sh modem.sh
modem.sh: 7: modem.sh: [4: not found

If i use this below, it's ok. but don't know why it's not working. Now I am using this script.

root@site01:~/script1# cat wvdial.sh
nc -vzw1 google.com 80 || wvdial

root@site01:~/script1# sh wvdial.sh
Connection to google.com 80 port [tcp/http] succeeded!

This is expected output and it is working. Let me explain you command 

nc -vzw1 google.com 80 || wvdial

First Part :- nc -vzw1 google.com 80 -> this means it is trying to connect to google.com on port number 80

Second Part :-  || wvdial -> this means it will execute "wvdial" command only if first command "nc -vzw1 google.com 80" fails.

@ Rahul, as you have posted this solution so correct me if i am wrong.

Hope this helps you.

Iftikhar Hossain

unread,
Jan 19, 2014, 12:18:36 PM1/19/14
to vg...@googlegroups.com
Mr. Tejas, 
It's my pleasure to sent my personal mail. Thanks for explanation..
Ofcourse I think it might help me.


On Sun, Jan 19, 2014 at 8:13 PM, Iftikhar Hossain <iftikh...@gmail.com> wrote:
It's working .

root@site1:~/script1# sudo crontab -e

*/5 * * * * /bin/nc -vzw1 google.com 80 || /usr/bin/wvdial

Iftikhar Hossain

unread,
Jan 19, 2014, 12:43:02 PM1/19/14
to vg...@googlegroups.com
I have another problem. If I eject the modem and again put it. it not gets automatically.
Manually I give command 
root@site1# eject /dev/sr1

then the script runs and it works. so how to permanently solve this issue ?

Rahul Patil

unread,
Jan 19, 2014, 1:41:36 PM1/19/14
to vg...@googlegroups.com
Hi Iftikhar,

Dialer have default reconnect option which default enabled ( as per man pages). also you can set dial time out which is default 60 seconds. see man pages.


Manually I give command

root@site1# eject /dev/sr1

then the script runs and it works. so how to permanently solve this issue ?

If auto reconnect not helps you then you can use below work around.  and not need to use absolute path, because crontab already have default set.
nc -nvzw1 8.8.8.8 53 || { eject /dev/sr1 && wdial; }

OR
#!/bin/bash

hosts="8.8.8.8"
count=4

for ip in $hosts
do
        pcount=$(ping -c $count $ip | 
                 awk '/[0-9] received,/{ print $4}' )


        if [[ $pcount -eq 0 ]]; then

                eject /dev/sr1 && wvdial
        fi

done


@Tejas, Good explanation. also we can suggest this link.


Best Regards,
Rahul Patil

Iftikhar Hossain

unread,
Jan 20, 2014, 12:49:21 AM1/20/14
to vg...@googlegroups.com
Mr. Rahul,

I found a problem. it not works. For reference, please see this link below:
https://wiki.archlinux.org/index.php/ZTE_MF110/MF190

I saw that if I unplug the modem and again connect the server, then it will some time to detect the device. At first, the device detects as:
root@site01:~/script1# lsusb | grep ZTE
Bus 002 Device 007: ID 19d2:0166 ZTE WCDMA Technologies MSM

after that,
root@site01:~/script1# eject /dev/sr1

Then it will some time to detect the device. So that the command not works
eject /dev/sr1 && wvdial 
after that ,it founds as:

root@site01:~/script1# lsusb | grep ZTE
Bus 002 Device 007: ID 19d2:0167 ZTE WCDMA Technologies MSM

But if modem connects the server, but it anyhow disconnects the device then it already found as:
 
root@site01:~/script1# lsusb | grep ZTE
Bus 002 Device 007: ID 19d2:0167 ZTE WCDMA Technologies MSM

In this case, this command not works.
eject /dev/sr1 && wvdial
just wvdial command is enough.

So, is it possible when I connects the modem, it detects automically as a modem??



Thanks for your valuable time.



 

Rahul Patil

unread,
Jan 20, 2014, 2:03:08 AM1/20/14
to vg...@googlegroups.com
Hi,

Good finding, we are close to solution.

So, is it possible when I connects the modem, it detects automatically as a modem??

I just refer that link provided by you, and possibly solution is, we can add following parameter in configuration file :


Init1 = AT+ZOPRT=5
Init2 = AT+ZCDRUN=8
This tells the modem not to use CD mode when it's first plugged into a computer.

and also we can modify script to check modem is connected or not

#!/bin/bash

hosts="8.8.8.8"
count=4

for ip in $hosts
do
        pcount=$(ping -c $count $ip | 
                 awk '/[0-9] received,/{ print $4}' )
        if [[ $pcount -eq 0 ]]; then

                # if modem connected then do not eject (change modem ID)
                lsusb | grep -q '19d2:0167 ZTE' || eject /dev/sr1 
                wvdial
        fi

done

Since I don't have modem, I can't test it in my end, so please once check it and let us know, if you still have any issue.

Best Regards,
Rahul Patil

Iftikhar Hossain

unread,
Jan 20, 2014, 3:49:23 AM1/20/14
to vg...@googlegroups.com
Dear Rahul,

I think it seems work. 

I followed this one,

Disable CD mode on the device with wvdial

First remove usb-storage then modprobe usbserial

rmmod usb_storage
modprobe usbserial

Edit /etc/wvdial.conf :

[Dialer Defaults]
Modem = /dev/ttyUSB0
Modem Type = Analog Modem
ISDN = 0
Init1 = AT+ZOPRT=5
Init2 = AT+ZCDRUN=8

Run wvdial, it should use those commands and fail to connect.

After that I edit wvdial.conf file

root@site01:~/script1# cat /etc/wvdial.conf

[Dialer Defaults]
Init1 = ATZ
#Init3 = AT+Z0PRT=5
#Init4 = AT+ZCDRUN=8
Stupid Mode = 1
Dial Attempts = 3
Password = { }
Init7 = AT+CGEQREQ=1,4,64,640,64,640
Phone = *99#
APN = gprs.qtel
Modem Type = Analog Modem
Baud = 9600
Modem = /dev/ttyUSB2
; Init1 = AT+ZCDRUN=9
ISDN = 0
Username = { }
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Auto Reconnect = on
Init6 = AT+CGEQMIN=1,4,64,640,64,640

then when I unplugged the device and again plugged it.then it detects :

root@site01:~/script1# lsusb


Bus 002 Device 007: ID 19d2:0167 ZTE WCDMA Technologies MSM 

my cron file is:

root@site01:~/script1# crontab -l


*/5 * * * * /bin/nc -vzw1 google.com 80 || /usr/bin/wvdial


Thanks for your help.


I tried your script also. but found error:

cairns@site01:~/script1$ sh modem.sh
connect: Network is unreachable
modem.sh: 7: modem.sh: [[: not found
[1]+  Done                    gedit modem.sh




Rahul Patil

unread,
Jan 20, 2014, 4:46:52 PM1/20/14
to vg...@googlegroups.com
Hi,

It's seems you are using old bash version, so you can use single [,  which does the same, but it's not advance, access this page for more details on extended test construct i.e [[ .

apart from this, if you are facing any issue, then revert back to us, we will help you on the same.


--
Best Regards,
Rahul Patil

Iftikhar Hossain

unread,
Jan 21, 2014, 9:32:27 AM1/21/14
to vg...@googlegroups.com
Hi Rahul ,

I tested with single [ , but error is: 
root@site01:~/script1# sh modem.sh
connect: Network is unreachable
modem.sh: 7: [: -eq: unexpected operator

ElectroMech

unread,
Jan 22, 2014, 12:11:29 AM1/22/14
to vg...@googlegroups.com

Hi small suggestion.

Instead [[ $pcount -eq 0 ]] try to use [ -z $pcount ]

Might help you.

As such -eq expect some comparison value and if value not found will give error.

Thanks and regards.

--


Nilesh Vaghela
ElectroMech Corporation
302, New York Plaza, Opp. chief Justice Bunglow
Bodakdev, Ahmedabad - 380054
www.electromech.info
fb.com/electromechcorp

Vasant Talpada

unread,
Feb 8, 2014, 3:18:30 AM2/8/14
to vg...@googlegroups.com
Hey friends,
Not even Sakis3G is needed after we execute $ eject /dev/sr1 command.
Dongle automatically starts appearing as modem in network manager of linux distro after 4 to 5 seconds.
We can easily connect to internet after following steps according to particular distro.


On Thursday, 16 January 2014 13:58:55 UTC+5:30, Vasant Talpada wrote:
Hey friends,
Finally I have found out the solution!!!
The scene was something like this - whenever I attached the dongle, it was taken as cd-rom (Zero-CD mode) attached at /dev/sr0 or sr1.
This was due to Windows drivers on that part of dongle.
I ejected /dev/sr0 and wow!! productid changed from usb to modem automatically!!!
Rest of the things I handle with the help of Sakis3G.

On Wed, Jan 15, 2014 at 12:33 PM, Sandeep Dange <dange....@gmail.com> wrote:
I had been through many articles about this. but found no specifics with airtel 4g dongle.

problem is whenever i connect it detects it as mass storage device. despite all the mobile settings
and usb-mode-switch i found no luck on it.

could any one got succeded plz share your "how-to" or any links you would have referred.

thanks,
sandeep

--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG+unsubscribe@googlegroups.com

To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG
 
---
You received this message because you are subscribed to the Google Groups "VGLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vglug+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages