Compatibility with C version
andresc889 opened this issue · 8 comments
Hi there! This is a wonderful library. I've gotten the C version to work reliably between two computers. I have also gotten the Android version to work between my phone and Genymotion. However, my final goal is to transmit a message from a computer to a phone. Here's what I tried:
-
Download the profiles from here (https://github.com/quiet/org.quietmodem.Quiet/blob/master/quiet/src/main/res/raw/quiet_profiles.json) into /usr/local/share/quiet/quiet-profiles.json.
-
Run quiet_encode_file audible-7k-channel-0 msg. I chose this profile because it's the one that I got working to transmit from Genymotion to my phone.
-
Just to test, I ran quiet_decode_file audible-7k-channel-0. It outputs the message as expected.
-
I'm running these commands in a virtual machine, so I decided to copy the encoded.wav file to my Windows host to play it from there. I play the file in Audacity, but my phone does not pick up the message (I'm using the QuietShare app). I tried to use the same volume and distance from the speaker that I use with Genymotion. It works every time with Genymotion but not with the encoded.wav file. I also ran quiet_decode_soundcard audible-7k-channel-0 in the virtual machine and it works perfectly when I play the encoded.wav file into the computer's microphone. It picks up the message every time.
So, I'm wondering? Are the C and Android versions of the library incompatible or does it have something to do with my setup? Thanks again! Great piece of work.
Thanks for giving it a try :)
I'm sorry you ran into that. I actually have the fix sitting around but hadn't pushed it because I was debating how to best handle it. But now I'm feeling dumb for my inaction since you spent so much effort debugging this.
Basically, I discovered a single line in liquid-dsp that behaves differently depending on whether you compile it with clang or gcc. Weirdly, it works both ways, but the clang universe can't communicate with the gcc universe.
This is where it gets tricky - the maintainer of liquid agreed to go with the clang ordering. That means that future versions of this library will be compatible with the C/JS versions, but not past versions of this library. There's at least one person I know who's used this some so I wanted to give him a heads up before I push such a big breaking change.
I'm going to put the new changes on a branch and let you know which branch it is. I'll get in contact with the other developer and let them know, and then eventually merge into master.
Sorry about that. I'm excited you've got things working as much as you have. I do really feel bad about any frustration that likely caused.
The branch is msequence_ordering https://github.com/quiet/org.quietmodem.Quiet/tree/msequence_ordering
Wow! Thanks for the quick reply. Please don't feel bad. I didn't spend that much time debugging, and doing so actually helped me understand Quiet a little better, so it actually benefited me because I will be using it. In my attempts I was able to transmit a Makefile from a Rasperry Pi to a virtual machine with ultrasound and almost no errors. That was exciting. Thanks for taking the time to push the changes on that branch. I'll give it a try.
Yeah, no problem. And if you do run into any more issues, don't hesitate to reach out.
I'm actually really excited to hear it works on RPi. I hadn't tried it on mine yet, as I still need to get an audio setup for it.
I just tried it with my virtual machine sending a message to my phone using the ultrasonic profile. It works perfect! The final target is the RPi, so I'll test it tomorrow since I don't have it with me currently. The compilation process in RPi was smooth, so your library is quite portable. Great work you've done! You need to advertise it more :) I had first tried a library called android-fskmodem, but I couldn't get it to work when the phone was more than 2 inches away from the speaker. I'm glad your library has different modulation schemes.
Awesome stuff! And thanks again.
You can thank liquid-dsp for the range of modulation. I was so excited when I realized how much it does, and I'm quite happy with how I made it easy in Quiet to switch without recompiling.
I've tried to do some promotion, but people are a little skeptical. I've considered making a youtube of it in action or something. I've already stepped on some toes by touting it! However if you, as a neutral third-party, showed off the cool thing you're making, people might feel differently about that :)
Absolutely! I plan on using it as part of my master's thesis project, so I'll cite you every chance I get and hopefully the thesis will be worth showing off.
Tested transmitting from RPi to phone. Works great! I'll close the issue. Thanks for your help again.