{"id":5123,"date":"2023-09-15T14:53:57","date_gmt":"2023-09-15T06:53:57","guid":{"rendered":"https:\/\/www.tosunai.com\/?p=5123"},"modified":"2024-09-02T12:26:11","modified_gmt":"2024-09-02T04:26:11","slug":"tosun-hardware-use-socketcan-to-send-and-receive-messages","status":"publish","type":"post","link":"https:\/\/www.tosunai.com\/tosun-hardware-use-socketcan-to-send-and-receive-messages\/","title":{"rendered":"\u5e72\u8d27\u5206\u4eab|\u540c\u661f\u786c\u4ef6\u5982\u4f55\u4f7f\u7528SocketCAN\u8fdb\u884c\u62a5\u6587\u6536\u53d1"},"content":{"rendered":"\t\t
1.1\u3001Socket CAN<\/b><\/p>
SocketCAN\u662f\u7531Linux\u5185\u6838\u7ef4\u62a4\u7684CAN\u534f\u8bae\u6808\uff0c\u53ef\u4ee5\u4f7f\u7528Linux\u5185\u6838\u63d0\u4f9b\u7684Socket API\u8fdb\u884cCAN\u603b\u7ebf\u7684\u8bfb\u5199\u64cd\u4f5c\uff0c\u7528\u6237\u53ea\u9700\u8981\u4f7f\u7528C\u8bed\u8a00\u5b9e\u73b0\u4e0eSocket API\u901a\u8baf\uff0c\u5c31\u53ef\u4ee5\u63a7\u5236CAN\u603b\u7ebf\u4e0a\u7684\u8282\u70b9\uff0c\u5b9e\u73b0\u6570\u636e\u7684\u53d1\u9001\u4e0e\u63a5\u6536\u3002<\/span><\/span><\/p> \u5982\u679c\u60f3\u8981\u5229\u7528SocketCAN\u63a7\u5236TSCAN\u7684\u8bbe\u5907\uff0c\u6709\u4e00\u4e2a\u89e3\u51b3\u65b9\u6cd5\u662f\u5229\u7528Linux\u81ea\u5e26\u7684\u865a\u62dfSocketCAN\u3002\u6211\u4eec\u5229\u7528\u540c\u661f\u63d0\u4f9b\u7684Linux\u5e93libTSCANApiOnLinux.so\uff0c\u5b8c\u6210\u4e00\u4e2avcan\u5728\u672c\u673a\u7684server\u7a0b\u5e8f\uff0c\u7528\u4e8e\u628aSocketCAN\u7684\u62a5\u6587\u548clibTSCAN\u8fdb\u884c\u4e92\u8f6c\u3002<\/span><\/p> \u8fd9\u79cd\u65b9\u5f0f\u914d\u7f6e\u540c\u661f\u786c\u4ef6\u7684\u6ce2\u7279\u7387\uff0c\u4ee5\u53ca\u67e5\u770b\u4fe1\u606f\u90fd\u9700\u8981\u5728sockettscan\u7a0b\u5e8f\u4e2d\u3002\u56e0\u4e3avcan\u672c\u8eab\u4e0d\u652f\u6301\u6ce2\u7279\u7387\u914d\u7f6e\uff0c\u6211\u4eec\u4e5f\u65e0\u6cd5\u628a\u7edf\u8ba1\u4fe1\u606f\u544a\u77e5vcan\u3002<\/span><\/p> \u903b\u8f91\u56fe\u5982\u4e0b\uff1a<\/span><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t 2.1\u3001\u7cfb\u7edf\u73af\u5883\u914d\u7f6e<\/b><\/p> \u5982\u679c\u7535\u8111\u672c\u8eab\u7684\u7cfb\u7edf\u5c31\u662fLinux\u7cfb\u7edf\uff0c\u5219\u8fd9\u4e2a\u6b65\u9aa4\u53ef\u4ee5\u5ffd\u7565\u3002<\/span><\/span><\/p> 1) \u901a\u8fc7http:\/\/releases.ubuntu.com\/18.04\/\u53ef\u4ee5\u4e0b\u8f7dUbuntu\u7cfb\u7edf\u955c\u50cf\u3002<\/span><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t 2\uff09\u5728\u865a\u62df\u673a\u4e2d\u5bfc\u5165\u6620\u5c04\u6587\u4ef6\uff1a\u865a\u62df\u673a ->\u7f16\u8f91\u865a\u62df\u673a\u8bbe\u7f6e -> CD\/DVD ->\u4f7f\u7528ISO \u6620\u5c04\u6587\u4ef6\u3002<\/span><\/font>\u4e8c\u3001Socket CAN\u4f7f\u7528\u6559\u7a0b<\/h4>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
Socket CAN Using Toturials<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
<\/p>\n
<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t