Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

使用XMPP進行遠端設備控制

5,293 views

Published on

物聯網(Internet of Things, IOT)時代的興起,不僅人跟人之間可以透過網路相互聯繫外,人跟物品、物品與物品之間,也可以透過網路環境互通。當許多設備或物品都可以連上Internet時,我們開始思考著一件事,如果可以用即時通訊(Instant Messaging,簡稱IM)軟體,如MSN、Skype、Google Talk之類的軟體和我們的機器進行對話,不就可以達成即時的Internet遠端設備監控。本組的專題就對此一機制將它具體實現。
2012/11/28 (三) 艾鍗學院嵌入式Linux軟韌體就業專班成果展--利用IM進行遠端設備控制
更多資訊參考艾鍗BLOG
http://sites.powercam.cc/board.php?courseID=143&f=doc&cid=9404

Published in: Software
  • Be the first to comment

使用XMPP進行遠端設備控制

  1. 1. 101年嵌入式Linux系統開發就業班運用即時通訊服務進行遠端設備控制Use Instant Message Services to Control RemoteDevices 成員: 林正育、劉乃文、賴彥翔 11/28/2012
  2. 2. Outline Project Objectives Achievement System Architecture Features of The System System Components Data Flow Examples DEMO Q&A
  3. 3. Can We Use A Cell Phone to Control A Devices OverThe Internet Cloud?
  4. 4. Objectives Use an IM (Instant Message) protocol to control devices on an embedded system. Control the embedded devices remotely through internet. Minimum system administration efforts. Flexible to change the configuration without re-compiling and re-start the daemon.
  5. 5. Achievement Study XMPP (Extensible Messaging and Presence Protocol) specifications (RFC’s). Select an XMPP server on internet. Understand the usage of the XMPP services. Design the architecture of the control protocol. Implement the ITRC (IT Remote Control) on ARM embedded system. Successfully test and prove the architecture.
  6. 6. System Architecture Linux Embedded System Cell Phone/PC DeviceSend command in Extract command from 1xmpp format xmpp and launch command Execute command and Google Itrcd print results Talk Internet (Remote Client Control Device Daemon) 2Receive the Return the resultsexecution results in xmpp format Other components: 1> itdevconfig Device 2> itdevlist 3 3> .itrclogin 4> .itrcdev
  7. 7. Features of The System Comply with open standard • Use IETF XMPP as the communication protocol. Effortless to maintain and operate • Leverage Google IM services. • Use Google Talk as client software. Flexible to integrate with other devices • ITRCD does not need the knowledge of devices • Design ITRCD protocol to communicate with devices Portable to different embedded systems • Develop in C the native language used in Linux.
  8. 8. System Components itrcd: a daemon process to provide remote shell capability for Google Talk clients. itdevconfig: manage the device list in the configuration file. itdevlist: retrieve the device information in the configuration file. .itrclogin: XMPP login information file. .itrcdev: device configuration file.
  9. 9. itrcd Run on the same embedded system with the devices to be controlled. Authenticate and login to Google Talk XMPP server. Run the commands sent from the Gtalk clients through XMPP Message protocol. Return the output of the commands back to Gtalk clients.
  10. 10. itdevadd A program can be run by a user on the embedded system. Provides text user interface for user to manage the configuration file. Users can add, delete, modify, and list the devices which will be controlled by ITRC.
  11. 11. itdevlist A program sit on the embedded system. Read the configuration file and print out the device list with device_id, device_name, device_cmmand for each device. Gtalk client can send this command to get the device information and use it to control the devices.
  12. 12. .itrclogin A hidden file on embedded system. Contain jid and passoword to login to XMPP server. The format is jid:password in one line for each user login information.
  13. 13. .itrcdev A hidden file on embedded system. Contain device information for the devices on the embedded system. The format is device_id:device_name:device_command in one line for each device.
  14. 14. ITRCD Protocolstep Gtalk Client ITRCD1 Itdevlist return device information to Gtalk client2 <device_command> help return the usage information3 “<device_command> Execute the command on the device <operation> accordingly and return the results. [parameter] ..”4 Repeat step 2 or step 3 disconnect close the stream session and terminate ITRCD
  15. 15. State Diagram of ITRCD ProtocolRemote Google Talk Client ITRCD Device Send “itdevlist” Return available devices and commands Send “<command> help” Launch “<command> help” Execute “<command> help” Print the usage information Return the usage information Send “<command> <op> <para> …” Launch “<command> <op> <para>…” Execute“<command> <op> <para>…” Print the results Return the results
  16. 16. Data Flow Example Gtalk Client: send “itdevlist” itrcd: run “itdevlist” and return device information to Gtalk client. Gtalk Client: send “<device_command> help” ITRCD: run “<device_command> help” Device Program: print the usage information. ITRCD: return the usage information to Gtalk client. Gtalk Client: send “<device_command> <operation> <parameter> ..” ITRCD: run “<device_command> <operation> <parameter> ..” Device Program: execute the command on the device accordingly and print the results. ITRCD: return the result back to Gtalk client.
  17. 17. Demo Screenshot
  18. 18. Q&A

×