-
Notifications
You must be signed in to change notification settings - Fork 503
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
Adding driver support for custom hardware #1317
Comments
So now delete the Vector API and put your own |
By Vector API do you mean replace this vector .dll (/Sources/BUSMASTER/BIN/Release/vxlapi.dll ) with my own. Right now our custom board is connected over a USB COM port |
Take the Vector driver source code and replace it with one that works with your hardware. |
I am working on similar i have a device which works serial com port (NXP rt controller), so how can i integrate with BUS master? I have implemented with Qt monitor its working fine with SL-can. Regards. |
This is a source code of Rusoku TouCAN adapter.You can use it like a reference. |
Your driver must be able to work with a serialport. |
@rusoku I was able to send and receive CAN data over serial COM port using opensource QT-CAN-monitor source code as mentioned above. Which mean I can work with serial port over my NXP rt controller. Now I wanted to communicate with my controller over the serial port using bus master. I gone through the shared code I didn't found where exactly port name or port opening is doing with desired speed? |
@rusoku I have taken a copy of the Vector driver source code(Sources/BUSMASTER/CAN_Vector_XL) I wanted to know what changes I need to make so that I can select my hardware configure it and send and receive can data from busmaster UI. I did check your driver link https://github.com/rusoku/busmaster_rusoku_driver but still not sure what exactly do i need to replace to make it work with my hardware |
You need to rewrite all these functions to work with your hardware:
|
Take a look at CAN_VSCOM driver source code.It also uses a serial port interface with its hardware. |
I have been examining the CAN_VSCOM driver source code and observed that it utilizes a statically linked library vs_can_api.lib to facilitate serial communication operations, specifically for opening, closing, reading, and writing to COM ports. |
I successfully transmitted CAN data from busmaster to my hardware and want to find where the transmission interval for the CAN messages is being set. On the receiving end, the time intervals is almost double of whatever is configured on the transmitting side. When I manually send CAN messages from the COM port at specific intervals, I observe nearly the same intervals at the receiving end. |
I resolved the issue of the cycle time being nearly double by dividing the nActualTimer by 2 (pouMsgItem->TxDetails.nActualTimer / 2). For the COM port, I had used the VSCOM driver, modified it, and successfully transmitted and received CAN messages. Now, I'm considering switching to USB bulk mode. Should I use the same VSCOM driver with modifications, or is there another driver I can refer to as a better option? |
Hello, I’m working on adding support for a custom CAN hardware interface to Busmaster. So far, I’ve made UI changes by adding an enum for my driver, adding the driver name in the driver list in sg_ListDIL (Sources/Kernel/BusmasterDriverInterface/DIL_CAN.cpp), and loading the .dll in the DILC_SelectDriver() function. I successfully built and ran Busmaster by copying and renaming an existing .dll for my driver. My custom driver appears in the GUI, and if I connect it using the copied .dll (e.g., PEAK), it works for that hardware.
Now, I’ve copied and renamed the CAN_Vector_XL and included it in the project. I want to make changes to it so that it can work or my custom board. I need guidance on the next steps to enable communication with my custom hardware. Any documentation or pointers would be greatly appreciated, as I'm not sure how to proceed.
The text was updated successfully, but these errors were encountered: