|
don't worry, one day you will grow old and
1. have "trouble remembering dates"
2. have plenty of old stories of when 'she wasn't happy with what you got' so you're taking the safe option
3. not really give a sh*t because it's only retail hype
4. have a backache (women have headaches, men have backaches - because we do proper hard work.)
anyway if the above doesn't fully wash you can make up for it later ... when prices of respective gifts are more sane and/or restaurants aren't jammed up with long waiting queue's...
Message Signature
(Click to edit ->)
|
|
|
|
|
Or plan ahead: buy it on the 15th and give it to her next year* ...
* Note that this is unlikely to work with Roses.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Lopatir wrote: women have headaches, men have backaches - because we do proper hard work. Hey - they'd argue that they use if for 'hard work', too . . . KSS unless you explain it to them . . .
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
It's not a programming question
Maybe someone's serial cable fu is better than mine. I'm looking for some practical insight on serial communications at the PC level. Older machines, larger boxes may still have built in com ports exposed at the back, but most of us are living in the land of usb to serial. For the sake of discussion, the ports in use are confirmed to have the same settings - 9600 baud, 8 bit, 1 stop bit, no handshake or anything else....
Living in the embedded world, we'll solder up a home made serial cable in a few minutes - DB9 to DB9 - connector pins 2-3, pin 5 for the ground (swapping pin 2 and 3 gives you a null modem cable). On the embedded hardware, this is typically all we need to do... but I'm finding PC level usage of this hand crafted cable problematic. If I take a typical null modem cable: 10 ft DB9 RS232 Serial Null Modem Cable | Null Modem Serial Cables | StarTech.com[^] everything works fine.
If I take my stripped down special, no communications. I've verified that both cables are wired the same - with the exception that the commercial product connects the other 6 pins according to standards. I've been told these other connections are not necessary, but said engineers are talking to embedded hardware not another PC.
Wondering if an CP folks have some practical scars and insights in this area that would shed some light on this behavior. I'm going to tell the customer to go buy a serial cable, but now I'm curious.
thanks
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
|
I agree completely. Some of the USB to serial adapters are dicey and of dubious quality. I pretty much stick with TrendNet devices. Not the cheapest, but they've never burned me yet.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
You might have a break in your cable.
Have you a continuity tester? Check pin to pin for no resistance/breaks.
Your wiring is good, if you arent using CTS/RTS DTR/DSR framing, you only need ground and data rx/tx wired, in cross over, as you have done.
|
|
|
|
|
Cable is good, already ohm'ed it out. You're repeating what I've been told, hence the mystery.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
In that case the app you are using is doing framed packets, RTC/CTS stuff for example.
|
|
|
|
|
fwiw, I own both ends of the connection hence the mystery......
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Well your app/transport layer has to be using RTS/CTS DCD/DTR then. THat can be the only explanation.
|
|
|
|
|
People ask me why I still hang on to my breakout boxes, you just never know... I do agree with Munchies_Matt though, it's probably a hardware handshake issue.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
charlieg wrote: Older machines, larger boxes may still have built in com ports exposed at the back, but most of us are living in the land of usb to serial.
surprisingly even the latest motherboards often have a serial header - pretty standard layout, it's the case manufacturers that don't provide the header. I believe there are headers out that that just replace one of the expansion card slot covers with a DB9/25 and plug via a short ribbon into the mobo header.
Another option I've seen used are boxes that connect serial via network (RJ11/45 one side, 9 pin t'other)
- really handy for connecting remote items (i.e. old manufacturing equipment) where there's already network cables/routers running nearby.
- usually have a web interface for setting the serial options as well as IP address etc (no need to fart about with dip switches)
- have a few different modes of operation... the easiest is it makes the device look like any other TCP/IP connection/stream (as a TCP/IP client)
- all the serial madness set/hidden in the web interface = (in above mentioned mode) no need to use for example the .Net Serial Comms API which [BTW, barely maintained] although not bad does have quirks - particularly if the device/cabling is a bit flaky or keeps dropping/closing the serial link.
Message Signature
(Click to edit ->)
modified 14-Feb-19 10:22am.
|
|
|
|
|
Hi Charlie,
AFAIK you have to connect RTS / CTS, this is a hardware-Handshake.
Have a Look to Wikipedia for an Explanation
Greetings,
Klaus
|
|
|
|
|
I made a bunch of various such cables back in the 90s, and three-wire doesn't always get the job done.
Not everything I had to connect used EIA 232 (RS-232). All of our terminal servers were from DEC so EIA 423 (DECconnect) was most common and there were also some others.
Eventually I wrote up a Word document with all the pinouts I knew and the types of cross-wirings I had to make. I still have the document, but some of the diagrams are missing because I hadn't inserted them properly.
The last time I had to make such a cable was to connect a DB9 RS-232 USB adapter to the MMJ DECconnect console of one of my AlphaServers and it didn't work reliably as three-wire. It doesn't help that the MMJ console port is flaky.
modified 14-Feb-19 12:28pm.
|
|
|
|
|
It depends on the pin-out of whatever you're connecting it to -- "standards" is often considered an optional term, in serial comms.
RS232 only uses three wires, but not every manufacturer always uses the same pins.
What I often do is cut the end off an RJ45 (Ethernet-style) cable, and solder it up to the pins of the DB9 or whatever as described in the manual for the serial device (or by using a meter to find which pins are used).
You can afford a bit of trial and error (mixing up Tx and Rx is quite easy, because a wire that's Tx at one end is Rx at the other, and the documentation for serial devices can be confusing, on that point), because it's only comms voltage, so you won't burn anything out.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
RS232 is actually an electrical/mechanical specification, within that you can use as many of the pins as you like, depending on the protocol used, such as SDLC requiring CTS/RTS framing.
|
|
|
|
|
What piece of software are you using on PC side?
In one of our legacy app we are using the WIN32 API to control the COM port. Since USB2Serial Adapter we made the often the expierience that we need additional to ...
dcb.fInX = 0;
dcb.fOutX = 0;
... where dcb which is explained here: _DCB | Microsoft Docs[^]
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
I know that link well. On one side is a win32 bastard on WEC7 (as well as CE 5.0). The other side is a PC (Xp, Win7, Win10) - very generic. Since the same API is supported it's pretty much the same.
We're at very, very basic settings.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Ah yes, the DCB When I inherited this code, no one thought to initialize that structure before use....
The s/w on the PC side is a simulation test tool (implements communications protocol for some ancient piece of equipment). I have full control over it. I'll see what's going on over there...
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
good luck
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
You still need to wire up a few more pins.
RS-232 and RS-422[^]
3/4's of the way down are diagrams for null modem / crossover cables. See also the diagram after the null model cable, on the software handshaking cable. Even if you don't use software handshaking, wiring it up that way is a good idea.
Latest Article - Slack-Chatting with you rPi
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
I have a date with my soldering iron on Saturday. It's okay. The wife of 40+ years will be working, and it's going to rain where I live.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Yeah - I should know that list of alternate null modems by heart; in the 1990s I was teaching that stuff to engineering students. All the different alternatives for flow control.
Soldering it was a minor problem, compared to making the students understand the need for flow control - and the need for so many different mechanisms. With X-ON / X-OFF (software control) coming in as yet another alternative.
The survey you link to is a good description of the issues. Recommended reading for anyone who needs to use COM port communication anno 2019.
|
|
|
|
|
It's going to depend on how the software on the computer side sets up the port. If it sets it up such that it needs to see some particular signal line enabled before it will talk, then you will have to set up that line and enable it on your side.
Or, if it's doing that, it may also be enabling an outgoing one as well. If so, you can always just loop that one back on the one it wants to see high, allowing it basically to enable itself. So wire RTS to CTS and/or DTR to DSR. Most likely the former I would guess.
|
|
|
|