[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question: My dial program and HSMODEM



Reine Jonsson writes:
> Date: Sat, 14 Oct 1995 09:28:09 +0100
> Message-Id: <199510140828.JAA29005@connectum.skurup.se>
> From: ljord@connectum.skurup.se (Reine Jonsson)
> Subject: Question: My dial program and HSMODEM
> Apparently-To: mint@atari.archive.umich.edu
> 
> I'm resending this mail to the list,
> it seems like the first try did'nt
> make it. My apologies if it did.

(i think not.  this one did, tho apparently still lacking a To: line...)
> 
> Ciao!
> 
> ....
> 
> Hej!
> 
> To connect my modem to my internetprovider 
> I have written a small program that will
> call, login ... etc...
> 
> I use Bconout(1,value) to send
> a char to my modem.

 dont do that when programming for MiNT.  it *should* still work with
current kernels but thats only for backward compatibility with old
TOS binaries as you'll be needlessly generating a constant 99% CPU load
using this nonblocking single-byte-IO nonsense...  better use read(),
write(), select() and ioctl() and/or the mintlib termios calls
whenever you can, just like you'd do on un*x.  (and see taylor (gnu)
uucp or the mint-net source for examples how to do this _right_. :)
like i can get ~10K/sec here ftp'ing over a direct 115200bps slip link
and still see some % idle.)

> The basic routines is added last in this
> mail.
> The programs works fine without HSMODEM
> and at 19200 baud-rate.
> 
> When I run HSMODEM in my autofolder
> I'm able to communicate with my modem
> if I do:
> 
> echo atdtphone-number > /dev/modem2
> 
> but not if I use my dial-program.

 right now i can't think of a reason why this should actually fail
(without a gdb session, :) but...
> 
> Question nr 1: What shall I do to make
> it work?

 ...see above.

 or just use something like the chat program that comes with pppd,
or my hack of the xchat program that comes with uucp...
> 
> If I use a terminal program I'm able
> to connect and log in at 115200 baud?
> and MintNet works fine at that speed.

 well with slip i see the occasional dropped packet here at that speed
but then my cable is some 13m long. (maybe i should try ppp?)
> 
> Question nr 2: What can I do to change 
> the speed from my program or from a
> mint-shell-script or from my dial-program?

 look at the TIOC[IO]BAUD ioctls.  since your using HSMODEM (you do
load it before MiNT right?) the kernel will just pass them thru to it
and it should work.  does for me anyway.
> 
> I use a Falcon 030 with processor running
> at 36 mHz, busses at 18 mHz.

 68000 (mste), 16/8 Mhz, other end i486 SP3G running real un*x :) (BSD)...

 ATB and have fun,
	Juergen