# How to establish GSM / USB modem connection from Terminal?

## Martux

Hi folks. Lately I am heavily dependent of a gsm modem.

On my shiny desktop it works great with kde and networkmanager and all.

But I was really thinking, can that thing be used in a console enviroment only?

Cnetwormanager seems to have this purpose, but it seems only to talk to wireless connections or did I get it wrong?

Any ideas?

----------

## eccerr0r

It seems GSM modems end up being...well... modems.  The ones I've seen so far end up being some sort of fake RS232 modem.

Though I don't have details but this is possible.  You will need to load your modem's driver which tends to make a /dev/ttyUSBxxxxx type device, which is a character serial device.  Using pppd you can create a chat script that will "dial" into the service and start a ppp link - just like a dial up modem...

I'm going to be lazy and let networkmanager do it for now.  Mainly because I don't have my phone hooked up to my computer all the time...

----------

## Martux

Hell, I am going to be lazy too  :Wink:  It's just like that I didn't see any obvious or easygoing way to do that without a GUI. I would really like something which works on many live cds or if my KDE doesn't boot or or or... There are many scenarios where this could be handy. Networkmanager comes with every distro I care about, so it would still be the preferred way.

----------

## lamarque

You can use the command below to activate a connection from command line:

nmcli con up id <connection name>

Of course, you can switch 'up' with 'down' to deactivate the connection.

----------

## eccerr0r

is that still networkmanager :D  (what package is it?  newer networkmanager?)

Anyway another issue is that a lot of this is carrier dependent, as well as the fact that a lot of carriers charge by the byte and people may get pissed off if installing Gentoo started costing them money...

----------

## lamarque

nmcli comes with networkmanager package. As far as I know it not a new tool. I think you would still need to use a GUI tool to create the connections. You can create them using dbus-send but that is really painfull.

----------

## eccerr0r

Ahh... nice, didn't know about nmcli, neat.

Looks like that dbus/consolekit/??? needs to be setup before using it, I tried logging in without gdm and it didn't see any of my nm-applet created entries...

----------

## Logicien

The wvdialconf command search the /dev directory for characters nodes that can be used for a ppp connexion and create the configuration file /etc/wvdial.conf. You have to edit it to enter the login and passwd. Than you can connect in a terminal with the wvdial command. It's the main way I use with a GSM USB modem to connect to the Internet. You need to emerge the wvdial package for that.

----------

