|
Post by Jim Brain on Mar 16, 2004 22:47:52 GMT -5
All of the standard null modem cables either tie DTR and DCD together or leave it unconnected. Some BBS systems require that pin to go high (or low, depending on your view) to signal a call. How do folks deal with that?
I tried just leaving DTR low until a connection comes, but on Linux, you cannot send or receive chars when DSR (the pin tied to the other end's DTR or RTS (the pin tied to CTS) are low.
Any help is appreciated...
JIm
|
|
|
Post by Leif Bloomquist on Mar 20, 2004 17:14:01 GMT -5
Hi Jim, You might have to build your own cable. I was lucky and found a null modem cable that passed all the signals at Radio Shack. It didn't seem to be a standard Radio Shack part, though, and I haven't been able to find another one like it. I did build one for some earlier tests though, using the same pinout, that worked well. (ended up giving it to Microman). Here is a (very bad) scan of the pinout. The original document's on my hard drive at work, I'll post it next week. Hope this helps. I've heard this isn't a standard pinout, but I've tried to identify what each pin is used for. No loopbacks.
|
|
|
Post by Jim Brain on Mar 20, 2004 17:48:46 GMT -5
You are correct about the non-standard part. Most null-modem cables ties RTS and CTS together (Request to Send to Clear to send). Yours does not.
The problem I am having is that RTS (on the PC side) and DTR must be high to send data out the port.... So, if I tie DCD to one of them, I can't send data to the 64 unless I assert the DCD pin...
Jim
|
|
|
Post by Jim Brain on Mar 23, 2004 15:06:11 GMT -5
The part I don't understand is the RTS from the PC side to the DCD on the CBM side. All of the documentaion I see for the PC serial p[ort states that you cnanot send characters out the serial port when RTS is low. So, if that is true in your application, how can you echo characters back to a 64 (say they are typing an AT command), when you have set RTS (64 DCD) low? I looked at your code, 0.9a, but I just can;t figure that out. That is my big problem right now. If I use your cable layout, I can;t echo chars back to the 64 because I have RTS low, so I can;t say 'OK' to any command. And, if I turn it on to send the chars, the DCD line goes high, and the 64 BBS thinks a call has arrived...
Inquiring minds want to know...
|
|
|
Post by Leif Bloomquist on Mar 23, 2004 18:52:32 GMT -5
Inquiring minds want to know... I'm not sure - it just worked for me. I think part of the confusion we're facing is that we're not making a true DTE/DTE or a DTE/DCE connection, it's kind of a hybrid because we want to simulate modem signals yet pass data between two computers. Anyway, that said, I have seen nullmodem cables where pins are looped back *as well as* run to a pin on the far side. i.e. some of these: www.epanorama.net/documents/pc/rs232cables.htmlSo maybe loop back RTS and CTS on the PC side, in addition to conecting RTS to DCD on the C= end?
|
|
|
Post by Jim Brain on Mar 24, 2004 0:35:55 GMT -5
I set up your app tonight. Somehow, Win32 can send chars when DTR/RTS are low. I need to figure out how that is done on Linux.
That said, the cable you have will work fine up to 2400 or maybe a bit higher, but higher speeds will need flow control, and your cable design only allows XON/XOFF, which would seem to preclude binary file transfers. Maybe that is not an issue, but it does seem to add a wrinkle.
I noticed that a Swiftlink and a regular null modem cable does not work with the DTR/RTS low options on the SW. The only setting that would allow dialout was DTR/RTS up after X seconds... It seems the 6551 cares about those lines. Your cable above leaves them unconnected, so that will work, but you might want to put that GIF in the distribution, because that exact layout is required. Funnily, the 1101 (I have a Omnitronix, but it's the same idea) user port interfaces don't seem to care about DTR/RTS as much, as I can send/recv chars with that connection fine.
Jim
|
|
|
Post by Jim Brain on Mar 25, 2004 0:22:43 GMT -5
I figured it out. My code has been working all along, it's that special cable you have there that makes it all work... I was using a regular null modem cable, and it will NOT work with a UART cart (SL or T232).
The problem is that in a normal null modem cable, your code (and mine) will set DTR low until a call comes in. In a normal null cable, DTR is hooked to DCD on the other side, which is fine (it would be low until a carrier shows up). But, since it is tied to DSR, the 6551 in the T232 (and SL) will neither accept nor transmit characters.
The solution is either to make a special cable, or (at least on the T232), let DSR float. You can do that on the T232 by opening the case and removing the pin 7/8 jumper on the jumper block.
I'm debating which one to use. I think I will build the cable, but I am going to tie DTR to DCD, but run RTS to CTS on both sides. That way, I can continue to use hardware flow control...
So, this means I can button up my code and publish, for those wanting it.
|
|
|
Post by Jim Brain on Mar 25, 2004 2:55:08 GMT -5
Scratch what I said about the T232 jumper. It didn't do what I thought it would.
However, I was successful tonight.
I took a regular null-modem cable, which has DTR of one side hooked to DSR AND DCD on the other, and I put the jumper from DTR1 to DCD2 on a switch. That way, if you turn it on, you have a regular null modem cable. But, I turned it off, so DSR floats (which it floats high on the T232 and Swiftlink), and DTR of the PC is hooked to DCD on the CBM. Since DTR is rarely used for much, this works fine, and leaves CTS/RTS of each side hooked up. Leif's cable also works the same way. But, the diagram above sacrifices hardware flow control, which must be present at 9600bps+. I tried leaving RTS/CTS off the cable and running DTJBBS at 9600bps. Dropped chars all over the place with a 300MHz PC. I suppose a faster PC would prevent the overruns, but I don't know.
In any case. I am happy tonight.
But, also tired. Time to head to bed.
|
|
|
Post by Dr. Video/ADDiXiON on Apr 3, 2004 16:35:46 GMT -5
Jim,
can you post a diagram of how you did the wiring with that switch? I have a RS232 jumper box that I think would be the best way to make such a cable. All I would do is attach my DB25->DB9 adapter to one end and that goes into the PC. The other end of the jumper box goes into a DB25-DB25 straight passthrough serial cable and it goes to the C64 VIC-1011A. And voila, I should have hardware flow control yes?
|
|