Hype is an SDK for cross-platform peer-to-peer communication with mesh networking. Hype works even without Internet access, connecting devices via other communication channels such as Bluetooth, Wi-Fi direct, and Infrastructural Wi-Fi.
The Hype SDK has been designed by Hype Labs. It is currently available for multiple platforms.
You can start using Hype today.
This project is a decentralized peer-to-peer publisher-subscriber system powered by the HypeSDK, for the Linux platform. Due to its decentralized nature this system is more robust than traditional publisher-subscriber systems that usually requires a centralized broker to serve as intermediary between publishers and subscribers. You can find out a detailed description of the system in this article. You can also see a demonstration video of the system here.
This demo does not work out of the box. The following are the necessary steps to configure it:
- Download the SDK binaries for the Linux platform.
- Extract it, and drag the folder named hype, which is located inside the folder named lib, to the project root folder
- Access the apps page and create a new app
- Name the app and press "Create new app"
- Go to the app settings
- Copy the identifier under
App ID
- In the file include/hype_pub_sub/hpb_constants.h, find the line that reads
#define HPB_HYPE_APP_IDENTIFIER "{{app_identifier}}"
- Replace
{{app_identifier}}
by the App ID you just copied - Go back to the app settings
- This time, copy the
Access Token
, under the Authorization group - Open the same file, include/hype_pub_sub/hpb_constants.h, and find the line that reads
#define HPB_HYPE_ACCESS_TOKEN "{{access_token}}"
- Replace
{{access_token}}
by the token you just copied
You should be ready to go! If you run into trouble, feel free to reach out to our community or browse our other support options. Also keep in mind our project templates on the apps page for demos working out of the box.
The project can be compiled using the provided CMakeLists file. You can compile the project using the following commands:
mkdir -p build && cd build
cmake -G "Unix Makefiles" -DABI={{ABI}} ../
make
NOTE: {{ABI}} must be replaced by a valid Hype SDK architecture: amd64, i686, armel or armhf.
If you also want to compile the unit tests you can use the following commands (This requires the CUnit test framework to be installed):
mkdir -p build && cd build
cmake -G "Unix Makefiles" -DHYPE_PUB_SUB_COMPILE_TESTS=ON -DABI={{ABI}} ../
make
NOTE: {{ABI}} must be replaced by a valid Hype SDK architecture: amd64, i686, armel or armhf.
This application can be controlled using its command line interface. The following commands are available:
- --subscribe
{{service_name}}
: Allows to subscribe a service. - --unsubscribe
{{service_name}}
: Allows to unsubscribe a service. - --publish
{{service_name}}
: Allows to publish a message in a service. - --print-own-id : Prints the Hype identifier and the key of this device.
- --print-hype-devices : Prints the Hype identifier and the key of the devices found in the network.
- --print-managed-services : Prints the services which are managed by this device.
- --print-subscriptions : Prints the services subscribed by this device.
- --help : Prints the helper menu of this application.
- --quit : Terminates the application.
Besides Linux, this project is available for the following platforms:
Click here to see a demonstration video, on the iOS platform.
This project is MIT-licensed.
Follow us on twitter and facebook. We promise to keep you up to date!