I am currently working on some code for transmitting messages / files / and other laser data using sound conversion. My current code uses the hexlify function from the binascii module in python to convert the data to a binary file, and then emits a tone for 1 and a different tone for 0. This theoretically works, although not the fastest encoding / decoding method, but when testing, there are several errors .
the generated tones are not accurate, that is: 150 Hz radiation may be equal to 145-155 Hz on the receiving side, this is not a huge problem, because I can simply set the borders on the receiving side lower or higher.
The real problem is that if I make a tone and play, the computer on the receiving side can read it several times or not read at all, based on the speed with which it counts the incoming sound. I tried to reproduce tones at the same speed as the samples, but this is very good.
In general, I had several successful runs using short messages, but this is very unreliable and inaccurate due to the above problems.
I went over this further, and solving it seems like it might include BPSK or Binary Phase Shift Keying, although I'm not sure how to implement this. Any suggestions or sample code would be appreciated!
My code for the project can be found here , but the main files I'm working on are for binary decoding and encoding, which is here and here . I am not an expert in python, so please forgive me if anything I said is wrong, my code is not the best, or If I missed something basic.
Thanks!: -)
source share