Hello everyone,
I’ve been working on something for a few weeks that I’d like to get some feedback on, I hope this is the right place to do it.
I’m interested in using the Cyphal protocol with cheap RF transmitter modules, such as the RF69. Such modules have packet engines on board, and can also handle AES encryption as well. Following some initial conversations with Pavel who suggested an approach to tackling the problem, I’ve had a go at implementing a C library for this transport. I’d like to explain my process, and hopefully get some feedback.
“librfard” as it were, is essentially the same as libcanard. I’d like to of course thank Pavel and the rest of the devs involved in developing it, it was really interesting to read through and (try) to understand. I definitely learnt a lot. Essentially, libcanard encodes the Cyphal message metadata in the CAN ID of the transmitted frame. The modification I have made is to instead encode this metadata in a header of the transmitted RF packet.
This approach seems to have yielded decent results. Even without any more sophisticated methods of collision detection. Following initial discussions with Pavel, he suggested that CSMA would be required. In any case, to keep with the style of libcanard and libudpard, the implementation of something such as CSMA seems like it would belong better outside of the Cyphal library, as something the user application implements? Pavel, would be great to have your feedback on this.
I’d be really interested in any feedback the community has on my approach, I’d be more than happy to make the repository public for people to have a look and play around with it - hopefully if this was useful to others then with some work it would be amazing to offer it alongside libcanard and libudpard.
Cheers,
Joe