Integrating Multiple Devices Using CAN Bus and RS485
Budget: $250 – $750 USD
We are seeking an experienced developer to configure data exchange between a Jetson Nano and another device via the CAN bus, utilizing the RS485 CAN HAT. Documentation and examples for the RS485 CAN HAT for the Jetson Nano are available here: https://www.waveshare.com/wiki/RS485_CAN_for_Jetson_Nano.
Project Requirements:
Data packets to be transmitted are split into frames of 8 bytes each, with the first 7 bytes of the frame encoded in ASCII. The last byte is an integer frame counter that does not convert to ASCII.
A checksum is generated from the packet data and appended at the end of the packet using the following function:
c
Copy code
uint16_t crc_chk_value(uint8_t *data, uint16_t size) {
uint16_t crc = 0;
while (size--) {
crc ^= *data++;
for (unsigned k = 0; k < 8; k++)
crc = crc & 1 ? (crc >> 1) ^ 0xa001 : crc >> 1;
}
return crc;
}
If the last frame has free space, it is filled with zeros.
An example of a packet structure and its breakdown into frames will be provided.
Tasks:
Receive a packet from the CAN bus.
Verify the correctness of the checksum.
If the checksum is correct, send a response to the CAN bus indicating "all is clear:crc", where crc is the control signature. The response packet must also be split into frames accordingly.
Consider the necessity of data buffering due to the very short interval between packets.
Skills Required:
Embedded Systems
C/C++ Programming
Electrical Engineering
Linux
Project Requirements:
Data packets to be transmitted are split into frames of 8 bytes each, with the first 7 bytes of the frame encoded in ASCII. The last byte is an integer frame counter that does not convert to ASCII.
A checksum is generated from the packet data and appended at the end of the packet using the following function:
c
Copy code
uint16_t crc_chk_value(uint8_t *data, uint16_t size) {
uint16_t crc = 0;
while (size--) {
crc ^= *data++;
for (unsigned k = 0; k < 8; k++)
crc = crc & 1 ? (crc >> 1) ^ 0xa001 : crc >> 1;
}
return crc;
}
If the last frame has free space, it is filled with zeros.
An example of a packet structure and its breakdown into frames will be provided.
Tasks:
Receive a packet from the CAN bus.
Verify the correctness of the checksum.
If the checksum is correct, send a response to the CAN bus indicating "all is clear:crc", where crc is the control signature. The response packet must also be split into frames accordingly.
Consider the necessity of data buffering due to the very short interval between packets.
Skills Required:
Embedded Systems
C/C++ Programming
Electrical Engineering
Linux