Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem on Mac book pro (M1 Pro chip) #20

Open
grougnach opened this issue Mar 5, 2023 · 2 comments
Open

Problem on Mac book pro (M1 Pro chip) #20

grougnach opened this issue Mar 5, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@grougnach
Copy link

Hello,

I have sent you an email directly and you kindly reply, but because I still have the problem, I found it could be a good idea to fill in an issue ?

I am trying to make my Kvaser Leaf work on my Mac M1 on Ventura, but I get this output

CAN API V3 for Kvaser CAN Interfaces, Version 0.3.1 (0xaaa925f)
myDriver.GetProperty(CANPROP_GET_SPEC): value = 3.0
myDriver.GetProperty(CANPROP_GET_VERSION): value = 0.3
myDriver.GetProperty(CANPROP_GET_PATCH_NO): value = 1
myDriver.GetProperty(CANPROP_GET_BUILD_NO): value = aaa925f
myDriver.GetProperty(CANPROP_GET_LIBRARY_ID): value = 600
myDriver.GetProperty(CANPROP_GET_LIBRARY_DLLNAME): value = 'libUVCANKVL.dylib'
myDriver.GetProperty(CANPROP_GET_LIBRARY_VENDOR): value = 'UV Software, Berlin'
Loading the MacCAN driver...
- Run loop started so notifications will be received
+++ Unable to open device #0 (device not present)
+++ MacCAN-Core: device could not be opened (00)
+++ error: myDriver.InitializeChannel(0) returned -95
Cheers!
Program ended with exit code: 161

I have made tests with :

  • Memorator pro 5 5xHS : EAN 73-30130-00778-9
  • USBcan leaf 4xHS : EAN 73-30130-00831-1
  • USBcan Light 2xHS : EAN 73-30130-00714-7
    And on :
  • MacBook Pro
  • Apple M1 Pro
  • Ventura 13..1

Any idea ?

Thanks for your help and the work done !

Jacques

@grougnach
Copy link
Author

grougnach commented Mar 5, 2023

Hello,

My bad, I read the code and discovered that at least memorator is not supported !! and Leaf 4HS neither.
I am trying to add them but can only get one channel that is detected.
Can you provide clues to make it work ?
Jacques

With 1 channel seems to be OK :

CAN API V3 for Kvaser CAN Interfaces, Version 0.3.1 (0xaaa925f)
myDriver.GetProperty(CANPROP_GET_SPEC): value = 3.0
myDriver.GetProperty(CANPROP_GET_VERSION): value = 0.3
myDriver.GetProperty(CANPROP_GET_PATCH_NO): value = 1
myDriver.GetProperty(CANPROP_GET_BUILD_NO): value = aaa925f
myDriver.GetProperty(CANPROP_GET_LIBRARY_ID): value = 600
myDriver.GetProperty(CANPROP_GET_LIBRARY_DLLNAME): value = 'libUVCANKVL.dylib'
myDriver.GetProperty(CANPROP_GET_LIBRARY_VENDOR): value = 'UV Software, Berlin'
Loading the MacCAN driver...
- One device added at location 01100000
- Device #0: Kvaser Memorator Pro 5xHS
- Properties: vendor = bfd, product = 104, release = 0001, speed = 2
- Run loop started so notifications will be received
+ Device #0: asynchronous event source added to run loop
- Message pipe of size 512 bytes
- Message queue for 65536 elements of size 88 bytes
- Double buffer each of size 512 bytes for endpoint #1
Initializing Kvaser Memorator Pro 5xHS driver...
Kvaser Memorator Pro 5xHS (device #0): stop chip (go bus OFF)
Kvaser Memorator Pro 5xHS (device #0): set driver mode NORMAL
Kvaser Memorator Pro 5xHS (device #0): trigger chip state event
myDriver.InitializeChannel(0): status = 0x80
myDriver.GetProperty(CANPROP_GET_NUM_CHANNELS): value = 1
myDriver.GetProperty(CANPROP_GET_CAN_CHANNEL): value = 0
myDriver.GetProperty(CANPROP_GET_DEVICE_TYPE): value = 78
myDriver.GetProperty(CANPROP_GET_DEVICE_NAME): value = 'Kvaser Memorator Pro 5xHS'
myDriver.GetProperty(CANPROP_GET_DEVICE_VENDOR): value = 'Kvaser AB, Sweden'
myDriver.GetProperty(CANPROP_GET_DEVICE_DLLNAME): value = '(driverless)'
myDriver.GetProperty(CANPROP_GET_CAN_CLOCK): value = 80000000
myDriver.GetProperty(CANPROP_GET_OP_CAPABILITY): value = 0xCF
myDriver.GetProperty(CANPROP_GET_OP_MODE): value = 0x00
myDriver.StartController: status = 0x00
Op.-Mode: 0x00 (fdoe=0,brse=0,niso=0,shrd=0,nxtd=0,nrtr=0,err=0,mon=0)
Baudrate: [email protected]% (f_clock=80000000,nom_brp=20,nom_tseg1=13,nom_tseg2=2,nom_sjw=1,nom_sam=0)
Press Ctrl+C to abort...

But with 5 :

CAN API V3 for Kvaser CAN Interfaces, Version 0.3.1 (0xaaa925f)
myDriver.GetProperty(CANPROP_GET_SPEC): value = 3.0
myDriver.GetProperty(CANPROP_GET_VERSION): value = 0.3
myDriver.GetProperty(CANPROP_GET_PATCH_NO): value = 1
myDriver.GetProperty(CANPROP_GET_BUILD_NO): value = aaa925f
myDriver.GetProperty(CANPROP_GET_LIBRARY_ID): value = 600
myDriver.GetProperty(CANPROP_GET_LIBRARY_DLLNAME): value = 'libUVCANKVL.dylib'
myDriver.GetProperty(CANPROP_GET_LIBRARY_VENDOR): value = 'UV Software, Berlin'
Loading the MacCAN driver...
- One device added at location 01100000
- Device #0: Kvaser Memorator Pro 5xHS
- Properties: vendor = bfd, product = 104, release = 0001, speed = 2
- Run loop started so notifications will be received
+ Device #0: asynchronous event source added to run loop
- Message pipe of size 512 bytes
- Message queue for 65536 elements of size 88 bytes
- Double buffer each of size 512 bytes for endpoint #1
+++ error: myDriver.InitializeChannel(0) returned -95
Cheers!
Program ended with exit code: 161

@mac-can
Copy link
Owner

mac-can commented Jun 3, 2024

I have no access to the listed devices and can neither test them nor reproduce the issue:

  • Memorator pro 5 5xHS : EAN 73-30130-00778-9
  • USBcan leaf 4xHS : EAN 73-30130-00831-1
  • USBcan Light 2xHS : EAN 73-30130-00714-7

Multi-channel devices are not supported by the macCAN driver.

@mac-can mac-can added the enhancement New feature or request label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants