Upload
allseen-alliance
View
236
Download
0
Tags:
Embed Size (px)
Citation preview
5/26/2015 AllSeen Alliance 1
Designing for Interoperability:
Yuping Tseng
CTO, ThroughTek Inc.
Incorporating AllJoyn Framework
to the Kalay Platform
5/26/2015 AllSeen Alliance 22
1. Introduction About ThroughTek
2. Use Application:
Surveillance for the Smart Home
3. How Kalay Works with AllJoyn
4. Potential Issues and Difficulties
5. Future Possibilities:
Smart Home and Beyond
Agenda
5/26/2015 AllSeen Alliance 4
About ThroughTek
• Committed to IoT (Internet of Things) & M2M (Machine to Machine)
– Kalay Platform: Kalay Cloud, Kalay Connect, Kalay Application
• Total solution provider for cloud connection platform
• Support streamlined enterprise entry into IoT & M2M markets
• Robust cloud functionality with modular, scalable architecture
26 May 2015 AllSeen Alliance 5
Align Our Values
• Develop strategic services to optimize product experiences
• Work together across company lines and industries
• Create opportunities for the IOT market
• Create products & apps that will be interoperable in the future
5/26/2015 AllSeen Alliance 6
About ThroughTek
• Established in July 2008
• Employees: 150+
• Headquarters: Taipei, Taiwan
• Branches:
– Shenzhen
– Shanghai
– Hong Kong
– Yilan
5/26/2015 AllSeen Alliance 7
Kalay Platform Operating Statistics
6,000,000
Connected Devices
90,000,000
Connections per Month
5/26/2015 AllSeen Alliance 8
What Does Kalay Mean?
“Handshake” in the language of the aboriginal Tao people of Taiwan
Connecting All Devices
5/26/2015 AllSeen Alliance 11
High Level Platform Overview
• Kalay modules: A full suite of
intelligence capabilities
• Kalay SDK
• FW Integration
• Generic Applications & Portal
• Customization Service
5/26/2015 AllSeen Alliance 12
Kalay Platform Structure
SDK & RESTful APIs
Consumer
Device Layer
Enterprise
Retail Industry Agriculture Home Storage Wearables
3rd Party
Modules
3rd Party
Modules
Analytics Logic Engine VSaaS Cloud StorageTPNS BillingP2P/RelayUID
Kalay Connect
5/26/2015 AllSeen Alliance 13
Kalay P2P / Relay Server
• P2P delivers real live view, reduced data costs & greater privacy
• P2P and Relay means always connected
UID VerifyAccess with
UID & Password
Connection Established
Kalay P2P / Relay Server
Device
Device Firmware
UID
Kalay APIModules
Host OS
Client
Browser or App
Kalay API Modules
Host OS
5/26/2015 AllSeen Alliance 15
Kalay Logic Engine
Execute tasks on
devices across LAN,
WAN or Internet
Work with 3rd party
applications
Collect rules for
consumer
behaviour analysis
IFTTT Concept for Task Automation
(IF This Then That)
5/26/2015 AllSeen Alliance 17
Kalay Push Notification System
TPNS Server
1.Register
2. Event
• Supports push from
multiple forms
• Push scheduling
• Push analysis
5/26/2015 AllSeen Alliance 20
Most Variet Chipset EcosystemWe support more than 100 SOCs
Intel Atom,
Intel series
X1000
MT7620A
RT3352
RT5350
RTF5350
MT6260
Hi8107
Hi3512
Hi3515
Hi3515A
Hi3516
Hi3518
Hi3520A
Hi3520D
Hi3521
Hi3535
Hi3716C
GM8139
GM8120
GM8126
GM8161
GM8181
8196C
8196D
8196E
8197D
TI8168
DM365
TI365
TI8107
BCM2835
BCM7424B2
iMAPx15
iMAPx210
5/26/2015 AllSeen Alliance 22
Surveillance for the Smart Home
• Data and cost intensive
• Reliable live streaming not easy to achieve
5/26/2015 AllSeen Alliance 23
AllSeen Demo at MWC
5/26/2015 AllSeen Alliance 24
Discovering Devices, Notifications and Live Streaming
• Combine AllJoyn notification framework and Kalay Multimedia SDK
• App developed to integrate Kalay and Gateway Controller Framework
• Kalay Cloud Service used for remote access
KalayCloud Service
IP Camera
Notification
Service
Framework
Kalay
Multimedia
SDK
Raspberry Pi (Gateway Agent)
Gateway
Agent
Framework
Kalay BOX
SDK
LG TV
Notification
Service
Framework
PESI Set Top Box with Storage
Notification
Service
Framework
Kalay
Multimedia
SDK
Mobile Device
Gateway
Controller
Framework
Kalay
Multimedia
SDK
AllJoyn
Kalay
5/26/2015 AllSeen Alliance 26
What Each Framework OffersMinimal effort for integration
Cloud service and multimedia
module supports:
• Video streaming
• Push notification service
• Connectivity over the internet
Service runs on local network
and enables:
• Discovery
• Advertisement
• Notification
• Gateway Agent
KalayAllJoyn
5/26/2015 AllSeen Alliance 27
Works to be done with AllJoyn
• Build Standard AllJoyn Core
– AllJoyn router to create and join AllJoyn bus
– About Service to advertise the device, IP Cam, TV, or Storage
• Build Notification Service
– Producer for sending specific message, such as motion alert
– Consumer for receiving the alert and taking follow-up actions.
• Build Gateway Connector of Gateway Agent Service
– Connect to Gateway Management Node
– Write a script to send message to TPNS server for push notification
5/26/2015 AllSeen Alliance 28
Producer Sample code
• Take two parameters from command line: UID, message
std::map<qcc::String, qcc::String> customAttributes;
customAttributes[KEY1] = argv[1];
std::vector<NotificationText> vecMessages;
NotificationText textToSend1(LANG1, argv[2]);
vecMessages.push_back(textToSend1);
//Prepare Rich Notification Content
.....
// Send messages
Notification notification(messageType, vecMessages);
notification.setCustomAttributes(customAttributes);
// Set Rich content
....
status = Sender->send(notification, 7200);
5/26/2015 AllSeen Alliance 29
Consumer Sample code
• Check if wanted message and whether to take actions
// If applications list is empty or the name exists in the filter list then print the notification
if ((m_Applications.size() == 0) || (find(m_Applications.begin(), m_Applications.end(), appName)
!= m_Applications.end())) {
// "******************** Begin New Message Received ********************"
std::ofstream outFile;
outFile.open(outFilename.c_str());
std::cout << "Other parameters included:" << std::endl;
std::map<qcc::String, qcc::String> customAttributes = notification.getCustomAttributes();
std:String msg = "Nothing";
for (std::map<qcc::String, qcc::String>::const_iterator customAttributes_it = customAttributes.begin();
customAttributes_it != customAttributes.end(); ++customAt$
outFile << customAttributes_it->second.c_str() << std::endl;
}
// get vector of text messages and iterate through it
std::vector<NotificationText> vecMessages = notification.getText();
for (std::vector<NotificationText>::const_iterator vecMessage_it = vecMessages.begin();
vecMessage_it != vecMessages.end(); ++vecMessage_it) {
outFile << vecMessage_it->getText().c_str() << std::endl;
}
outFile.close();
....
}
5/26/2015 AllSeen Alliance 30
GatewayConnector Sample code
• Receive the message from Notification service and invoke the script
class MyReceiver : public NotificationReceiver {
public:
virtual void Receive(Notification const& notification) {
vector<NotificationText> vecMessages = notification.getText();
for (vector<NotificationText>::const_iterator it = vecMessages.begin();
it != vecMessages.end(); ++it) {
if (tutkScript.size() && it->getLanguage().compare("en") == 0) {
qcc::String cmd = "sh -i " + tutkScript + " \"" + notification.getAppName() +
" sent: " + it->getText().c_str() + "\"";
int result = system(cmd.c_str());
result = WEXITSTATUS(result);
}
}
}
};
5/26/2015 AllSeen Alliance 31
Works to be done on Kalay side
• Build Kalay Modules on device / IP camera
– Embed with UID for identification and P2P service
– Use AV module to send video stream
• Build the client for AV module
– Receive UID from AllJoyn notification and pass to AV client
– Display video stream if the client is a set-top box or smart TV
– Store the video stream as file if the drive is storage or NAS
• Write script to send push notification
– Send message to TPNS server and push to smart phones
– Similar to tweeter script in AllJoyn sample, a RESTful request
UID
Service
5/26/2015 AllSeen Alliance 33
What to do with AllSeen / AllJoyn?
• When and how will we find compatible solution with AllSeen?
– No clear idea about AllJoyn framework
– False expectation beyond current limitations
• How to interact with AllJoyn devices?
– Core component, basic services, working groups
– Add some extra control over existing services
• How to interact with other AllJoyn devices made by 3rd-party?
– Do current available components provide necessary capabilities?
– Customized works on top of current services to share between partners
5/26/2015 AllSeen Alliance 34
Technical Challenges
• Fit AllJoyn to Device
– Set up the right environment to build the modules
– Select the necessary modules to limit the overall code size
• Resolve Conflicts Between Two Frameworks
– Potential port conflicts
– Libraries inconsistency
• Testing on Raspberry Pi
– Complete tutorial of building AllJoyn on Raspberry Pi
– Kalay modules ready for Raspberry Pi
5/26/2015 AllSeen Alliance 3939
Visit our website:
• Our latest white paper with Machina Research
“Combining the four pillars of innovation within the
Internet of Things in one platform”
Our open SDK Kalay Kit:
• http://www.throughtek.com
Learn More About ThroughTek
5/26/2015 AllSeen Alliance 40
or visit www.throughtek.com