Site Information

 Loading... Please wait...

Blog

Under Development: Programmable CAN Bus to USB, Bluetooth, BLE, WiFi Gateway

Posted by Wilfried Voss on

For the longest time, I had resisted the idea of creating my version of a CAN-to-USB gateway, primarily due to the vast competition. A professional CAN/J1939 development requires a professional CAN-to-PC solution to monitor data traffic. I am pleased with the PEAK PCAN-USB device, as shown in the above image. However, not everybody is willing (or able) to spend in the neighborhood of $500...$800 for such a commodity. On the other hand, there are lower-priced alternatives, but they usually shine through poorly written firmware and bizarre PC user interfaces. Furthermore, regardless of the price range, most gateways either do not provide a programming interface or are excessively complex.

USB to SAE J1939 Gateway

Consequently, we at Copperhill Technologies will enter the market with a reasonably priced and easy-to-program series of CAN Bus gateways. And since we are using the ESP32 processor for our development, we will offer not only a USB connection but also Bluetooth, BLE, and Wifi. The initial version will support Classical CAN, but we are currently modifying existing hardware to support CAN FD.

The current hardware is the same as for our  SAE J1939-to-USB Gateway (see image to the right). In addition, we are utilizing existing software libraries which helps to shorten the development process.

We use an ASCII-based serial protocol for communication between the gateway and the PC. It loosely resembles the commands and functionality of the LAWICEL CAN232/CANUSB specifications to establish a basic communication format. It uses only a sub-set of the LAWICEL commands but adds new features where necessary (e.g., to support CAN FD features).

Furthermore, the protocol differs from the LAWICEL functionality regarding the command responses. While LAWICEL responds to commands with either CR (ASCII 13 = success) or BELL (ASCII 7 = error), our version responds with the command token (first character of the command line = Success) or 'x' for error, terminated by a CR.

Available ASCII Commands

  • All messages between the gateway and the PC end with [CR] (ASCII 13) and are case-sensitive.
  • All ASCII commands start with a token byte identifying the function.
  • Commands are accepted by repeating the token, while erroneous commands are answered with ‘x’.

Here is a set of available ASCII Commands:

The image below demonstrates a sample to transmit an 11-bit CAN data frame:

The next image (below) shows a test session, where I set the CAN baudrate (S command), opened the CAN port (O command), and sent CAN data frame with an 11-bit message identifier (t command). 

Following these commands are several CAN data frames as received from the PEAK PCAN-USB gateway. These are samples of 11-bit and 29-bit messages.

As part of the delivery, we will provide C source code samples for programming under Linux and C# for Windows demonstrating the process. Finally, a Windows monitor, analyzer, and recording software is in the works, but it will take a few more months before it is ready for release. 

Last, but not least, please feel free to contact us for further information. 


SAE J1939 to USB Gateway in Plastic EnclosureSAE J1939 ECU Simulator and Gateway With USB Port

Our SAE J1939 gateway allows you to monitor, simulate, and record any PGN as defined in the SAE J1939-71 Standard but also including diagnostic messages according to SAE J1939-73. The gateway supports the full SAE J1939 protocol according to J1939/81 Network Management (Address Claiming) and J1939/21 Transport Protocol (TP). It is also supported by an extensive programming interface for Windows and Linux/Ubuntu applications, including full C/C++/C# source code for short time-to-market developments.

More Information...

Mini PCI-E Module Integrates Classical CAN (CAN bus 2.0 A/B, OBDII, SAE J1939), CAN FD, and GNSS features

Antzer Tech, a subsidiary of Innodisk, introduced their GADN-FD7L0 PC interface card, which integrates CAN (CAN bus 2.0 a/b, OBDII, SAE J1939), CAN FD, and GNSS features into one mini PCI-E combo module. The board comes in a standard Mini PCI Express form factor. It supports USB 2.0 and two independent CAN FD ports with data-phase bit [...]

Read More »


Programmable ECU and GPS Modules with Classical CAN, CAN FD, SAE J1939 Connections

PEAK-System presented several innovative I/O products with Classical CAN and CAN FD connections in this year's Embedded World trade show.  The versatile control unit PCAN-MicroMod FD ECU integrates customer-specific accessories for automotive applications. For this purpose, the device offers a CAN FD connection and a combination of analog and digital I/Os. The I/O processing and message [...]

Read More »


ESP32 Triple CAN Bus Application Through Adding Two MCP2515 Ports

The first question that may arise when talking about accessing the MCP2515 CAN Bus controller per ESP32 may be, "Why would you need an MCP2515 controller when the ESP32 comes with an internal CAN port?" Yes, I found this question in one of the online forums while researching this particular topic. The answer is easy: [...]

Read More »


Any CAN Bus, SAE J1939, NMEA 2000 Development Requires the Right Testing Tools

I want to reiterate a point made in a previous post ("A Beginner's Guide to SAE J1939 Embedded Software Development"): When developing and testing your CAN Bus application, may it be Classical CAN, CAN FD, CANopen, SAE J1939, or NMEA 2000, you need to connect your device to a functional network. One solitary node connected to your [...]

Read More »


Host controller with Isolated Classical CAN and CAN FD Interfaces for In-Vehicle Applications

Vecow introduced its EAC-3000 host controller with isolated Classical CAN and CAN FD interfaces, intended for in-vehicle applications, robot control, and automated guided vehicles.Vecow is an American Industrial Systems, Inc. (AIS) company headquartered in Irvine, California, USA. AIS offers in-house electronic and mechanical design, software development, manufacturing, production, and quality control services.The fanless EAC 3000 host [...]

Read More »


Programmable Six-Channel Classical CAN And CAN FD Router Supports I/O And Data Logging

The Six-Channel PCAN-Router Pro FD by PEAK Systems connects the data traffic of modern CAN FD and classic CAN Bus networks. Pluggable CAN Bus transceiver modules provide universal adaptation for each CAN-Bus channel to match their individual requirements. In addition, the router comes with an analog input and four digital I/Os. The CAN Bus data traffic can [...]

Read More »


SAE J1939 vs. CAN Bus - What's the Difference?

To say it upfront, the difference between SAE J1939 and CAN Bus (Classical CAN and CAN FD) has all to do with so-called "Higher Later Protocols (HLP)," and SAE J1939 is one of them. I have written a post about HLPs (see: Guide to SAE J1939 - CAN Bus Higher Layer Protocols), but I would like [...]

Read More »


Classical CAN, CAN FD, And LIN Kit Simulates Devices And Networks For SAE J1939, NMEA 2000, CANopen

Warwick Control Technologies has released a development kit that enables users to simulate Classical CAN, CAN FD, and LIN devices and networks. It also supports the simulation of SAE J1939, NMEA 2000, and CANopen devices and networks. The kit comes with the Kvaser Hybrid Pro two-channel interface to test Classical CAN, CAN FD, and LIN systems through [...]

Read More »


Industrial CAN Bus Gateway Data Logger, Bridge, And Network Extender With EtherCAT Connection

HMS Networks introduced the IXXAT CANnector solution for logging, bridging, and extending Classical CAN Bus and CAN FD networks. The device complements and is compatible with the existing CAN@net NT and CANbridge NT series. Three pre-configured versions are available in addition to a generic stand-alone device (no PC is needed). The CANnector supports the transmission of CAN/CAN [...]

Read More »