User Tools

Site Tools


proiecte:sparrow

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
proiecte:sparrow [2017/02/02 13:48]
iulia.manda [Server]
proiecte:sparrow [2017/02/13 20:11] (current)
iulia.manda [Results and Future Work]
Line 22: Line 22:
 === CoAP === === CoAP ===
  
-The existing CoAP protocol library implementations make use of the implemented support for handling UDP packets on a specific board. The definition of a CoAP instance:+The existing CoAP protocol library [4] implementations make use of the implemented support for handling UDP packets on a specific board. The definition of a CoAP instance:
 <code>Coap::Coap( <code>Coap::Coap(
 #if defined(ARDUINO) #if defined(ARDUINO)
Line 35: Line 35:
 </code> </code>
  
-More details on how Sparkfun handles this can be found at [4]+More details on how Sparkfun handles this can be found at [5]
  
 As a <wifi> structure was already populated using the ESP8266 Arduino library, I decided to use it in CoAP instead of using UDP. As such, the definition of coap instance in our code looks as follows: As a <wifi> structure was already populated using the ESP8266 Arduino library, I decided to use it in CoAP instead of using UDP. As such, the definition of coap instance in our code looks as follows:
Line 45: Line 45:
 </code> </code>
  
-The updated library can can be downloaded at the end of this page.  +The updated library can can be downloaded at the end of this page [6]
- +
-=== Server Implementation === +
 ===== Client ===== ===== Client =====
  
 === libcoap === === libcoap ===
 +libcoap [7] is a C implementation of a lightweight application-protocol for devices that are constrained their resources such as computing power, RF range, memory, bandwith, or network packet sizes. This protocol, CoAP, is standardized by the IETF as RFC 7252.
 +In our project, we use the client implementation from libcoap, as follows:
 +<code>
 +$ ./coap-client -m get coap://X.X.X.X:port/resource
 +</code>
 +where X.X.X.X is the IP assigned to the ESP after connecting to a local WiFi, the port is set in out server implementation and the resource is exposed by each implemented callback in the sever.
  
 === Copper === === Copper ===
 +Copper (CU) [8] is a Firefox plugin that implements the RFC 7252 and URI handling for the 'coap' scheme. It provides interaction through GET, POST, PUT, and DELETE, resource discovery, block wise transfers and resource observation.
 +
  
 ===== Testing ===== ===== Testing =====
  
-===== Results =====+In order to test the functionality of the ESP and the correct interconnection of the components from software, I have used test_espmodule.ino [9], which is attached at the end of this page. It is very useful as it uses AT basic commands and there is a transparent view of the status of the ESP. It is also very simple to update. 
 + 
 +{{:proiecte:screen_shot_2017-02-13_at_18.18.16.png?400|}} 
 +{{ :proiecte:screen_shot_2017-02-13_at_18.18.27.png?400|}} 
 +===== Results and Future Work ===== 
 + 
 +This project is in a Proof-of-Concept state right now. Led on pin 11 can be turned on and off from the Coap client. After adding arduino-ESP8266 and COAP libraries to Arduino/libraries, espwifi_poc.ino [10] can be run to start the server. One must follow the activity on the serial in order to get the assigned IP address. This will be used afterwards in Copper (Firefox) to connect to the server, in our example as follows: 
 + 
 +<code> 
 +coap://<ip_address>:8083/light123 
 +</code> 
 + 
 +{{:proiecte:screen_shot_2017-02-13_at_19.27.50.png?400|}} 
 +{{ :proiecte:screen_shot_2017-02-13_at_19.27.40.png?400|}} 
 + 
 + 
 +For a more efficient system, we mention the following: 
 +- CH_PD of the ESP can be used to deactivate the chip when it is not necessary; 
 +- read data from the sensors at specific larger moments of time, and use the CH_PD to also send data to the client rarely. 
  
 ===== Resources ===== ===== Resources =====
 +
 +  * [1] Intial Arduino-ESP8266: https://github.com/Diaoul/arduino-ESP8266
 +  * [2] AT Command Set: http://www.pridopia.co.uk/pi-doc/ESP8266ATCommandsSet.pdf
 +  * [3] Modified Arduino-ESP8266: {{:proiecte:arduino-esp8266.zip|}}
 +  * [4] Initial Coap Server Library: https://github.com/hirotakaster/CoAP
 +  * [5] Sparkfun and ESP8266: https://www.sparkfun.com/products/13287
 +  * [6] Modified Coap Server Library: {{:proiecte:libcoap.zip|}}
 +  * [7] libcoap Client: https://sourceforge.net/projects/libcoap/
 +  * [8] Copper (CU): https://addons.mozilla.org/en-US/firefox/addon/copper-270430/
 +  * [9] Check running ESP: {{:proiecte:test_espmodule.zip|}}
 +  * [10] Sparrow-ESP8266 PoC {{:proiecte:espwifi_poc.zip|}}
  
proiecte/sparrow.1486036088.txt.gz · Last modified: 2017/02/02 13:48 by iulia.manda