CanFestival86 Library

CanFestival86 is the x86 porting version of CanFestival, which can run on 86Duino One boards with CAN Port.

CanFestival is an open-source CANopen Stack that includes the CANopen CiA DS-301 standard core communication system, the CiA DS-302 Configuration Manager, and CiA DS-305 LSS.

It supports various platforms and can run on PC environments or common Embedded Systems. Now it can run on DMP x86/Dos platform through the CanFestival86 Library.

Source Code

The CanFestival86 source code can be downloaded from the Github page.


The built-in master_node and slave_node example code demonstrates the operation of the CanFestival core.

For detailed installation of the CanFesitval Library, line connections, master_node and slave_node examples, and testing, please refer to the Running the CanFestival86 Example.

CanFestival86 Class

CanFestival86 class packs several important CanFestival functions in a user-friendly way, so that only a few lines of code are needed to run a CanFestival Master or Slave node.

  • bool begin(CO_Data *node_data, unsigned long baudrate);
    Start CAN Bus and Timer and bind to CanFestival node data structure.
  • bool set86NodeId(UNS8 nodeid);
    Set the node CANopen Node-ID.
  • bool set86State(e_nodeState state);
    Set the node CANopen NMT State Machine.
  • void setVerbose(bool is_verbose);
    Set whether to output CanFestival core messages in Serial Monitor. Set is_verbose to true if you want to output messages or false if you’re going to output messages.
  • void dumpRuntimeInfo();
    If you set is_verbose to true with the setVerbose() function, you can call dumpRuntimeInfo() inside the loop() to print out the core message.
  • bool sdo(UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS32 size, void *data, SDOCallback_t Callback = &sdoDefaultCallback);
    CANopen SDO Client function for writing to the object dictionary of other SDO Servers nodes.

Usage Restrictions

The CanFestival86 library uses the 86Duino internal MCM timer in its operation, so it cannot work with other libraries that also use the same MCM timer, such as the TimerOne library.

Libraries Reference Home

The text of the 86Duino reference is a modification of the Arduino reference and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

Leave a Comment

Your email address will not be published. Required fields are marked *