Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Long timeouts and ERROR: Unable to find host: No such host is known. #3

Open
guruofquality opened this issue Jul 14, 2018 · 1 comment

Comments

@guruofquality
Copy link

@jocover I added PlutoSDR to my windows installer, but theres some issue with PlutoSDR when a device is not present, because it causes issues for people without a pluto sdr:

This is the problem code: https://github.com/jocover/SoapyPlutoSDR/blob/master/PlutoSDR_Registation.cpp

ctx=iio_create_network_context(PLUTOSDR_DEFAULT_IP);
		if(ctx !=nullptr){
			options["hostname"]=PLUTOSDR_DEFAULT_IP;
			
		}else{
			ctx=iio_create_network_context(PLUTOSDR_DEFAULT_HOSTNAME);
			if(ctx !=nullptr){
				options["hostname"]=PLUTOSDR_DEFAULT_HOSTNAME;}
			else{
				return results;
			}
		}
  • iio_create_network_context(PLUTOSDR_DEFAULT_IP); has a long timeout when nothing is located at the IP PLUTOSDR_DEFAULT_IP
  • iio_create_network_context(PLUTOSDR_DEFAULT_HOSTNAME); gives the error message because PLUTOSDR_DEFAULT_HOSTNAME isnt a hostname on the network

A few ideas:

  • I thought pluto was a usb device, so I dont understand the network support. Can we delete the network discovery or ifdef it out? CMake build options to disable network discovery?

  • Skip the network discovery if args["plutosdr"] and args["addr"] is missing?

  • But lets say that we can't know if the user has a particular IP address or hostname, maybe they have several IP addresses. Support an address or hostname from the arguments. What if the default ip/host is not used, what if there are multiple plutosdr? Just like any other network device, usrp, etc. Example: support args["addr"] for ip address or hostname: iio_create_network_context(args["addr"].c_str())

  • Reference issue Long timeouts and ERROR: Unable to find host: No such host is known. pothosware/PothosSDR#56

@guruofquality
Copy link
Author

This is the patch I'm including for the next build: https://github.com/pothosware/PothosSDR/blob/master/patches/soapy_plutosdr_network.diff

In short, it requires driver=plutosdr, and hostname=<ip/host> to explicitly enable the network handle. If there is a way to enumerate network devices this would be a good place to put it. Until then, I cant have SoapyPlutoSDR with 7 second timeout for non existent devices.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant