macOS Library for PCAN-USB Interfaces
macOS Library for PCAN-USB Interfaces
Developed by UV Software, Berlin.

Running CAN and CAN FD on a Mac


The PCBUSB library realizes a CAN to USB user-space driver under macOS for PCAN-USB interfaces from PEAK-System Technik, Darmstadt. It supports up to 8 PCAN-USB and PCAN-USB FD devices. The library offers an easy to use API to read received CAN messages from a 64K message queue and to transmit CAN messages. Standard CAN frames (11-bit identifier) as well as extended CAN frames (29-bit identifier) are supported. The PCAN-USB FD device can be operated in CAN 2.0 and CAN FD mode.

The library comes with an Objective-C wrapper and a demo App: MacCAN Monitor App Furthermore, it can be used with the Qt Serial Bus API on a Mac.

Mac and macOS are trademarks of Apple Inc., registered in the U.S. and other countries.
PCAN is a registered trademark of PEAK-System Technik GmbH, Darmstadt, Germany.
Qt is a registered trademark of The Qt Company Ltd. and its subsidiaries.

All software offered below are freeware without any warranty or support!

Please note the copyright and license agreements.

Downloads

PCBUSB Library


The PCBUSB library realizes a 'PCAN-USB Driver for macOS' using Apple´s IOUSBKit. The dynamic library libPCBUSB is running under macOS 10.12 and later (x86_64 architecture).

The API is almost compatible to PEAK´s PCANBasic DLL on Windows. See the doxygen documentation and the header-file for details.

Version 0.8 SR1 (Build 787 of September 27, 2019):

  • Adapted trace-file headers to Peak's changes in version 4.3.4.246

Version 0.8 (Build 689 of September 20, 2017):

  • Support of PCAN-USB FD devices in CAN 2.0 mode (CAN classic) and CAN FD mode!
  • Adapted the API according to Peak's changes in version 4.2.0.134 and harmonized return codes with it.
  • Fixed issue #208 'CAN_Write stuck when errors on the bus are present'.
  • Conducted an intermediate solution for issue #246 (writing into a trace file).
  • Added run-path-relative install name to the library (using the @rpath macro).

Version 0.7 (Build 558 of November 30, 2016):

  • Adapted the API according to Peak's changes in version 4.1.0.96 and harmonized return codes with it.
  • Implemented parameter PCAN_CHANNEL_FEATURE and PCAN_BITRATE_INFO.

Version 0.6 (Build 425 of February 20, 2015):

  • Parameter PCAN_RECEIVE_EVENT returns a file descriptor to realize 'blocking read' by select() as on the Linux implementation of the PCAN-Basic API.
  • Added two C++ examples and one Python example using the PCBUSB library

Version 0.5 (Build 370 of November 23, 2014):

  • Feature 'Reading/Writing of parameter PCAN_DEVICE_NUMBER' implemented.
  • Fixed issue #104 'Hot plugging was not detected by the library/driver'.
  • Fixed issue #117 'Permission for libPCBUSB.x.y.lib wrong' (chmod 755).
  • Return codes of API functions harmonized with PCANBasic.dll (1.3.3.61).

Version 0.4 (Build 293 of Febuary 23, 2014):

  • Time-stamps are now taken from CAN controller instead of taking them from the system clock.
  • Getting and setting of PCAN_* parameters reworked (to be almost compatible to the PCANBasic DLL, version 1.3).
  • Resetting of RCV queue and XMT queue on the CAN controller realized.

Version 0.3 (Build 235 of November 2, 2013):

  • Fixed issue #11 'All channel initialized by the application will be closed even if they are in use'.
  • CAN_Unitialize: closing all channel initialized by the application at once implemented.
  • CAN_Read: receive queue overrun handling reworked.
  • CAN_*: wrong function return codes corrected.
  • CAN_GetErrorText: language support for English, German, French, Italian and Spanish added.

Version 0.2 (Build 163 of September 8, 2013):

  • Minor changes

Version 0.1 (Build 149 of June 30, 2013):

  • Initial revision

Older versions of the PCBUSB library can be downloaded from here.

 Download

 Readme

 Show doxygen

MacCAN Monitor App


The MacCAN Monitor App is a demo program to show the functionally of the PCBUSB library.

The program displays received CAN messages in a table view; its size is limited to 1024 rows. Furthermore it is possible to send single standard CAN messages with 0 to 8 data bytes.

Version 0.2 SR4 (Service release of September 21, 2017):

  • Included version 0.8 of the PCBUSB library

Version 0.2 SR3 (Service release of December 1, 2016):

  • Included version 0.7 of the PCBUSB library

Version 0.2 SR2 (Service release of February 21, 2015):

  • Included version 0.6 of the PCBUSB library

Version 0.2 SR1 (Service release of November 24, 2014):

  • Included version 0.5 of the PCBUSB library

Version 0.2 (Release of February 24, 2014):

  • Minor changes (to run with version 0.4 of the PCBUSB library)

Version 0.1 (Release of September 8, 2013):

  • 1st release (demo version)

Older versions of the MacCAN Monitor App can be downloaded from here.

 Download

 Readme

 Play Video

Command-line Tool


If you prefer to work in a terminal session, here is a command-line version of the CAN Monitor application.

The command-line tool 'can_moni' runs as a standalone program, therefor it is not necessary to install the PCBUSB library to run the program.

Version 0.5 (Build 850 of December 1, 2019):

  • Reworked command-line option handling:
  • --listen-only - monitor mode (transmitter is off)
  • --list-boards - list all supported CAN interfaces
  • --test boards - list all available CAN interfaces
  • Compiled against PCBUSB v0.8.1 sources.

Version 0.4 (Build 698 of September 22, 2017):

  • Support of PCAN-USB FD interface.

Version 0.3 (Build 371 of November 23, 2014):

  • Time-stamps are taken from CAN controller.

Version 0.2 (Build 138 of May 17, 2013):

  • Initial revision

Version 0.1 (Build 86 of July 6, 2012):

  • reverted

Older versions of the 'can_moni' tool can be downloaded from here.

A Linux version of the 'can_moni' tool using BerliOS SocketCAN can be downloaded from here.

 Download

 Readme

 Other Stuff

This and That

Qt Integration


The Qt Serial Bus API is delivered with a plug-in for PCAN interfaces by PEAK-System. Under macOS this plug-in uses the PCBUSB library. You can use it to create beautiful Qt applications that run CAN and CAN FD on a Mac with PCAN-USB interfaces The Qt CAN Bus example runs out-of-the-box, it only requires version 0.8.1 of the PCBUSB library being installed.

Many thanks to Miklós Márton fom Digitroll Kft. AG Electronics who patched the PCAN-Plugin for use with macOS. Great job!

MacCAN Monitor App


Play Video

Quick Time Video
Length: 0:00:27 (25MB)
Copyright © 2013 by UV Software, Berlin.

Links

PEAK-System


PEAK-System

You CAN get it...

Hardware, software and system solutions for many sectors including automotive, aircraft, machinery and equipment building and consumer goods.

https://www.peak-system.com


Qt Serial Bus API


Qt

You CAN use it...

The Qt Serial Bus API supports CAN adapters from PEAK-System, among others. Under macOS it requires the installation of the PCBUSB library.

https://doc.qt.io/qt-5/qtserialbus-index.html

Donations


Donations to my work are gratefully welcome.

Contact

© 2012-2020 UV Software, Berlin. All rights reserved. Facebook Twitter Google+ Mail
Privacy Policy Imprint
  2020-01-19