rpc_core icon indicating copy to clipboard operation
rpc_core copied to clipboard

大佬,我有几个问题想问一下

Open AITCK opened this issue 2 years ago • 4 comments

1.这边有命令行上位机(或者python通讯库)了吗? 2.如果用stm32或者esp32应该怎么使用该项目? 是否有例子工程? 3.技术有交流群吗

AITCK avatar Jan 12 '23 07:01 AITCK

本仓库只提供协议层和api,传输层需要自己对接。不过也提供了开箱即用的(需要依赖asio)。

  1. 基于TCP,这里有开箱即用的库(见RPC章节),也包含例子:https://github.com/shuai132/asio_net 另外没有python的。

  2. 因为需要asio,单片机一般不能用。不过esp32支持asio,所以可以。 工程例子:https://github.com/shuai132/platformio_demo/tree/net/rpc PS: 其实不需要用这个例子,asio_net里面有例子。

  3. 群的话,我建一个也好~

shuai132 avatar Jan 12 '23 07:01 shuai132

建了个QQ群:249240861 方便以后交流。

shuai132 avatar Jan 12 '23 07:01 shuai132

I, too, did not find asio support in the STM32 libraries. (Perhaps in FreeRTOS? I don't know.) However, by using the STM32 HAL libraries for UART, it is not too difficult to create a streaming connection that rpc_core can use with a bit of extra parsing logic to handle possibly split up packets.

david-drinn avatar Dec 14 '23 23:12 david-drinn

  1. STM32资源有限,目前很少有移植使用asio的,它也没有统一的TCP/IP支持,只能自行实现connection。推荐ESP32它可以直接使用这个仓库:https://github.com/shuai132/asio_net

  2. stream_connection可以解决粘包的问题,UART也容易使用。上位机使用相同的连接方式即可。

  3. 上位机目前提供了c++和rust的基于TCP连接的直接支持(见README.md)。 @david-drinn

shuai132 avatar Dec 15 '23 11:12 shuai132