Laurens,
> > 1. How to start a serial connection with the modem
> Pfff... Use the standard settings: 8N1, and make the speed configurable (you
> can also set it to the max. speed for simplicity's sake. However I do not
> recommend it for a final version).
Thanks for the info.
> > 2. How to configure the modem (ATwxyz, etc)
> ATZ is the standard thing. However I suggest to use a config-file instead.
> I do, at least...
The Hayes strings are the easy part...
> > 3. How to make the modem dial and establish a connection
> send init string:
> ATZ
> OK
This "OK" isn't sent by the modem itself???
> and then dial:
> ATDT0123456789
> CONNECT 115200
And also this "CONNECT"?
> Now you are connected to the peer.
Nice. So I just need to send and receive characters
(including modem commands) from the RS232 without worring about anything?
> > 4. How to detect that the server I dialed send some strings
> > ("login:", "password:", etc)
> That's part of the SLIP protocol. DO NOT USE IT!!! It really, really sucks.
> For example, it doesn't support IP address negociation etc
Hey fudeba... I know SLIP very well, ok?
> not supported by the server. Instead send a PPP Conf_Req in an HDLC frame
> immediately after the CONNECT message to start using PPP.
Some ISPs still do authentication via SLIP. At least, here in
Brazil.
> The only disadvantage of PPP over HDLC instead of SLIP is that HDLC is more
> secure and has an FCS check over all the outgoing and incoming bytes, which
> is a bit double since the upper level protocols (IP, TCP) also have a
> checksum. You can ignore the FCS when receiving frames, and it is quite
> easily calculated for outgoing frames (in most cases the outgoing traffic is
> lower than the incoming traffic, so it's not really a problem). And using an
> experimental protocol (I don't know how much servers implement it, but my
> guess is most do) you can even disable the FCS check. However in my PPP
> implementation I don't support that yet.
FCS is very easy to implement using a lookup table (less
computational cost for slow machines). I don't remember the RFC by now,
but it has a C-coded example of a fast FCS calculation using a lookup
table.
> > 5. How to send to the server some strings (the user name and
> > password)
> Use the Password Authentication Protocol (PAP).
Most ISPs use PAP, but, as I said, some ISPs use SLIP for
authentication.
> > 6. How to send/receive data from modem (authentication finished,
> > so I want to start sending/receiving data!)
> It's all in the PPP protocol
The PPP protocol I know. I'm just not familiarized with the
interaction of a modem and PPP. I'm just not sure how to "talk" with the
modem and to know when I start the PPP layer.
> It's all done through PPP (in this case using Terminate_Request packets).
Yeah, I also know that.
> 1. Configuration Phase (LCP, the Link Control Protocol)
> LCP is an integrated part of PPP. Send Conf_Request, Conf_Reject, Conf_Nak
> and Conf_Ack
I know, I know...
> packets until all options have been negociated. Options include
> Authentication Protocol negociation (PAP or CHAP (yuk!)
I didn' study CHAP yet, so I can't comment.
> Header Compression (matters a very few
> bytes, not worth the effort)
It's worth, since this kind of compression is too easy.
> and several other things which are only making
> things complex like Magic Number etc.
Magic Number is just useful for loopback test. But generating a
random number at the beginning and using it is not problem.
> 4. Established.
> Now you can start sending IP packets to the peer (using PPP protocol #0021).
Right. I recommend you implementing Van Jacobson compression.
That's what I'm doing right now on UZIX.
> If you need to be helped out you can ask me specific questions (me=PPP
> expert :)).
Thank you. But me also PPP expert. I'm just not a modem expert. :)
> > Oh, and I don't have an external modem (someone wants to send me
> > an old 2400bps one? :)
> Bit slow, eh???
Do you think that if I asked for a 33k6 modem someone would send
it to me? That's why I asked for an old 2400 one! :)
And for tests, it's better than nothing. :)
> I will take some with me to the Bussum fair
> (but I guess you won't be there... :)
I would like to. But it's too far away and too expensive to get
there.
> I've got two 2400bps modems layin' around, but the mail cost would exeed the
> value of the modem 10 times. It's not worth the money.
No problem. Maybe some day I get one from a kind person. :P :)
Thanks again,
Adriano Camargo Rodrigues da Cunha ([EMAIL PROTECTED])
Engenharia de Computacao - UNICAMP
http://www.adrpage.cjb.net http://if.you.dont.like.msx.usuck.com
* User Error: Replace user. *
****
Problems? contact [EMAIL PROTECTED] See also http://www.faq.msxnet.org/
****
Re: Programming external modems with MSX
Adriano Camargo Rodrigues da Cunha Thu, 24 Aug 2000 14:55:30 -0700
- Programming external modems with MSX Adriano Camargo Rodrigues da Cunha
- Re: Programming external modems wi... Manuel Bilderbeek
- Re: Programming external modem... Werner Augusto Roder Kai
- Re: Programming external modems wi... Laurens Holst
- Re: Programming external modem... Adriano Camargo Rodrigues da Cunha
- Re: Programming external m... David Heremans
- Re: Programming extern... Laurens Holst
- Re: Programming e... Adriano Camargo Rodrigues da Cunha
- Re: Programmi... Laurens Holst
- Re: Progr... Adriano Camargo Rodrigues da Cunha
- Re: Progr... Maarten ter Huurne
- Re: Progr... Laurens Holst
- Re: Progr... Laurens Holst
- Re: Progr... Adriano Camargo Rodrigues da Cunha
- Re: Programming external m... Laurens Holst
