The socketcanbackend.cpp opens the socket hardcoded:
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?