Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Serial cables... serial communications

Serial cables... serial communications

Scheduled Pinned Locked Moved The Lounge
hardwarecomsaleshelpquestion
38 Posts 20 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R RickZeeland

    In the past my colleagues were not enthousiastic about virtual solutions and USB to Serial cables, they preferred a PCI express card instead: Amazon.com: StarTech.com PCI Express Serial Card - 2 Port - Dual Channel 16C1050 UART - Serial Port PCIe Card - Serial Expansion Card: Computers & Accessories[^]

    C Offline
    C Offline
    charlieg
    wrote on last edited by
    #7

    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

    1 Reply Last reply
    0
    • C charlieg

      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

      J Offline
      J Offline
      jeron1
      wrote on last edited by
      #8

      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

      1 Reply Last reply
      0
      • C charlieg

        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

        K Offline
        K Offline
        Klaus Werner Konrad
        wrote on last edited by
        #9

        Hi Charlie, AFAIK you have to connect RTS / CTS, this is a hardware-Handshake. Have a Look to Wikipedia for an Explanation Greetings, Klaus

        1 Reply Last reply
        0
        • C charlieg

          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

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #10

          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.

          1 Reply Last reply
          0
          • C charlieg

            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

            M Offline
            M Offline
            Mark_Wallace
            wrote on last edited by
            #11

            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!

            M 1 Reply Last reply
            0
            • C charlieg

              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

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #12

              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

              C 2 Replies Last reply
              0
              • M Mark_Wallace

                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!

                M Offline
                M Offline
                Munchies_Matt
                wrote on last edited by
                #13

                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.

                1 Reply Last reply
                0
                • C charlieg

                  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

                  M Offline
                  M Offline
                  Marc Clifton
                  wrote on last edited by
                  #14

                  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

                  C K 2 Replies Last reply
                  0
                  • M Munchies_Matt

                    In that case the app you are using is doing framed packets, RTC/CTS stuff for example.

                    C Offline
                    C Offline
                    charlieg
                    wrote on last edited by
                    #15

                    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

                    M 1 Reply Last reply
                    0
                    • L Lost User

                      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

                      C Offline
                      C Offline
                      charlieg
                      wrote on last edited by
                      #16

                      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

                      1 Reply Last reply
                      0
                      • M Marc Clifton

                        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

                        C Offline
                        C Offline
                        charlieg
                        wrote on last edited by
                        #17

                        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. :laugh:

                        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

                        1 Reply Last reply
                        0
                        • C charlieg

                          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

                          D Offline
                          D Offline
                          Dean Roddey
                          wrote on last edited by
                          #18

                          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.

                          1 Reply Last reply
                          0
                          • C charlieg

                            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

                            L Offline
                            L Offline
                            lowracer
                            wrote on last edited by
                            #19

                            Years ago I bought 100m normal twin flex (2 wires only) and cut it into 2 pieces - a 75m and a 25m. Soldered them booth up to db25 connectors (pin 2 to 3 and pin 3 to 2 ; no pin 5) used both with laplink, the 25m at work (office to office) and the 75m between my flat on the 4th floor and a friend on the 2nd floor in the next building of flats. worked fine. (well, lost a serial card, you tend to forget that it is connected. there was some lightning in the surrounds, and the computer shut down a second or two before I heard the thunderclap. Fortunately only the serial card was lost - The computer started up normally when the serial card was removed)

                            1 Reply Last reply
                            0
                            • C charlieg

                              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

                              M Offline
                              M Offline
                              Munchies_Matt
                              wrote on last edited by
                              #20

                              Well your app/transport layer has to be using RTS/CTS DCD/DTR then. THat can be the only explanation.

                              1 Reply Last reply
                              0
                              • C charlieg

                                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

                                M Offline
                                M Offline
                                Member 9167057
                                wrote on last edited by
                                #21

                                Two most common causes of mistakes I've faced: 1. Cable crossed or straight. That ties in neatly into male vs. female connectors. At the end, I've built myself an own cable tester to find out which is straight and which is crossed. 2. Hardware flow control lines. Some devices use them, some don't and if a device uses that, you better solder the lines in place.

                                1 Reply Last reply
                                0
                                • C charlieg

                                  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

                                  J Offline
                                  J Offline
                                  JohnDG52
                                  wrote on last edited by
                                  #22

                                  If you can get at the comm port settings, set Handshaking to NONE. It should then ignore everything except the RX/TX.

                                  K 1 Reply Last reply
                                  0
                                  • J JohnDG52

                                    If you can get at the comm port settings, set Handshaking to NONE. It should then ignore everything except the RX/TX.

                                    K Offline
                                    K Offline
                                    kalberts
                                    wrote on last edited by
                                    #23

                                    Remember to cross your fingers as well, hoping for the receiver always being ready to pick up another byte when the sender insists on transmitting it. Flow control was included for a reason. Sure, most of our modern CPUs are so fast that they can "always" keep up with a COM port, but if it in exceptional cases are busy with something else, it is still nice to be able to tell the sender "Could you hold it for a little while?"

                                    J 1 Reply Last reply
                                    0
                                    • K kalberts

                                      Remember to cross your fingers as well, hoping for the receiver always being ready to pick up another byte when the sender insists on transmitting it. Flow control was included for a reason. Sure, most of our modern CPUs are so fast that they can "always" keep up with a COM port, but if it in exceptional cases are busy with something else, it is still nice to be able to tell the sender "Could you hold it for a little while?"

                                      J Offline
                                      J Offline
                                      JohnDG52
                                      wrote on last edited by
                                      #24

                                      If I have the option - and flow control is needed, I prefer to use software handshaking (XON/XOFF)

                                      K 1 Reply Last reply
                                      0
                                      • M Marc Clifton

                                        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

                                        K Offline
                                        K Offline
                                        kalberts
                                        wrote on last edited by
                                        #25

                                        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.

                                        1 Reply Last reply
                                        0
                                        • C charlieg

                                          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

                                          P Offline
                                          P Offline
                                          Peter Shaw
                                          wrote on last edited by
                                          #26

                                          I've read through everything, and I'll suggest the one thing that noe one else has :-) You said you have a number of pins not connected right? WOuld they at all happen to all be grounds? A 10ft cable that's NOT properly shielded will loose quite a lot to stray radio waves in the surrounding environment. I have a 10 meter one that I can drop down out of my Loft hatch and into my PC in the office below, fro when I need to reprogram the switch in my server rack. Over the years, it's starting to get old, and I can tell straight away when the shielding is starting to come loose. The shorter the cable is, the less shielding matters, the GPS plugged into my PC for example has a really thin unshielded cable on it, but it's only a meter in length, the switch programming cable is a nightmare, we have so much wireless kit in our house with Phones, Thermostats, WiFi based TV's and Wifi capable smoke alarms that it's often better for me to find the shorter cable and drag either the PC system unit or one of the older laptops with a 9 pin on up intot he loft and do the work up there. Cisco flat cables with an RJ45 on that are longer than about 3 meters are terrible, they pick up all kinds of crap, so much so I have some old ferrite chokes lying around that I salvaged from old electronics, and wraping the cable through them a couple of times, one at each end near the plugs, usually helps a lot.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups