This is an article to remind me of the process for connecting to the internet with a GPRS modem. I had to configure it to test sending / receiving MMS-sms to my site.
The modem I tested is a HuaWei, eg169g, sold in China as a 2.5g modem. The method should work with other models of the same brand.
1) right after plugin the modem, check that it is well recognized by linux,
dmesg | tail should give you the proper port and success/failure message telling you that a modem has been added.
(it should be something like : /dev/ttyUSB0 or /dev/ttyACM0
Note that with some older kernels (for ex. CentOS 5.2 is still 2.6.18) it can be recognized as a CDrom or a memory stick/
If so, then you have to look on the web to install a program called usb-modeswitch, that will enable to recognize your modem as a modem.
2) install wvdial, the ppp tool for wireless modems.
to configure the modem, type
# wvdialconf /etc/wvdial.conf
if it doesn't work, saying that your modem was not recognized, you can try again after rebooting your PC without unplugging the modem.
3) if this step was ok, edit the wvdial.conf file and modify username and password value. (in China, you can add whatever value ) it shouldn't be necessary to modify any other value.
the value after "Phone" is something like *99***1# , depending of your mobile operator. (this if for china mobile). It shouldn't be necessary to modify it.
4) try it:
$ wvdial this command launch the modem, which should be printing your IP address and the ones of your DNS servers.
if it doesn't show any errors but looks like the script is hanging, it shows that it's workign.
you can check it by looking if a new ppp port is open with the following command:
ifconfig
5) if ifconfig is showing an open and workgin ppp port, but you still cannot connect with it, it may come from a bad routing table or DNS records.
you can edit your default dns with this file : /etc/resolv.conf
and check your computer's route with the route command
route -n
if you see some default routes for another port than ppp, or wrong route for ppp port (for ex eth0) you can delete them with the following command.
route del (see the man for more details on this command).
After deleting the rules, retry wvdial, and it should work.
The modem I tested is a HuaWei, eg169g, sold in China as a 2.5g modem. The method should work with other models of the same brand.
1) right after plugin the modem, check that it is well recognized by linux,
dmesg | tail should give you the proper port and success/failure message telling you that a modem has been added.
(it should be something like : /dev/ttyUSB0 or /dev/ttyACM0
Note that with some older kernels (for ex. CentOS 5.2 is still 2.6.18) it can be recognized as a CDrom or a memory stick/
If so, then you have to look on the web to install a program called usb-modeswitch, that will enable to recognize your modem as a modem.
2) install wvdial, the ppp tool for wireless modems.
to configure the modem, type
# wvdialconf /etc/wvdial.conf
if it doesn't work, saying that your modem was not recognized, you can try again after rebooting your PC without unplugging the modem.
3) if this step was ok, edit the wvdial.conf file and modify username and password value. (in China, you can add whatever value ) it shouldn't be necessary to modify any other value.
the value after "Phone" is something like *99***1# , depending of your mobile operator. (this if for china mobile). It shouldn't be necessary to modify it.
4) try it:
$ wvdial this command launch the modem, which should be printing your IP address and the ones of your DNS servers.
if it doesn't show any errors but looks like the script is hanging, it shows that it's workign.
you can check it by looking if a new ppp port is open with the following command:
ifconfig
5) if ifconfig is showing an open and workgin ppp port, but you still cannot connect with it, it may come from a bad routing table or DNS records.
you can edit your default dns with this file : /etc/resolv.conf
and check your computer's route with the route command
route -n
if you see some default routes for another port than ppp, or wrong route for ppp port (for ex eth0) you can delete them with the following command.
route del (see the man for more details on this command).
After deleting the rules, retry wvdial, and it should work.
Commentaires
Enregistrer un commentaire
Tell me what you think