meatpiHQ / meatpi_ollie_v2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Back this project on Crowd Supply!




image

1. Pinout

image

Note: If the switch is set to VT then UARTA/B voltage must be set by target board. Otherwise VT pins will follow the voltage level set by the swtich.

2. Drivers

Windows

Download and extract the ZIP file. After extraction, go to serial folder and run the SETUP.EXE file and click on the "Install" button. Then open the CAN folder right click on MEATPI_CAN.inf and click install.

If the installation is successful, the names of COM ports will change, each corresponding to its function.

image

Linux

UART

Follow the instruction to build and install CH344 linux drivers

Note: By default Ollie-v2 will not work as USB CDC-ACM. If you need to use it as a CDC-ACM device you must remove resistor R20

image

Renaming ports

Download and follow the instructions below.

sudo chmod +x ollie_v2.sh
sudo ./ollie_v2.sh     # This will create /dev/MEATPI-CAN0 /dev/MEATPI-RS232 /dev/MEATPI-RS485 /dev/MEATPI-UARTA /dev/MEATPI-UARTB
sudo slcand -o -s6 /dev/MEATPI-CAN0 can0     # s6: sets the speed to 500 Kbit 
sudo ifconfig can0 txqueuelen 1000
sudo ifconfig can0 up

image

Speed commands:

s1: 20 KBit
s2: 50 KBit
s3: 100 KBit
s4: 125 KBit
s5: 250 KBit
s6: 500 KBit
s7: 800 KBit
s8: 1 MBit

3. CAN

CAN on Windows

You can use BUSMaster for CAN Bus monitoring. Please download this version of BUSMaster provided in the Link above. Here is how to setup the hardware.

  1. Select VSCom CAN-API by clicking on 'Driver Selection -> VSCom CAN-API"
  2. Then Click on 'Channel Configuration -> Advanced'
  3. Click on 'Search for Devices on COM-Ports', the device should appear in the drop downlist or fill the right COM port number
  4. Check the 'Hardware Timestamps' check box.
  5. Choose the Baudrate.
  6. Click 'OK', then Click the Connect button on the top left corner.

image

image

CAN on Linux

SocketCAN is a Linux-based socket interface for CAN bus communication. It provides a standardized API for accessing CAN hardware and a set of utilities for working with CAN devices. SocketCAN supports multiple CAN controllers and can handle different types of CAN buses, such as CAN 2.0A and CAN 2.0B.

Follow the instructions to bring up the CAN interface.

To send a single frame, use the cansend utility:

cansend can0 123#1122334455667788

To display in real-time the list of messages received on the bus, use the candump utility:

candump can0

# can0  123   [8] 11 22 33 44 55 66 77 88

API

About