Skip to content

Which socketcan interface to use not correctly identified #120

Closed

Description

@remusmp

Hi,

I've installed the latest python-can package this way:

pip3 install git+https://github.com/hardbyte/python-can.git

In pip list it appears as 2.0.0a1.

Then I typed in these commands in a python terminal:

Python 3.5.2 (default, Nov 17 2016, 17:05:23) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import can
>>> can.rc['interface'] = 'socketcan'
>>> bus = can.interface.Bus()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/can/interfaces/interface.py", line 79, in __new__
    raise NotImplementedError("CAN interface '{}' not supported".format(interface))
NotImplementedError: CAN interface 'socketcan' not supported

I'm able to see the CAN bus under Linux via candump (I have installed all necessary modules). Here is an example:

candump slcan0
  slcan0  001   [4]  1B 00 00 00
  slcan0  002   [2]  38 13
  slcan0  001   [4]  1B 00 00 00

Activity

  1. hardbyte commented on Jan 23, 2017

    @hardbyte
    Owner

    Thanks for the report - I'll have a look into it. Would you mind trying with the value socketcan_native?

  2. remusmp commented on Jan 24, 2017

    @remusmp
    Author

    This works:

    import can
    can.rc['interface'] = 'socketcan_native'
    can.rc['channel'] = 'slcan0'
    bus = can.interface.Bus()
    

    Once again thanks!

  3. self-assigned this
    on Jan 24, 2017
  4. changed the title [-]Is Linux socketcan interface not supported?[/-] [+]Which socketcan interface to use not correctly identified[/+] on Jan 24, 2017
  5. added this to the 2.0 Release milestone on Jan 24, 2017
  6. added a commit that references this issue on Jan 25, 2017
    a9d51a8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions