[Feature Request] Need help about nuitrack sdk device api for activation

So due to automation purpose we created a nuitrack licence activation tool, modified from this little project:

here are part of the source code we did (with extra debug informations):

int main(int argc, char* argv[]) {
	int errorCode = EXIT_SUCCESS;

	//nuitrack_device_activation -l license
	try {
		cxxopts::Options options("NuitrackActivation", "One line description of MyProgram");
		("l, license", "license Key", cxxopts::value<std::string>(), "");

		std::string license;
		auto result = options.parse(argc, argv);
			license = result["l"].as<std::string>();
		std::cout<<"license = "<< license<<std::endl;


		const auto device = selectDevice();

		activateDevice(device, license);
	catch (const LicenseNotAcquiredException& e)
		std::cerr << "LicenseNotAcquired exception (ExceptionType: " << e.type() << ')' << std::endl;
		errorCode = EXIT_FAILURE;
	catch (const Exception& e)
		std::cerr << "Exception: " << e.what() << std::endl;
		errorCode = EXIT_FAILURE;

	return errorCode;

NuitrackDevice::Ptr selectDevice() {
		std::cout<<"selectDevice started "<< std::endl;
		std::vector<NuitrackDevice::Ptr> devices = Nuitrack::getDeviceList();
		std::cout<<"device grabbed "<< std::endl;

		if (devices.empty())
			throw Exception("No devices found.");

		console::Table<4> table({"Index", "Name", "Serial Number", "License"});
		std::cout<<"table header created "<< std::endl;
		for (std::size_t i = 0; i < devices.size(); i++)
			const auto& device = devices[i];
		std::cout << "\nAvailable devices: (0 will be used by default)" << std::endl;

		int devIndex = 0;

		return devices[devIndex];

void activateDevice(NuitrackDevice::Ptr device, std::string manualLicenseKey) {
		bool isActivated = device->getActivationStatus() != ActivationStatus::NONE;

		if (isActivated)
			std::cout << "Device already activated" << std::endl;

		if (!isActivated) {
			std::cout << "Activation status: " << toString(device->getActivationStatus()) << std::endl;

(Not all source code are pasted here)

We want to run it on Linux (Ubuntu) for device activation, however, on some of our devices it works, but some doesn’t, it quits at the code: Nuitrack::getDeviceList, and the log “device grabbed” doesn’t appear. Can someone tells us what’s going on here?

More information:
Device 1 (working): Ubuntu 18.04.6, with GNOME UI, nuitrack 0.35.12, Kinect for xbox one camera
Device 2 (not working): Ubuntu 20.04, without UI (just TTY), nuitrack 0.35.12, Kinect for xbox one camera.
Device 3 (working): Ubuntu 20.04, with GNOME UI, nuitrack 0.35.12, Kinect for xbox one camera.

Also on device 2, license can be activated through nuitrack ui, however, without GNOME, running nuitrack_device_api_sample gives the same fail result.
On Device 3, we tested in tty, it has the same error behaviour, the device list doesn’t print. We tried to enable xserver, but with same fail result.


we can confirm that it’s caused by not running the program with GNOME, because we reproduced this issue with tty. However, we do need to know what exactly is missing, because on final product, we won’t have Desktop UI running.

Our other developer is debugging it and says nuitrack_GetDeviceList() is causing trouble, because he can’t access stacktrace after this line, and he can’t debug it because it’s extern without any debug symbols.

Hi @dongyiCai_retrobrain,

I will try to reproduce this issue.
Please answer the following questions:

  • Do you use the same sensor with all devices?
  • Does nuitrack_sample work on device 1 and device 3?
  • Was USB 3 used for all devices?
  • Are devices 2 and 3 the same device?
  • Do you use the same sensor with all devices?

No, all devices have different sensors. We also test with deactivated license with a method that delete license.json in one folder (can’t remember where exactly)

  • Does nuitrack_sample work on device 1 and device 3?

Yes, both nuitrack_device_api_sample and nuitrack UI itself are running on device 1 and 3, within GNOME Desktop, and Terminal opened.
Update: I didn’t realize you mean the test camera window, yes it works on both device 1 and 3 within GNOME Desktop. They’re units for application development and we also test this with production application. Nuitrack skeleton tracking are working fine.

  • Was USB 3 used for all devices?

Yes, they’re all USB 3. We’re using NUC 10 and 11, and both of them don’t have USB 2.0 externally. And we’re connecting the camera directly on the box without any usb dongles or something.

  • Are devices 2 and 3 the same device?

No device 2 and 3 are not the same unit.

Hi @dongyiCai_retrobrain,

  • We have reproduced the issue in tty environment and could confirm that nuitrack wouldn’t work in specific cases.
  • Currently such environments aren’t tested/supported normally during mainstream release preparation.
  • Main purpose of DeviceAPI is to provide ability to activate license automatically (inside end-user application), currently we didn’t intend to fully cover/support server-like environments.
  • We have added this issue into backlog, it should be resolved during future development (but it’s hard to tell exact timeline, because prioritization is mostly shaped by paid projects).

Thank you for bringing attention to this issue.

Hi @dongyiCai_retrobrain,

We tested and recorded a video demonstrating how nuitrack_device_api_sample works in tty-only mode on Ubuntu 20.04.
We recommend installing nuitrack v0.35.15.
Could you please confirm that nuitrack 0.35.15 also works for you in tty-only mode?