Skip to content

Windows 10 Permission Error 13 #7

@hf81-ble

Description

@hf81-ble

I ran into issues with the demo Sample on a lawicel CANUSB Dongle.

using slcan with COM10 on windows.

Testcase looks like

*** Settings ***
Resource      CURF/keywords/curf.robot
Test Setup      Set CAN Bus ${INTERFACE} ${CHANNEL} ${BITRATE} ${DB FILE} 
Test Teardown   End Log Can 
Library    DateTime

*** Variables ***
${DB FILE}              None
${INTERFACE}            slcan
${CHANNEL}              COM10
${BITRATE}              500000
${DEFAULT TIMEOUT}      3
${DEFAULT NODE}         DRIVER


*** Test Cases ***
Log Next Raw Frame
    ${Next_Frame} =     Get Next Raw Can Frame
    Log       ${Next_Frame}

The Output is:

robot can.robot

==============================================================================
Can
==============================================================================
Log Next Raw Frame                                                    | FAIL |
Setup failed:
SerialException: could not open port 'COM10': PermissionError(13, 'Zugriff verweigert', None, 5)

Also teardown failed:
AttributeError: 'Curf' object has no attribute 'notifier'

If i use the python-can directly, i have no issues to send a message over can:

import can
can.rc['interface'] = 'slcan'
can.rc['channel'] = 'COM10'
can.rc['bitrate'] = 500000
from can.interface import Bus

bus = can.interface.Bus(bustype="slcan", channel="COM10") 

tx_msg = can.Message(
    arbitration_id=0x01,
    data=[0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88],
 )
bus.send(tx_msg)

print("Stopped sending messages")

I looks like this is not a general problem on sending can messages from windows with the device.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions