Hello guys,
Does someone know if it is possible to use the CAN bus with a USB adapter from micropython when building for Windows?
I saw a thread from python-can (https://github.com/hardbyte/python-can/issues/93) and there was a discussion about this, but couldn't find anything else about this.
Does anyone know if there exists something like this, or does anyone have some suggestions how i could implement it the best myself?
Many thanks
Stefan
Access CAN-Bus from Windows-Build
Re: Access CAN-Bus from Windows-Build
What level of detail are you looking for?
Basically you need the .dll for your specific USB-drivers.
Basically you need the .dll for your specific USB-drivers.
Re: Access CAN-Bus from Windows-Build
So i make build a dll of the usb-driver and wrap it to a micropython module on my own?
I was asking if there is something existing like this because there were already some requests for this.
I was asking if there is something existing like this because there were already some requests for this.
Re: Access CAN-Bus from Windows-Build
If you have the code for the driver, you could build the .obj and link the .obj directly into your micropython build so everything is contained in one file.EqBooster wrote:So i make build a dll of the usb-driver and wrap it to a micropython module on my own?
I was asking if there is something existing like this because there were already some requests for this.
I use Kvaser and Vector USB-CAN dongles and they don’t give you the source code but they do give you both the .dll and .lib so you can choose between dll, to have ability to upgrade driver separately from your code, or .lib so you can create only one binary file.
I don’t know what you mean by “something like this exists”. Each dongle manufacturer is gonna have a different API. Since there are not that many USB-CAN manufacturers I guess we could create a “port” for each one.
Is that what you want?
Re: Access CAN-Bus from Windows-Build
I just asked because there was a discussion already about this specific usb-can driver, but i didn't find anything so i guess it doesn't exist.
So have you successfully used Kvaser or Vector with micropython? If yes, can you probably share your implementation so references? I guess i need to extend the micropython firmware with a custom module that wraps the python functions to the LIB/DLL.
Is there something existing like this already for some other modules?
Thank you for taking your time and your help.
So have you successfully used Kvaser or Vector with micropython? If yes, can you probably share your implementation so references? I guess i need to extend the micropython firmware with a custom module that wraps the python functions to the LIB/DLL.
Is there something existing like this already for some other modules?
Thank you for taking your time and your help.