OpenBSD - 2 problems

stirling

Member
Oct 29, 2001
127
0
0
1. I want my virtual consoles! How do I get them back?

2. I've tried my best to follow the bsd ppp guides and came up with this ppp.conf:

default:
set log Phase Chat LCP IPCP CCP tun command
set device /dev/cua01
set speed 115200
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK-AT-OK ATE1Q0 OK\\dATDT\\T TIMEOUT 40 CONNECT"
set redial 3 20

isp:
set phone 1234567
set login "ABORT NO\\sCARRIER TIMEOUT 5 ogin:--ogin: mylogin word: mypass"
set timeout 120
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
add default HISADDR
set authname mylogin
set authkey mypass
enable dns
#eof

I'm getting the following error with #ppp -auto isp
'Warning: Add route failed: 0.0.0.0/0 already exists'

There is no attempt to dial the modem, but I'm not sure if everything has to be just right before it will try.
dmesg says the modem is pccom0

On one level, I just want to get my dial-up working.
On another level, I want to better understand bsd devices and I'm a little fuzzy on the relationships between cua/tun/pccom
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0


<< 1. I want my virtual consoles! How do I get them back? >>



ctrl + alt + Fn

In linux it is just alt + Fn, OpenBSD adds one key there. No biggie.



<< 2. I've tried my best to follow the bsd ppp guides and came up with this ppp.conf:

default:
set log Phase Chat LCP IPCP CCP tun command
set device /dev/cua01
set speed 115200
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK-AT-OK ATE1Q0 OK\\dATDT\\T TIMEOUT 40 CONNECT"
set redial 3 20

isp:
set phone 1234567
set login "ABORT NO\\sCARRIER TIMEOUT 5 ogin:--ogin: mylogin word: mypass"
set timeout 120
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
add default HISADDR
set authname mylogin
set authkey mypass
enable dns
#eof

I'm getting the following error with #ppp -auto isp
'Warning: Add route failed: 0.0.0.0/0 already exists'

There is no attempt to dial the modem, but I'm not sure if everything has to be just right before it will try.
dmesg says the modem is pccom0

On one level, I just want to get my dial-up working.
On another level, I want to better understand bsd devices and I'm a little fuzzy on the relationships between cua/tun/pccom
>>



Ill have to check my old ppp.conf (if I still have it...), but try "cu -l /dev/cua00". If that connects to your modem try using /dev/cua00 instead of /dev/cua01. If it doesnt, try "cu -l /dev/cua01".
 

stirling

Member
Oct 29, 2001
127
0
0
#cu -l /dev/cua00
Connected

Still no luck. I've just (re)read the openbsd and the more thorough freebsd guides on the subject.
This is what has changed:
-MAKEDEV /dev/tun0 - no problem, it was already there
-created /etc/ppp/ppp.linkup:

isp:
add default HISADDR
#eof

added to rc.conf (from the freebsd userppp handbook, although I'm not sure if these are even used in the openbsd rc):
hostname="localhost"
network_interfaces="lo0 tun0" ifconfig_tun0=
router_enable=NO
#end

Altered ppp.conf:

default:
set log Phase Chat LCP IPCP CCP tun command
set device /dev/cua00
set speed 115200
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
\"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\TTIMEOUT 40 CONNECT"
set login
set timeout 180
enable dns

isp:
set phone "1234567"
set authname mylogin
set authkey mypass
accept PAP
set timeout 300
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255
add default HISADDR
#eof

-I have an unused nic that was set to 127.0.0.1 and has been changed to 192.168.0.1 over routed's complaints of a conflict with lo.

Here's how it goes now:
#ppp
blah blah ppp interactive mode
using tun0
ppp ON myhost>dial isp
Warning: chat script failed

There is still no attempt to dial the modem. (How can the chat script fail if it's not dialing?)
Is it even using the right device?
Frankly, I'm at a loss.

(Thanks for the vc's, n0cmonkey.)
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
When the cu -l /dev/cua00 connects, try typing "AT", without the "". It should reply with "OK". That is your modem. What type of modem BTW? When I used to use a modem, I would use (as root), "ppp -background pmdemand". pmdemand was the section I modified. I had no troubles with it.
 

stirling

Member
Oct 29, 2001
127
0
0
I didn't realize the example script was full of subroutines, so I set about making one from scratch :confused:

cua00 is nonresponsive to AT commands, but after cu'ing some other devs, I got tty03 to work.
Who would have guessed?

thx again
 

nuttervm

Golden Member
Nov 13, 1999
1,818
0
0
also you might like to know about the program/package called screen. it is another way to have virtual terminals. one advantage to using the ctrl alt Fn method of virtual terminals is that you can 'disconnect' from the terminal and leave it running, log off the machine, come back any amount of time later and resume the screen or terminal you were working on. it's particularly useful for things like large ftp transfers where you want it to run in the background and it might take a long time. or maybe you want to be on IRC permanently on one screen so you can always recieve messages in a channel... the possibilities are endless.

screen is my savior, i love it.
 

stirling

Member
Oct 29, 2001
127
0
0
screen sounds like a worthy new religion.
I'll check it out after I've finished assessing branch davidianism.