You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.3 KiB

2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. # linux_demo_project
  2. ```
  3. 功能:
  4. 1. 打通CAN通道
  5. 2. 打通ws通道,
  6. 2. 解析CAN消息,并上报给ws
  7. 3. 解析ws消息并发送给CAN
  8. TOOD:
  9. 1. 机械臂扫码功能
  10. 2.
  11. 测试:
  12. 1. websocket下发一条can指令,can卡能够收到
  13. 2. can卡上报一条指令,websocket能够收到
  14. ```
  15. ## 编译RK3328
  16. ```bash
  17. # 板子初始化
  18. ./sh/boardinit.sh \
  19. --device_info "DEVICE_ID=iflytop_demo_device" \
  20. --device_info "FRP_SERVER_ADDR=47.92.195.73" \
  21. --device_info "STARTUP_DEFAULT_URL=127.0.0.1:80" \
  22. --fixmac true \
  23. --ip 192.168.1.191
  24. # 初始化环境
  25. ./build.sh envsetup
  26. # 仅编译
  27. ./build.sh build
  28. # 编译调试版本,Cmake使用的是cmakepc.cmake
  29. ./build.sh buildhost
  30. # 编译打包部署(整包)
  31. ./build.sh --ip <ip> flash
  32. # 编译打包部署,重启系统(整包)
  33. ./build.sh --ip <ip> flash reboot
  34. # 编译并只部署应用
  35. ./build.sh --ip <ip> flashapp "app.out"
  36. # 只部署webapp
  37. ./build.sh --ip <ip> flashwebapp
  38. # 配置ssh-key,免密登录
  39. ./build.sh --ip <ip> ssh_copy_id
  40. ```
  41. 测试指令
  42. ```json
  43. {
  44. "channel":"can0",
  45. "protocol":"iflytopCanProtocolStackV1",
  46. "message": {
  47. "attribute": "normal",
  48. "priority": 4,
  49. "type": "read",
  50. "targetId": 129,
  51. "sourceId": 1,
  52. "seq": 0,
  53. "regAdd": 0,
  54. "regValue": 100
  55. }
  56. }
  57. ```