RTS signal support on COM2

      RTS signal support on COM2

      We are working on some program where we use COM2 for driving RS485 module. The board is ready, but it seems that there is no support for RTS line by driver. We can change the state of the line by using:

      Source Code

      1. EscapeCommFunction(m_hPort, CLRRTS);

      or

      Source Code

      1. EscapeCommFunction(m_hPort, SETRTS);

      But when we try to configure the TOGGLE_RTS mode, the RTS line stays high all the time:

      Source Code

      1. DCB dcb;
      2. ZeroMemory(&dcb, sizeof(dcb));
      3. dcb.DCBlength = sizeof(dcb);
      4. dcb.BaudRate = CBR_19200;
      5. dcb.fBinary = TRUE;
      6. dcb.fParity = TRUE;
      7. dcb.fOutxCtsFlow = FALSE;
      8. dcb.fOutxDsrFlow = FALSE;
      9. dcb.fDtrControl = DTR_CONTROL_ENABLE;
      10. dcb.fDsrSensitivity = FALSE;
      11. dcb.fTXContinueOnXoff = FALSE;
      12. dcb.fOutX = FALSE;
      13. dcb.fInX = FALSE;
      14. dcb.fErrorChar = FALSE;
      15. dcb.fNull = FALSE;
      16. dcb.fRtsControl = RTS_CONTROL_TOGGLE;
      17. dcb.fAbortOnError = TRUE; /* Call ClearCommError on error */
      18. dcb.ByteSize = 8;
      19. dcb.Parity = EVENPARITY;
      20. dcb.StopBits = ONESTOPBIT;


      The same code on "big" PC works fine, so it looks that there is something what we do not know about PicoCOM2 Serial driver.

      Re: RTS signal support on COM2

      It looks like that the RS485 mode is not enable in registry by default. Please enable it by setting the value RS485 to 1 (dword) in registry.
      Software developer, F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

      Re: RTS signal support on COM2

      Please try to apply the following registry modifications:

      Source Code

      1. reg open \Drivers\Builtin\Serial<n>
      2. reg set val RS485 dword 1
      3. reg save
      4. reboot
      Software developer, F&amp;S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.