Setup SDK
Linux SDK Integration Guide
Overview
This guide is for developers who want to monetize Linux applications with PacketSDK.
Integrating the PacketSDK into an application is the first step toward earning revenue. Once you've integrated the SDK, you will start seeing devices data and revenue in PacketSDK Dashboard in 24 hours.
This document will walk you through the steps needed to be taken in order to properly integrate PacketSDK into your application.
Prerequisites
Create an app in PacketSDK Dashboard and obtain the corresponding appkey. 'appkey' is an important way to track your earnings, please ensure it is set correctly in the subsequent integration steps.
Download the PacketSDK Linux integration package
packet_sdk_linux-1.0.*.zipand unzip it. Once you unzip the package, you can see the following contents: packet_sdk_linux-1.0.*.zip ├───x86_64(amd64) ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, stripped ├───Intel 80386 ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), static-pie linked, stripped ├───aarch64 ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), static-pie linked, stripped ├───armv5l ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), static-pie linked, stripped ├───armv6 ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), static-pie linked, stripped └───armv7l ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), static-pie linked, stripped
Step 1: Select the program corresponding to the CPU architecture.
You can use the
uname -acommand to view the CPU architecture of Linux devices.You can use the
file packet_sdkcommand to view the architecture of the PacketSDK executable program.
Note
If you need Linux PacketSDK with other CPU architectures, please contact our customer service personnel.
Step 2: Granting read, write, and execute permissions to programs.
chmod 777 packet_sdkStep 3: Start the program using the appkey.
./packet_sdk \
-appkey=YOURAPPKEY
-dns_server=8.8.8.8 (optional)
-dns_network_protocol=udp (optional, tcp/udp)Note
Since version 1.0.3, PacketSDK linux executable program will default to using system DNS. If your device is not configured with DNS service, you need to manually specify the DNS server to the SDK using the '- dns_server=' parameter to prevent it from not working properly.
PacketSDK linux executable program don't have the function of auto start and keep alive, you need to set it yourself.
Step 4: Verify if integration is successful.
When you receive "This device has been successfully certified" in the console, it indicates that you have successfully started the Linux PacketSDK.You will start seeing devices data and revenue in PacketSDK Dashboard in 24 hours.
Last updated