SMSC serial0
Matt Evans
bush-hacking@earth.li
Fri, 28 Jun 2002 11:58:37 +0100 (BST)
Vincent Sanders wrote:
> serial 1 could have been nobbled?
Can't parse - you mean physically screwed-up? (yes, could have been, and
double-checked this last night to make sure. ;)
*Thanks Vincent for the flake, and moves on to....*
Andrew Flegg wrote:
> > I had a fiddle with this last month and it was a pain in the
> > arse. Peculiarly, *TYPE devicefs:$.serial1 returned /nothing/ when I sent
> > data down serial port 1, but returned gibberish (as expected) from the IR
> > remote via serial2.
>
> Did you solder the port directly onto the SerialIO lines, might a MAX232
> be needed?
*grin* Yes yes yes. I'm utterly barbaric with my hardware, but not
/that/ barbaric ;) (mind you, my Sun's RS232 port is so weak, it probably
wouldn't kill it.. urgh.)
> > (The port physically works, in non-RISC OS land.)
>
> What other checks did you do?
We've discussed this separately but for the benefit of the list:
My own code running from ROM talks down serial 0 [note serial 0 = Serial1
in RISCOS, serial 1 = Serial2 ;] to a workstation with no problems.
[pretty rom hack at http://www.cs.man.ac.uk/~evansm7/pics/BushSTBrom.jpg -
never got round to buying them there posh 16bit flash chips ;]
I verified this last night; set up the box with my gateway PC, did 'cat
/dev/cuaa0' and could see the banner of my serial monitor. Then I
replaced the NCOS ROMs. *serialinfo says Serial1 is 9600, 8N1, no rtscts.
So then I do *SPOOL devices:$.Serial1, type some rubbish, and *SPOOL.
It 'hangs' at this point (ESCapeable). I see nothing on my GW :(
Also doing 'cat > /dev/cuaa0' on the PC, typing some junk, and doing *TYPE
devices:$.Serial1 shows nothing (whilst the same command on Serial2 shows
chars from the IR port).
Likewise, *PPPConnect devices:$.Serial1 9600 <etc> (can't remember
syntax) claims (in *PPPLog) that it's sending LCP stuff, but I see nothing
at the other end.
AAARRRRGH! So my question... I'm assuming that because the serial port
*serialinfo output says it's not using handshaking, that it ISN'T using
handshaking. I assume that if I *TYPE <serialport> it will open it with
the same parameters (just as though I'd done "stty < /dev/ttyS0; cat
/dev/ttyS0" on a unix box).
Is there some weird default that it opens the port with every time that is
trying to use the (unconnected) RTS CTS lines, thus blocking on send? I
don't know enough about RISCOS serial stuff, I think I tried something
like opening devices#9600baud;nocrts:$.Serial1 too (last month).
I don't see why the device would appear in RISC OS yet be unusable, so
there must be some other tweak that needs doing. (I repeat: the hardware
works. (that's the one bit I'm confident about))
Cheers,
Matt
ps: (anyone want to start a BushSTB demo compo? Some of my little gfx
ditties for the RISCPC fly on this thing ;D)