API change , Retransmission Callback on expiry , remove glib source for dynamic linking
[platform/upstream/iotivity.git] / resource / csdk / connectivity / build / arduino / README.txt
1 Setting Wi-Fi SSID and Password for Arduino Wi-FI Shield
2 =====================================
3 PreCondition: In connectivity\src\wifi_adapter\arduino\cawifiserver.cpp 
4 Update the SSID and Password credentials before testing with Wi-Fi Shield
5 char ssid[] = "";     //  your network SSID (name)
6 char pass[] = "";  // your network password
7
8 Compiling Interface APIs for ARDUINOMEGA:
9 ========================================
10 PREREQ: Arduino MUST be installed in the machine where we compile. Suppose ARDUINO_DIR = <PATH_TO_ARDUINO_INSTALL_DIR>/arduino-1.5.x
11 1) Patch the Wiznet Ethernet library with the patch available at :
12         I. connectivity\lib\extlibs\arduino_linux_ethernet_cpp.patch
13                 II.connectivity\lib\extlibs\arduino_linux_ethernet_socket_cpp.patch
14         Place both these libraries in the ARDUINO_DIR/libraries/ folder where remaining libraries are present.
15 2) Arduino builds are dependent on latest Time and TimedAction libraries. Download it from here:
16                 I. http://playground.arduino.cc/Code/Time
17                 II.http://playground.arduino.cc/Code/TimedAction
18 3) For TimedAction library. Apply the following patch.
19     (Also the updated library has been pushed for reference at : connectivity\lib\extlibs\TimedAction)
20         TimedAction.h Line 33 : Replace "WProgram.h" with "Arduino.h"
21 4) Go to "connectivity\build\arduino" directory, Open Makefile and change ARDUINO_PORT according to connected PORT
22 5) BUILD :  Go to "connectivity\build" directory. To build a specific TRANSPORT [ETHERNET,BLE,WIFI], use the following command :
23         sudo make PLATFORM=arduinomega TRANSPORT=<ETHERNET/BLE/WIFI> ARDUINO_DIR = <PATH_TO_ARDUINO_INSTALL_DIR>/arduino-1.5.x
24
25 Note: Prior to building for BLE Transport, following additional steps are required:
26 1) Copy the directory "connectivity\src\bt_le_adapter\arduino\external\RBL_nRF8001" to "arduino-<x.x.x>/library" folder
27 2) Download BLE library zip file from the link(https://github.com/NordicSemiconductor/ble-sdk-arduino) 
28    Extract zip file and copy the "BLE" folder available under "libraries" folder and place it in "arduino-<x.x.x>/library" folder
29 3) In caleadapter.cpp, modify BLE_ADDRESS macro to Target Arduino BLE Shield Address.
30    This file is present in "connectivity/src/bt_le_adapter/arduino" folder
31
32 Flashing Interface APIs for ARDUINOMEGA:
33 ========================================        
34 Precondition: Connect Arduino Mega Board to Linux PC. Open Arduino IDE and select corresponding connected PORT
35 1) To Install, connect the ArduinoMega Board with corresponding Shields to Linux PC. 
36 2) Perform sudo make install PLATFORM=arduinomega TRANSPORT=BLE    
37    It will flash BLE Transport Adaptor in Arduino Board. Similarly, TRANSPORT can be changed to ETHERNET, BLE, WIFI etc..
38    
39 To Run Adapter code in ARDUINOMEGA Board:
40 ========================================        
41 PreCondition: Flash the executable in ARDUINO MEGA BOARD. Follow above Step(Flashing Interface APIs for ARDUINOMEGA)
42 1) Open Serial Monitor in Arduino IDE. It will execute the flashed binary and logs will be available in serial Monitor under BaudRate(115200)