Python Forum
packet radio communication - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: packet radio communication (/thread-22140.html)



packet radio communication - EmpireAndrew - Oct-31-2019

I have two Raspberry Pi 3's, each with a packet radio attached. Each radio can send and receive data packets, but the data limit is 60 bytes. I have about 10 different messages (commands) that the 'sending' radio will send the 'receiving' radio. Sometimes, I need to send more than 60 bytes of data at once, meaning that I may need to split up the message into individual packets, then put those packets back together in the correct order at the receiving radio. The receiving radio needs to be able to verify that all of the packets in a message are received, then put them back together in the correct order. If one of the packets in the message is missing, the receiving radio can discard all of the other packets in that message. Please forgive me, but I'm a relatively new programmer who is self taught. I'm fairly new to python and embedded linux systems, but I think the best solution is to use the first 3 bytes of the 60 bytes available as 'logic' bytes so that the receiving radio knows what to do. My first byte could contain the 'command'. the second byte could contain the total number of packets in the message, and the third could contain the packet number. I hope this makes sense and hope that I can get some help in programming this the most efficient way. I don't know what that looks like in python. Please help! Thanks.


RE: packet radio communication - micseydel - Nov-01-2019

I'm not very experienced with networking or embedded systems, but that sounds fine to me.