CANhack.de CAN-Interface RKS+CAN
CAN Hardware, CAN Software, CAN Protocols - CAN Bus Forum for Your CAN Bus Project.

RKS+ CAN Drivers, API & Documentation

 
New Topic Reply 🔗 🖨 CANhack.de - Index » CANhack.de CAN-USB System: RKS+CAN
Author Message
Bollwing



Joined: 08/10/2013
Posts: 8
Karma: +0 / -0   Thank you, like it!


Premium Support

Post19-12-2014, 13:41    Subject: RKS+ CAN Drivers, API & Documentation Quote

Hello,

I have now ordered and received the RKS+CAN from you. Thank you for the really fast processing and delivery!

* I have already installed KCANMonitor in advance.
* I installed the drivers yesterday (I made sure to select the correct device by using the "RKS+CAN-zadig.cfg" configuration file).
* I also tried it with the Windows drivers.

In my Device Manager, the cable is listed as "RKS VCP" instead of "Kaufmann RKS+CAN VCP," as shown in your screenshots.
I can't configure the port for the device cable in Device Manager.

I am using Windows 8.1 Professional 64-bit.

What else can I try next?

Best regards.
Gerald.


Translated on 26-07-2026, 10:51.
Back to top Profile PM
CAN-Diagnose
Administrator
Administrator
Avatar-CAN-Diagnose

Joined: 06/07/2011
Posts: 573
Karma: +29 / -0   Thank you, like it!
Location: Ländle



Post19-12-2014, 14:12    Subject: RKS+ CAN Drivers, API & Documentation Quote

Hello Gerald,

Windows 8.1 does not support virtual serial ports without a Microsoft certificate (the last version of Windows that supported this was Windows 7). Therefore, the entry in Device Manager can be ignored.
This has no effect on the functionality. The hardware provides two interfaces: a "virtual serial port" and an interface that can be used, for example, with WinUSB or the driver DLL.

KCANMonitor or KOBD2Check both use the WinUSB interface via a DLL. The virtual serial port is only intended for Linux and the Apple operating systems.
In the future, the virtual serial interface will be an optional feature that can be configured, and it will be disabled by default.

With the WinUSB driver, you can do anything you want, and even better than before.

For your own applications, it is generally recommended to use the provided DLL (see also the "Example" sample program) rather than trying to reinvent the wheel.

In the example program, you can directly read and send messages from the CAN bus without having to worry about any COM ports, which may vary on each computer: See the function `void CExampleDlg::OnBnClickedButtonCan()` in `ExampleDlg.cpp`.

Code:
if(RKSInitialize())
  {
    RKSSetTimeouts(200, 1000);

    if(RKSCANOpen(m_iBitRate))
    {
      int i, j;
      CString strTmp, strData;
      can_msg_t sRx;
      can_msg_t sTx;

      m_strOutput += "\r\nOpened CAN...\r\n";
      UpdateData(FALSE);

      for(i = 0; i < 20; i++)
      {
        if(RKSCANRx(&sRx))
        {
          // Build data byte string
          strData.Empty();
          for(j = 0; j < sRx.uFrm.sData.byDLC; j++)
          {
            strTmp.Format(" %02x", sRx.uFrm.sData.abyData[j]);
            strData += strTmp;
          }

          // Build rest of can string
          strTmp.Format("Reading ID: 0x%x, length: %d, data:%s\r\n", sRx.uFrm.sData.dwID, sRx.uFrm.sData.byDLC, strData);
          m_strOutput += strTmp;
          UpdateData(FALSE);
        }

        // else ... (Read queue was empty)

      }

      /* Example
         DO NOT SEND NONSENSE TO CAN SYSTEMS OR YOU MAY GET UNEXPECTED RESULTS!

      sTx.byType = FRAME_TYPE_NORMAL;
      sTx.uFrm.sData.dwID = 0x333;
      sTx.uFrm.sData.byDLC = 4;
      memcpy(&sTx.uFrm.sData.abyData[0], "abcdefgh", 4);
     
      if(RKSCANTx(&sTx)) */
      if(1)
      {
        m_strOutput += "\r\nOne frame NOT sent (for safety reasons, check code)!\r\n";
        UpdateData(FALSE);
      }

      RKSCANClose();
      m_strOutput += "\r\nClosed CAN bus.\r\n";
      UpdateData(FALSE);           
    }
  }
  RKSFree();


The key aspect is the following process:
Code:

RKSInitialize();
RKSCANOpen(gewünschte Bitrate);
solange etwas gemacht werden soll...
{
  RKSCANRx(Pointer auf CAN-Frame Variable); bzw. RKSCANTx(Pointer auf CAN-Frame Variable);
  ... was auch immer empfangen/gesendet oder mit dem Nachrichteninhalt gemacht werden soll...
}
RKSCANClose();


Best regards, Rainer.
Dipl.-Ing. (FH) Rainer Kaufmann - Embedded Software Freelancer
System RKS+CAN: CANHack.de CAN-Bus Interface


Translated on 26-07-2026, 10:54.
Back to top Profile PM WWW

Ratings - RKS+ CAN Drivers, API & Documentation

Average rating: 0.00 - worst rating: 0 - best rating: 0 - number of ratings: 0 - View ratings

You are not authorized to rate this topic. Danke sagen
New Topic Reply 🔗 🖨 CANhack.de - Index » CANhack.de CAN-USB System: RKS+CAN
Similar articles and topics
Topic Forum
No new posts Driver wanted!! CANhack.de CAN-USB System: RKS+CAN
No new posts Looking for: Linux drivers for ARM processor CANhack.de CAN-USB System: RKS+CAN
No new posts D2XX Drivers: Custom Software Solutions CANhack.de CAN-USB System: RKS+CAN
No new posts Important: CAN to USB Interface RKS+CAN, Developer Info & Drivers CANhack.de CAN-USB System: RKS+CAN
Jump to:  
You cannot post new topics in this forum.