neoVI PI
All DocsProductsLearning CenterSupport
  • neoVI PI
  • Safety and Other Important Notices
  • Introduction and Overview
  • A Tour of neoVI PI Hardware
  • How to flash the neoVI PI CM4
  • Disassemble & Reassemble neoVI PI
  • Software Setup
    • Python API
    • SocketCAN Kernel
  • Control membrane LEDs and Trigger Button
  • Reference: Connector Pinouts and Cable Signal Mappings
  • Support Contact Information
Powered by GitBook
LogoLogo

Applications

  • Cybersecurity
  • Data Logging
  • Simulate ECU Functions
  • Diagnostics, Testing and Validation

Products

  • Vehicle Network Adapters
  • Data Loggers
  • Software
  • Automotive Ethernet Tools

Support

  • Support Resources
  • Contact Support
  • Class Schedule & Registration
  • Training Video Library

Company

  • About
  • News
  • Events
  • Contact Us

Copyright © 2025 | All Rights Reserved

On this page
  • Receive Messages
  • Transmit Messages
Edit on GitHub
  1. Software Setup

Python API

PreviousSoftware SetupNextSocketCAN Kernel

Last updated 7 months ago

Receive Messages

Use this function to Receive CAN messages

def receive_can(device):    
    msgs, error_count = ics.get_messages(device)
    print("Received {} messages with {} errors.".format(len(msgs), error_count))
    for i, m in enumerate(msgs):
       print('Message #{}\t'.format(i+1), end='')
       print('\tArbID: {}\tData: {}'.format(hex(m.ArbIDOrHeader), [hex(x) for x in m.Data]))

Transmit Messages

Use this function to Transmit CAN messages

def transmit_can(device):
    msg = ics.SpyMessage()
    msg.ArbIDOrHeader = 0x01 # CAN Arbitration ID
    msg.Data = (1,2,3,4,5,6,7,8) # Data Bytes go here
    msg.NetworkID = ics.NETID_HSCAN # First channel of CAN
        # msg parameter here can also be a tuple of messages
    ics.transmit_messages(device, msg)

You can read the full documentation for libicsneo at and Python documentation at .

https://libicsneo.readthedocs.io/en/latest/
https://python-ics.readthedocs.io/en/2.15/