Activate Licenses
Most services are free. Three services need a per-feature license:
Client attribute |
gRPC service |
License code |
|---|---|---|
|
|
|
|
|
|
|
|
|
How licenses work
A license is bound to the TPM 2.0 security chip of the computer running the server. It cannot be copied to another machine. Enable the chip before you start the server; see Set Up the PDK Server.
Licenses are checked locally; no network connection is needed at run time.
Installing a license takes effect immediately. No restart is needed.
A machine without a license still runs every other service normally.
Calling an unlicensed service
The call returns normally with status.code == 5 (PERMISSION_DENIED).
status.message names the service and says what to do. Nothing is raised,
so the standard status check (Error Handling) catches it.
Checking license state
LicenseService does not need an active workcell:
from flexiv.pdk.license.license_service_pb2 import ListRequest
res = client.license.stub.List(ListRequest())
for service in res.services:
print(service.display_name, service.state, service.detail)
print("TPM available:", res.tpm_available, res.tpm_detail)
Each ServiceLicense has a state:
|
Meaning |
|---|---|
|
Licensed and usable. |
|
No license installed for this service. |
|
The license has expired. |
|
The license was issued for another computer. |
|
The license failed verification. |
|
The license needs a newer PDK. |
|
The license needs a newer PDK server. |
|
The security chip could not be read. |
Buying and installing a license
Licensing moves two files.
Get this computer’s identifier and email it to Flexiv:
pdk-scene license identifier # writes license_identifier.txt
From code:
client.license.stub.GetDeviceIdentifier(GetDeviceIdentifierRequest())returnsidentifier. It is a single line of about 2.4 kB, so send it as a file rather than pasting it.Install the ``.lic`` file Flexiv sends back:
pdk-scene license install -f NEB-2026-0042.lic
or from Python:
from flexiv.pdk.license.license_service_pb2 import LicensedService response = client.license.install_file("NEB-2026-0042.lic") if response.status.code != 0: print(response.status.message) else: print("Newly licensed:", [LicensedService.Name(s) for s in response.newly_licensed])
or from C++:
flexiv::pdk::license::SaveResponse response; const grpc::Status status = client.license().InstallFile("NEB-2026-0042.lic", &response); if (status.ok() && response.status().code() != flexiv::pdk::common::Status::OK) { std::cerr << response.status().message() << std::endl; }
install_fileandInstallFileread the file on the client machine and send its contents over gRPC, so the server may be on another host or in a container.Verify:
pdk-scene license status
Security chip: TPM 2.0 INTC Licenses in: /home/flexiv/user_data/license SERVICE LICENSE EXPIRES DETAIL Point-to-point path yes 2028-01-31 licensed to My Company Surface finish yes 2028-01-31 licensed to My Company Mesh operations no - License NEB-2026-0042 for My Company, expires 2028-01-31
DETAILsays why a service is not licensed, such as an expired license or an unreadable security chip.--jsonprints one object per service.