On Sun, 15 Apr 2018, MS wrote:

Is there a successful story with OpenBSD and a 3G USB modem?

I use it since years.

I've read the manuals, but can't really glue the whole thing together
to make it work.

Yes, the manuals and the files/examples in /etc/ppp should be enough.
It should be like configuring an old analog modem (That I never needed :).

Some ideas to get the whole picture:

(1) You need to create a ppp interface, let us say do
     "ifconfig ppp0 create". See "man 4 ppp" for it.

(2) You need need the modem to be ready for the connection,
     first connect to it with "cu -l /dev/cuaU0" (if it is
     pluged in cuaU0) and give commands like:

     AT+CGCONT=1,"IP","APNofYourProvider" [perhaps only once, modem saves it]
     ~. [to leave the session]

    You can see more commands here:


(3) With "man pppd" you learn how to write a file with "options" that
     goes to the directory "/etc/ppp/peers/". It depends on your
     modem, on your provider. Let us call it "/etc/ppp/peers/xyz".
     Then you start the connection with "pppd call xyz". See with
     "ifconfig" what happens.

(4) You need to set manually a DNS in "/etc/resolv.conf", unfortunately
     OpenBSDs pppd does not do it.

Back to "/etc/ppp/peers/xyz". There are lines ("options") of the form

connect "/usr/sbin/chat -v -f /etc/ppp/con.chat"
disconnect "/usr/sbin/chat -v -f /etc/ppp/dis.chat"

They call the program "chat" applied to the "chat scripts" con.chat and dis.chat when connecting and disconnecting, chat communicate
with the modem. See "man 8 chat" to see how the chat scripts are
written. The above commands (after cu) could be for example included
in con.chat. You could also use other programs different from chat.

You also can see in in "/etc/ppp/peers/xyz" a line of the form

user username

For this username there should be a password in the file
"/etc/ppp/chap-secrets" or "/etc/ppp/pap-secrets". The
provider gives you this username and password. Authentication is
also described in "man 8 pppd".

I hope, you get now the whole picture and can concentrate on the details.

Any corrections or commentaries there?


Reply via email to