Skip to content

Instantly share code, notes, and snippets.

@mac-can
Last active July 19, 2022 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mac-can/f49862b87541c53c59eaf0b7b2dbe230 to your computer and use it in GitHub Desktop.
Save mac-can/f49862b87541c53c59eaf0b7b2dbe230 to your computer and use it in GitHub Desktop.
PCBUSB Installation

How to install the PCBUSB-Library on Mac

The PCBUSB-Library realizes an USB to CAN user-space driver under macOS for PCAN-USB interfaces from PEAK-System Technik, Darmstadt.

This Gist describes how to install the library.

Download the Library

First download the library either from the MacCAN homepage or from the GitHub repo.

Install the Library

Now open a terminal to extract the artifacts and to install the library.

Note: In the following example I´ve downloaded version 0.11.1 from the MacCAN homepage. makemake is my username, uv-pc014mac the name of my Mac.

Extract the artifacts

If you have downloaded the library as a tarball, type this:

makemake@uv-pc014mac ~ % tar -xvf ~/Downloads/macOS_Library_for_PCANUSB_v0.11.1.tar
x PCBUSB/
x PCBUSB/libPCBUSB.0.11.1.dylib
x PCBUSB/PCBUSB.h
x PCBUSB/LICENSE
x PCBUSB/install.sh
x PCBUSB/README
x PCBUSB/Examples/
x PCBUSB/PCBUSB.c
x PCBUSB/COPYRIGHT
x PCBUSB/Examples/C++/
x PCBUSB/Examples/Python/
x PCBUSB/Examples/Makefile
x PCBUSB/Examples/Python/PCANBasic.py
x PCBUSB/Examples/Python/Makefile
x PCBUSB/Examples/Python/pcbusb_recv.py
x PCBUSB/Examples/C++/Makefile
x PCBUSB/Examples/C++/src/
x PCBUSB/Examples/C++/src/pcbusb_recv.cpp
x PCBUSB/Examples/C++/src/pcbusb_send.cpp
makemake@uv-pc014mac ~ %

If you have downloaded a compressed archive, then run this:

makemake@uv-pc014mac ~ % tar -xzvf ~/Downloads/macOS_Library_for_PCANUSB_v0.11.1.tar.gz
x PCBUSB/
x PCBUSB/libPCBUSB.0.11.1.dylib
x PCBUSB/PCBUSB.h
x PCBUSB/LICENSE
x PCBUSB/install.sh
x PCBUSB/README
x PCBUSB/Examples/
x PCBUSB/PCBUSB.c
x PCBUSB/COPYRIGHT
x PCBUSB/Examples/C++/
x PCBUSB/Examples/Python/
x PCBUSB/Examples/Makefile
x PCBUSB/Examples/Python/PCANBasic.py
x PCBUSB/Examples/Python/Makefile
x PCBUSB/Examples/Python/pcbusb_recv.py
x PCBUSB/Examples/C++/Makefile
x PCBUSB/Examples/C++/src/
x PCBUSB/Examples/C++/src/pcbusb_recv.cpp
x PCBUSB/Examples/C++/src/pcbusb_send.cpp
makemake@uv-pc014mac ~ %

Installation

To install the library you need superuser privileges. Type this:

makemake@uv-pc014mac ~ % cd PCBUSB
makemake@uv-pc014mac PCBUSB % sudo /Users/<your-username>/PCBUSB/install.sh
Password: <your-password>
makemake@uv-pc014mac PCBUSB %

Using the library

That's up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment