home_rate switch?

Posted by: wfaulk

home_rate switch? - 08/01/2002 21:50

I know that there's a car_rate switch to change the speed of the serial port in the car, but I really need to be able to do the same thing at home. I have an older Sun machine whose serial ports don't seem to work reliably at speeds over 38400 to which I'd like to attach the empeg serially, and I can't do it right now. It works fine if I attach it to my PC, get into the shell prompt and issue ``stty ispeed 38400 ospeed 38400'' and then attach it to my Sun. Anyone know of a way I can change the on-boot AC serial port speed?
Posted by: tfabris

Re: home_rate switch? - 08/01/2002 21:52

Mark, I hear the sound of someone rubbing your lamp.
Posted by: wfaulk

Re: home_rate switch? - 08/01/2002 22:24

Actually, I don't think so. The player seems to be resetting the port speed when it gets restarted after the shell exits. Also, the car_rate ``symbol'' is in the player binary. So unless the kernel can just ignore that (which I suppose it could, maybe), and set it to something more reasonable (for my application), it's more in the player's bailiwick.
Posted by: mlord

Re: home_rate switch? - 09/01/2002 10:58

I'll leave this hack to you.. The serial code confuses me too much, but the basic idea is to have a [hijack]serial_rate=38400 parameter in config.ini for this. Just declare a variable "hijack_serial_rate" in hijack.c for it, initialize to 0, and add an entry to hijack_option_table[].

No other changes in hijack.c

Then, look at drivers/char/serial_sa1100.c --> there is a routine called "change_speed", which is where you should add code to replace whatever rate is specified with your own "hijack_serial_rate", but only if it is non-zero.

This should work, but if not, the reason would be that we are reading config.ini just a little bit too late in the init sequence -- not sure about that yet.

Cheers

-ml
Posted by: bonzi

Re: home_rate switch? - 10/01/2002 16:06

Of course, you want player to communicate with your Sun, not just shell, right? Otherwise, it would be just a matter of putting sttys in /etc/profile (and making sure you have 'Quit' menu option, of course).