Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aitck opened this issue Jan 12, 2023 · 4 comments
Open

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

aitck opened this issue Jan 12, 2023 · 4 comments

Comments

@aitck
Copy link

aitck commented Jan 12, 2023

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

@shuai132
Copy link
Owner

本仓库只提供协议层和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
Copy link
Owner

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

@david-drinn
Copy link

david-drinn commented Dec 14, 2023

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.

@shuai132
Copy link
Owner

  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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants