ac2cz / FoxTelem

AMSAT Fox-1 Telemetry Decoder
GNU General Public License v3.0
52 stars 17 forks source link

Foxtelem "Missing USB", CubeSatSim #681

Closed Nanjavi closed 3 years ago

Nanjavi commented 3 years ago

Hi, I'm a student currently trying to get a CubeSatSim to work with Foxtelem, and there are a few things going wrong.

  1. I've been getting the “missing USB” error when I have the RTLSDR in the USB port
  2. I don't think the issue is with Java or my devices because I've tried on a windows and Mac device and the same error appeared
  3. I know there's nothing wrong with the RTLSDR dongle itself because SDRsharp is able to work with the dongle.
  4. I've tried deleting and redownloading Foxtelem but the same errors show up
  5. The other sources like a wav file, microphone array, and primary sound capture driver work when selected.
  6. I have only one USB port, and my flash drive and Bluetooth mouse work when plugged into it.

I believe I have the drivers set up correctly for the RTL-SDR because the “couldn’t claim USB interface” error went away after we performed certain steps. I don't think I'm using the E4000 tuner or Raspberry Pi. I would appreciate other solutions or any help with this issue. Thank you!


RTL2832U R820T2 Windows 10 java version "1.8.0_281" Foxtelem 1.10c3

ac2cz commented 3 years ago

Thanks for the report. Sorry to hear of the difficulty. The RTL device you have might not be supported by FoxTelem. Do you have logging enabled? Can you send me the log? You can turn it on from the File > Settings window. The log is written in the log files directory.

Nanjavi commented 3 years ago

FoxTelemDecoder20210212.log Let me know if this wasn't what you're looking for. Thanks!

ac2cz commented 3 years ago

In the log I see: 20210212000330: couldn't determine RTL2832 tuner type: device.DeviceException: couldn't open device - check permissions (udev.rule) [LIBUSB_ERROR_ACCESS]

That suggests that FoxTelem does not have permission to access the RTL. Are you running this on Windows or Linux?

If you are on Windows then make sure that another program does not have the device open. For example, you need to exit SDRSharp because it will hold onto the Dongle and prevent other programs from accessing it.

If you are in Linux then you need to set the permissions on the udev rules so that the user who runs FoxTelem has access and you need to set the permissions on the USB device in /dev in the same way I expect.

Nanjavi commented 3 years ago

I'm on windows, but I'm pretty sure Google chrome was the only other application open when I ran it before. Regardless, I just ran it with ONLY Foxtelem open and the same errors showed up. I also tried plugging in the RTLSDR before I opened the app and after I opened the app to see if that made a difference.

If it helps here are the errors: missing usb device serious edt error loading logged data

Thanks!

ac2cz commented 3 years ago

Can you tell me what type of RTL device it is? It looks like it may not be supported by FoxTelem. I have only implemented a subset of the rtl-sdr library. If this is a common device then I could consider adding it.

Nanjavi commented 3 years ago

On the USB, it says: DVB-T+DAB+FM+SDR RTL2832U R820T2 TCXO+BIAS T+HF

Though, I think the RTL device is implemented. The instructions for setting up the CubeSatSim ground station use Foxtelem with this same type of dongle. If it works for other people, I'd imagine the problem is with something else. I may just be inexperienced though.

Thanks for your effort so far!

ac2cz commented 3 years ago

I have a new release, version 1.09d, that might help you. Download here: https://www.g0kla.com/foxtelem/downloads/test/

This does not fail when a most USB errors are hit. It logs the error and tries to carry on. If the issue you have is with the USB hardware / bus, then this might help. It also adds several additional features for the RTL, such as wider bandwidth and frequency correction.

Even if this does not solve your issue, I would be very interested to here how it operates with the RTL that you have.

Nanjavi commented 3 years ago

It works! This version pretty much solved all the problems I had. The decoded telemetry shows up even when I plug in the dongle before or after I open the application. Changing some of the settings and deleting the old version of Foxtelem didn't mess anything up either.

Thank you so much! I'll let you know if anything weird happens!

ac2cz commented 3 years ago

Thanks for the ongoing testing. I have an updated release version 1.10d3 here: https://www.g0kla.com/foxtelem/downloads/test/

This splits the USB errors into fatal and non fatal. With a fatal error the command is lost. Non fatal errors can be safely ignored. I now color the errors red only if there is a fatal error. Even a low number of fatal errors can likely be lived with. It might mean that the device was not on the right frequency when it was started or did not set the gain correctly. But most of the time it was fine.

Let me know what you see. I think this is an important update and once if is tested I would like to release it to everyone.

Nanjavi commented 3 years ago

I'm not completely sure if you were looking for anything in particular, but here were some of the things that I noticed:

I did have logging enabled for some of the things I tried, so let me know if having the logs might help. Thanks!

ac2cz commented 3 years ago

Thanks for the detailed report.

The Audio Missed is shown when your computer can't keep up with the data being sourced from the SDR. It should only rarely happen and it usually corresponds with the computer being busy with other programs at the same time. It can also happen on older hardware or if you set the RTL bandwidth to be really wide. If you see it a lot then let me know because it could also be a bug in the new version.

I'm going to default the USB Errors to say 0 at start up. But showing nothing in the version you have is good. It will increment if there are errors on the USB bus,

When the CubeSatSim transmits you should be able to see the signal in FoxTelem. There should be a bump in the red line. You can click on the bump to manually tune FoxTelem or you can have FoxTelem automatically tune to the signal. For the FSK CubeSatSim make sure you are in DUV mode, which is at the top of the window. For BPSK make sure Fox/Husky mode is selected. If FoxTelem can decode the signal then the values will change on the corresponding tab.

Good to know on the device drivers. Those are always hard to get right.

On the sound, if you have "Squelch when no telemetry" checked then it will only play sound when it thinks it can hear a telemetry signal. This is determined by measuring the Signal to Noise ratio of the received bits (as displayed in the eye diagram). If that is over a certain threshold then it plays the sound. You also need to have pressed the button to "Monitor Audio" but it looks like you have done that because the text on the button has changed to "Silence Speaker".

Nanjavi commented 3 years ago

Got it. For that last point, in the 1.10d version, I have "squelch when no telemetry" selected, and it doesn't produce any sound, but it works fine in version 1.10d3. For me, this doesn't pose a problem at all, but I suppose it's something to keep in mind when testing for different devices.

Thanks!