Modem dial out

(First mistakenly posted in qnx4 forum.)

In our last episode, I was trying to set up my Neutrino box to answer a call and set up a PPP session.

I have it working by starting this command in rc.sysinit:
“/usr/bin/pppd defaultroute IP_ADDR1:IP_ADDR2 57600 connect \
‘chat -v -t0 -f/etc/answer’ persist /dev/ser2”

This has no security to speak of, but for my purposes, that’s all right.

Now my task is to dial out from the same computer on the same modem and establish a PPP session with a remote box running basically the configuration above. I have logging into the remote successfully from Windows, but I would like to do it from my QNX development machine.

I have tried Photon Dialer. The problem I run into is permission. I can’t access /dev/ser2 as an ordinary user, but I’d rather not run my entire Photon desktop as root. Is there a way around that?

Thanks,
Randy C.

You want to do this dail out while the other pppd (for answering) is running?

No, not necessarily.

In my experiments with the ppp-up script, however, I have killed the running pppd first, and I get no action - no dial, no messages, the script simply exits immediately.

Any ideas?

Thanks,
Randy

What ppp-up script?
Try to run the commands in that script line by line, and see where it stops.
You can also enable the syslog and pppd debug option to see more details.

Like noc, I have no idea what you meant by ppp-up?
I thought you only need to do this;

slay pppd

sleep 5

/usr/bin/pppd defaultroute 57600 connect ‘chat -v -t0 -f/etc/dialout’ /dev/ser2

You would think…

What does /etc/dialout need to contain? I’ll try it.

Randy C.

Take a look of how “chat” works. The “dialout” script typically need to have “ATDT” modem command to dial a phone number, and some sort of login/password exchange.

The “ppp-up” script from

ftp://ftp.qnx.org.ru/pub/projects/fliu/ppp.tar.gz

has some examples on the “chat” script. Make sure it matches your login sequence.

Thanks. I studied up on chat, tweaked my dialout script a while, and got it to dial out. To one modem that I tried locally, all seemed fine.
When I dialed the one I’m really interested in, all went well up until the “expect ogin:” prompt. I got a message that, I guess reported on the protocol negotiations: 28800/ARQ/V34/LAPM/V42BIS.

Then I got five lines of garbage, and the connection timed out without ever seeing the “ogin:”.

The modem I’m calling is set up with the script I mentioned in the root post of this string, and it’s an identical modem to the one I’m calling out on. I can connect with the remote just fine from Windows dialup.

What say you, pros? What am I still doing wrong?

Randy C.

as I am momentarily hacking on a similar problem, would you please post in detail your /etc/answer and /etc/dialup scripts ? that might help me, and by luck during my experiments I might stumble on some piece of information that will help you too ;-)
thank you ! HELGE

Of course.

My /etc/answer is very simple, containing only:
RING ATA
CONNECT “”

The /etc/dialout is slightly more, but not much:
ABORT BUSY
ABORT ‘NO CARRIER’
ATZ OK
ATDT CONNECT “”
ogin:
ssword:

I found that the function of the /etc/dialout could be confused by linebreaks in the wrong place, even though escaped, so in my file all of the above are on one line with no breaks.

My only (?) problem now is that when I dial in I get “garbage” output back. I put that in quotes because it’s apparently not garbage to the Windows dialup mechanism, but that’s what it looks like in a bash window.

Thanks,
Randy C.

Do you know for sure the peer is going to give you a “login:” prompt? Use “qtalk” first to dial the number (do the sequence manuly) to confirm.

If Windows can connect to the remote machine directly, and you dont remember do any “script” on windows, then it most likely is not a machine to let you login (ISP usually setup like that). You can try to remove the “ogin” line and the “ssword” line in your script and see if it works.

And of cause, you probably also need to setup your /etc/ppp/pap-secret, as that’s the typical authentication windows would use.

You were right. To everyone’s relief, not least of all mine, I removed the login/password stuff from the /etc/dialout script, and now it sets up a PPP session just fine.

Thanks many times over for all the assist.

Randy C.

You were right. To everyone’s relief, not least of all mine, I removed the login/password stuff from the /etc/dialout script, and now it sets up a PPP session just fine.

Thanks many times over for all the assist.

Randy C.

Hello. I want to set up qnx 6 to answer a call and set up a PPP session like Randy did.
I wrote the command

“usr/bin/pppd defaultroute IP_ADDR1:IP_ADDR2 57600 connect
‘chat -v -t0 -f/etc/answer’ persist /dev/ser2”

in my rc.sysinit file.

I change /dev/ser2 into /dev/ser1, where my modem is.
I did a qtalk to check the modem and was in used by pppd but I can`t connect with it from the remote machine.
Anybody knows why? Any advice?
Thanks.

:blush: Upps . I found my problem. My serial1, the physical conexion was broken.
Now the modem is working well with that line in my rc.sysinit file.
Sorry and thanks. :blush: