PymateIO-CAN-Scan

From pymate.io wiki
Revision as of 02:23, 24 May 2026 by Dodomi (talk | contribs) (Created page with "{{PYMATE-HEADER}} == Introduction == The core {{fname|tools}} library includes the {{fname|scan_can()}} function querying the Pymate Expansion board then returning their informations. The scan result is returned within the REPL session == Scan everything == The simplest is to scan the entire board_id space (1..127). <nowiki>>>> scan_can() --- Pymate CAN scanner --- scan 1... ---------------------------------------- Board_ID : 0x4 (4) CanIO API version : 4 C...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Introduction

The core tools library includes the scan_can() function querying the Pymate Expansion board then returning their informations.

The scan result is returned within the REPL session

Scan everything

The simplest is to scan the entire board_id space (1..127).

>>> scan_can()
--- Pymate CAN scanner ---
scan 1...
----------------------------------------
Board_ID          : 0x4 (4)
CanIO API version : 4
CanServer version : 0.2.1
machine uname     : PYMATE 16ADI16DO V0.1.0a with STM32F411RE
#CANIO_IN        : 16 (alternate: 0)
#CANIO_ADC       : 16 (alternate: 0)
#CANIO_OUT_PP    : 16 (alternate: 2)
----------------------------------------
scan 10...
scan 20...
scan 30...
scan 40...
scan 50...
scan 60...
scan 70...
scan 80...
scan 90...
scan 100...
scan 110...
scan 120...
scan 127...

Scan range

Is is also possible to scan a smaller board_id range scan_can(from_id, to_id) .

The following example scans from_id=4 to to_id=4

>>> scan_can(4,4)
--- Pymate CAN scanner ---
----------------------------------------
Board_ID          : 0x4 (4)
CanIO API version : 4
CanServer version : 0.2.1
machine uname     : PYMATE 16ADI16DO V0.1.0a with STM32F411RE
#CANIO_IN        : 16 (alternate: 0)
#CANIO_ADC       : 16 (alternate: 0)
#CANIO_OUT_PP    : 16 (alternate: 2)
----------------------------------------
>>>

Error

OSError 110


PymateIO all right reserved © 2026 - Written by MCHobby for PymateIO