Details
-
Suggestion
-
Resolution: Done
-
P3: Somewhat important
-
5.12.2
-
-
9f5b8ba590d424f82498fca5f2cc8594b1757ff0 (qt/qtserialbus/dev)
Description
The socketcanbackend.cpp opens the socket hardcoded:
if (Q_UNLIKELY((canSocket = socket(PF_CAN, SOCK_RAW | SOCK_NONBLOCK, CAN_RAW)) < 0)) { setError(qt_error_string(errno), QCanBusDevice::CanBusError::ConnectionError); return false; }
Now what if you have a device that does not use CAN_RAW as the family. But instead uses a different implementation defined by the hardware vendor?
In my case, I have to pass "7" instead of whatever value CAN_RAW has, to get socketcan working on my device.
Probably the socketcan plugin can get made configurable so that you can pass an arbitrary value here?