lwvmobile / dsd-fme

Digital Speech Decoder - Florida Man Edition
Other
164 stars 31 forks source link

Enhancement: Integration with AMBE USB device 3000-3003 #93

Closed Nokoa closed 10 months ago

Nokoa commented 1 year ago

Would love to see integration for a hardware voice decoder, such as DV-STICK. Or other USB devices with the AMBE 3000-3003 chip on them.

lwvmobile commented 1 year ago

If I had one, I'd probably figure out how to integrate it and make it work. I know DSDcc has support for the device, so I may peak over there and see what they are doing, but without one myself, I'd have a hard time troubleshooting and making sure its working correctly. I also have no idea if that would break other things currently available or not (BP keys, etc)

Nokoa commented 1 year ago

I certainly see how that can be extremely difficult if you don't have the device to test on. If you do choose to go through with it, I can help with testing.

I do have a DVSTICK-33 which features an AMBE 3003 chip on it. This chip specifically can do 3 channels simultaneously. This manual from DVSI describes how to use it. https://www.dvsinc.com/manuals/AMBE-3003_manual.pdf

I did play around with code with it. I got it to decode, however when I was decoding live sometimes the audio would play in a choppy manner. I couldn't entirely figure out how to correctly use it. There's a FIFO on the chip that can store 2 packets at a time, and that needs to be tracked. This USB dongle cannot do P25 Full Rate. It can do the rates for P25 half-rate(phase 2), DMR, NXDN(48), and DSTAR. DVSI makes a special model of the dongle, that can also do P25 full rate, but I don't have that.

Each channel of the chip needs to be initialized to decode mode for the correct rate which I believe is 33. In addition, the chip only receives packets with a parity check at the end, but that can be turned off.

Using rate 33 the chip accepts a voice frame with its FEC bits, and does error correction on the chip. However, for decrypted frames, you can select a rate without FEC, but then you will have to do the error correction yourself, as you are doing.

320 bytes of PCM 16bit 8000hz audio are returned, the bytes need to be swapped in position with every other byte.

kb9mwr commented 1 year ago

@lwvmobile I'd be willing to donate my AMBE stick to aide in your development. I'd ask that you consider adding M17 support to dsd-fme, as I've always used dsd as the swiss army knife for digital voice, and it currently lacks that support. Let me know

lwvmobile commented 1 year ago

I'd be willing to donate my AMBE stick to aide in your development. I'd ask that you consider adding M17 support to dsd-fme, as I've always used dsd as the swiss army knife for digital voice, and it currently lacks that support. Let me know

I may have to take a raincheck on the AMBE stick, I had been thinking about re-writing a lot of the dsd_mbe.c file to make it easier to use, and also try to improve the sound quality, but I don't know how long that might take. I've also been considering M17 support as well, since it seems to use a setup similar to both YSF and NXDN with its convolutional encoding, I am a bit concerned about its 8 symbol FSW causing a lot of false positive sync patterns though, but I guess I'll find out if I ever start writing code for it.

Also, I would need raw samples to test. I have no access to anything M17.

kb9mwr commented 1 year ago

There appears toe be a raw sample here: https://www.sigidwiki.com/wiki/M17_RF_Protocol The AMBE stick offer is good at anytime. I'd just have to retrieve it from a repeater site.

lwvmobile commented 1 year ago

I'd ask that you consider adding M17 support to dsd-fme,

See: https://github.com/lwvmobile/dsd-fme/issues/152 Code currently on https://github.com/lwvmobile/dsd-fme/tree/v2.1b

lwvmobile commented 10 months ago

Okay, wow, didn't realize this was open for nearly a year. Time flies. Anyways, I went ahead and closed #155 as not planned and listen my reasons, and most of those same reasons apply here as well, so go check that for the official response.