LoRaRF-Python icon indicating copy to clipboard operation
LoRaRF-Python copied to clipboard

Transmission of bytes

Open victorfmin66 opened this issue 2 years ago • 1 comments
trafficstars

Hello,

I have been reviewing the library/module code and the examples and I have some doubts. I'm working on a project that I use bytes instead of strings in order to transmit data. Based on the function def write(self, data, length: int = 0) , the function only accepts lists and tuples. Are there any other function in the library/module that allow to send bytes? If not, how do you think this would be possible to use with this library?

Thank you!

victorfmin66 avatar Jan 08 '23 16:01 victorfmin66

Hello vick,

For transmitting and receiving bytes data type you can use put and get method respectively. Those methods accept bytes and bytearray variable as input.

You can see how those methods implementation in the LoRa_simple_node and LoRa_simple_gateway examples.

chandrawi avatar Jan 08 '23 16:01 chandrawi