You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe, incorrect command-selecting bytes are being used in the SLCAN message parser in slcan.c:
} elseif (buf[0] =='m'||buf[0] =='M') {
// set mode commandif (buf[1] ==1) {
// mode 1: silentcan_set_silent(1);
} else {
// default to normal modecan_set_silent(0);
}
return0;
} elseif (buf[0] =='F') {
// set filter commanduint32_tid=0;
for (i=1; i<len; i++) {
id *= 16;
id+=buf[i];
}
current_filter_id=id;
can_set_filter(current_filter_id, current_filter_mask);
} elseif (buf[0] =='K') {
// set mask commanduint32_tmask=0;
for (i=1; i<len; i++) {
mask *= 16;
mask+=buf[i];
}
current_filter_mask=mask;
can_set_filter(current_filter_id, current_filter_mask);
}
'm' and 'M' are used to set the "mode" of the adapter, while 'F' and 'K' are used to set filter ID and mask. Instead, according to the LAWICEL CAN232 protocol, 'm' and 'M' should be used to set filter mask and ID.
I believe, incorrect command-selecting bytes are being used in the SLCAN message parser in slcan.c:
'm' and 'M' are used to set the "mode" of the adapter, while 'F' and 'K' are used to set filter ID and mask. Instead, according to the LAWICEL CAN232 protocol, 'm' and 'M' should be used to set filter mask and ID.
See also: https://github.com/linux-can/can-utils/blob/master/slcanpty.c#L130
The text was updated successfully, but these errors were encountered: