Commit ec501972 authored by Ashok Channa's avatar Ashok Channa Committed by Patrick Lankswert

Added connectivity files for full code review

Please comment on patch set 14 if any comments are not addressed
from 1~13.

NOTE:
1)Code Comments till Patch Set 13 are updated.
2)Please put your comments on new patch sets(at least from 13)  and
try to avoid on old patch sets as it difficult to review the old sets

Modified CA source files for review comments.
Updated documentation, return parameters with CAResult, optimization etc.
Global variable naming conventions ..

Change-Id: Id19ec37831ae46896b59007cdde07217b5d8696a
Signed-off-by: default avatarAshok Channa <ashok.channa@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/193Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarPatrick Lankswert <patrick.lankswert@intel.com>
parent bb09189b
......@@ -22,7 +22,7 @@ Preconditions:
3)libcoap.a library ( do make @lib/libcoap-4.1.1)
4)tinyDTLS library for DTLS enabled applications( enable DTLS = 1 in makefile @connectivity\build/linux)
5)Ethernet, BLE, TimedActions, Timer libraries for arduino support.
6)scons for scon script compilation.
6)scons for scons script compilation.
Scope of Release:
1. Supported APIs ( please check below APIs)
......@@ -93,4 +93,5 @@ Client: Server side: n for network selection (WIFI enabled by default)
How to Build for Linux/DTLS:
sudo ./sample.sh WITH_DTLS @@connectivity\samples\linux
./sample.sh WITH_DTLS @@connectivity\samples\linux
......@@ -28,7 +28,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#ifdef __cplusplus
......@@ -51,15 +51,28 @@ extern "C"
*/
#define CA_MAX_HEADER_OPTION_DATA_LENGTH 16
/**
* @brief Max token length
*/
#define CA_MAX_TOKEN_LEN (8)
/**
* @brief Max URI length
*/
#define CA_MAX_URI_LENGTH 2048
#ifdef ARDUINO
#define CA_MAX_URI_LENGTH 128 /* maximum size of URI for embedded platforms*/
#else
#define CA_MAX_URI_LENGTH 512 /* maximum size of URI for other platforms*/
#endif
/**
* @brief Max token length
* @brief Max PDU length supported
*/
#define CA_MAX_TOKEN_LEN (8)
#ifdef ARDUINO
#define COAP_MAX_PDU_SIZE 320 /* maximum size of a CoAP PDU for embedded platforms*/
#else
#define COAP_MAX_PDU_SIZE 1400 /* maximum size of a CoAP PDU for big platforms*/
#endif
/**
* @brief option types - the highest option number 63
......@@ -67,6 +80,7 @@ extern "C"
#define CA_OPTION_IF_MATCH 1
#define CA_OPTION_ETAG 4
#define CA_OPTION_IF_NONE_MATCH 5
#define CA_OPTION_OBSERVE 6
#define CA_OPTION_LOCATION_PATH 8
#define CA_OPTION_URI_PATH 11
#define CA_OPTION_CONTENT_FORMAT 12
......@@ -75,7 +89,6 @@ extern "C"
#define CA_OPTION_URI_QUERY 15
#define CA_OPTION_ACCEPT 17
#define CA_OPTION_LOCATION_QUERY 20
#define CA_OPTION_OBSERVE 6
/**
* @brief Payload information from resource model
......@@ -92,16 +105,6 @@ typedef char *CAURI_t;
*/
typedef char *CAToken_t;
/**
* @enum CABool_t
* @brief Boolean value used for specifying the success or failure
*/
typedef enum
{
CA_FALSE = 0, /**< False */
CA_TRUE /**< True */
} CABool_t;
/**
* @enum CAConnectivityType_t
* @brief Different connectivities that are handled in Connectivity Abstraction
......@@ -120,8 +123,8 @@ typedef enum
*/
typedef enum
{
CA_INTERFACE_UP, /**< Connection is Available */
CA_INTERFACE_DOWN /**< Connection is not available */
CA_INTERFACE_DOWN, /**< Connection is not available */
CA_INTERFACE_UP /**< Connection is Available */
} CANetworkStatus_t;
/**
......@@ -151,7 +154,7 @@ typedef union
struct
{
char ipAddress[CA_IPADDR_SIZE]; /**< Ip address of the interface**/
uint32_t port; /**< port information**/
uint16_t port; /**< port information**/
} IP;
} CAAddress_t;
......@@ -164,7 +167,8 @@ typedef enum
CA_MSG_CONFIRM = 0, /**< confirmable message (requires ACK/RST) */
CA_MSG_NONCONFIRM, /**< non-confirmable message (one-shot message) */
CA_MSG_ACKNOWLEDGE, /**< used to acknowledge confirmable messages */
CA_MSG_RESET /**< indicates error in received messages */
CA_MSG_RESET /**< used to indicates not-interested or error (lack of context)in
received messages */
} CAMessageType_t;
/**
......@@ -188,7 +192,7 @@ typedef struct
CAURI_t resourceUri; /**< Resource URI information **/
CAAddress_t addressInfo; /**< Remote Endpoint address **/
CAConnectivityType_t connectivityType; /**< Connectivity of the endpoint**/
CABool_t isSecured; /**< Secure connection**/
bool isSecured; /**< Secure connection**/
} CARemoteEndpoint_t;
......@@ -207,8 +211,8 @@ typedef struct
typedef struct
{
CAAddress_t addressInfo; /**< Address of the interface **/
CAConnectivityType_t type; /**< Connectivity type that localconnectivity avaialble **/
CABool_t isSecured; /**< Secure connection**/
CAConnectivityType_t type; /**< Connectivity of local device **/
bool isSecured; /**< Secure connection**/
} CALocalConnectivity_t;
/**
......@@ -230,8 +234,8 @@ typedef enum
CA_MEMORY_ALLOC_FAILED, /**< Memory allocation failed */
CA_REQUEST_TIMEOUT, /**< Request is Timeout */
CA_DESTINATION_DISCONNECTED, /**< Destination is disconnected */
CA_STATUS_FAILED, /**< Failure */
CA_NOT_SUPPORTED /**< Not supported */
CA_NOT_SUPPORTED, /**< Not supported */
CA_STATUS_FAILED =255 /**< Failure */
/* Result code - END HERE */
} CAResult_t;
......@@ -245,11 +249,10 @@ typedef enum
CA_SUCCESS = 200, /**< Success */
CA_CREATED = 201, /**< Created */
CA_DELETED = 202, /**< Deleted */
CA_EMPTY = 231, /**< Empty */
CA_BAD_REQ = 400, /**< Bad Request */
CA_BAD_OPT = 402, /**< Bad Option */
CA_NOT_FOUND = 404, /**< Not found */
CA_RETRANSMIT_TIMEOUT = 531 /**< Retransmit timeout */
CA_RETRANSMIT_TIMEOUT = 500 /**< Retransmit timeout */
/* Response status code - END HERE */
} CAResponseResult_t;
......@@ -269,8 +272,8 @@ typedef enum
*/
typedef enum
{
CA_ADAPTER_ENABLED, /**< Adapter is Enabled */
CA_ADAPTER_DISABLED /**< Adapter is Disabled */
CA_ADAPTER_DISABLED, /**< Adapter is Disabled */
CA_ADAPTER_ENABLED /**< Adapter is Enabled */
} CAAdapterState_t;
/**
......@@ -294,10 +297,11 @@ typedef struct
*/
typedef struct
{
CAMessageType_t type; /**< Qos for the request */
uint16_t messageId; /**< Message id.
* if message id is zero, it will generated by CA inside.
* otherwise, you can use it */
CAMessageType_t type; /**< Qos for the request */
CAToken_t token; /**< Token for CA */
CAHeaderOption_t *options; /** Header Options for the request */
uint8_t numOptions; /**< Number of Header options */
......@@ -322,8 +326,8 @@ typedef struct
*/
typedef struct
{
CAInfo_t info; /**< Information of the response */
CAResponseResult_t result; /**< Result for response by resource model */
CAInfo_t info; /**< Information of the response */
} CAResponseInfo_t;
#ifdef __cplusplus
......@@ -331,3 +335,4 @@ typedef struct
#endif
#endif //#ifndef __CA_COMMON_H_
......@@ -27,7 +27,7 @@
#define __CA_INTERFACE_H_
/**
* Connectivity Abstraction Interface Description APIs.
* Connectivity Abstraction Interface APIs.
*/
#include "cacommon.h"
......@@ -107,6 +107,7 @@ CAResult_t CAStartDiscoveryServer();
* @param RespHandler [IN] Response Handler Callback
* @see CARequestCallback
* @see CAResponseCallback
* @return NONE
*/
void CARegisterHandler(CARequestCallback ReqHandler, CAResponseCallback RespHandler);
......@@ -179,7 +180,7 @@ CAResult_t CAFindResource(const CAURI_t resourceUri, const CAToken_t token);
* @param requestInfo [IN] Information for the request.
* @return #CA_STATUS_OK #CA_STATUS_FAILED #CA_MEMORY_ALLOC_FAILED
*/
CAResult_t CASendRequest(const CARemoteEndpoint_t *object, CARequestInfo_t *requestInfo);
CAResult_t CASendRequest(const CARemoteEndpoint_t *object,const CARequestInfo_t *requestInfo);
/**
* @brief Send control Request on a resource to multicast group
......@@ -198,7 +199,8 @@ CAResult_t CASendRequestToAll(const CAGroupEndpoint_t *object,
* @param responseInfo [IN] Information for the response
* @return #CA_STATUS_OK or #CA_STATUS_FAILED or #CA_MEMORY_ALLOC_FAILED
*/
CAResult_t CASendResponse(const CARemoteEndpoint_t *object, CAResponseInfo_t *responseInfo);
CAResult_t CASendResponse(const CARemoteEndpoint_t *object,
const CAResponseInfo_t *responseInfo);
/**
* @brief Send notification to the remote object
......@@ -208,18 +210,18 @@ CAResult_t CASendResponse(const CARemoteEndpoint_t *object, CAResponseInfo_t *re
* @return #CA_STATUS_OK or #CA_STATUS_FAILED or #CA_MEMORY_ALLOC_FAILED
*/
CAResult_t CASendNotification(const CARemoteEndpoint_t *object,
CAResponseInfo_t *responseInfo);
const CAResponseInfo_t *responseInfo);
/**
* @brief To advertise the resource
* @param resourceUri [IN] URI to be advertised
* @param token [IN] Token for the request
* @param options [IN] Header options information
* @param numOptions [IN] Number of options
* @param resourceUri [IN] URI to be advertised
* @param token [IN] Token for the request
* @param options [IN] Header options information
* @param numOptions [IN] Number of options
* @return #CA_STATUS_OK or #CA_STATUS_FAILED or #CA_MEMORY_ALLOC_FAILED
*/
CAResult_t CAAdvertiseResource(const CAURI_t resourceUri, CAToken_t token,
CAHeaderOption_t *options, uint8_t numOptions);
CAResult_t CAAdvertiseResource(const CAURI_t resourceUri,const CAToken_t token,
const CAHeaderOption_t *options,const uint8_t numOptions);
/**
* @brief Select network to use
......@@ -240,7 +242,8 @@ CAResult_t CAUnSelectNetwork(const uint32_t nonInterestedNetwork);
* It should be destroyed by the caller as it Get Information.
* @param info [OUT] LocalConnectivity objects
* @param size [OUT] No Of Array objects
* @return #CA_STATUS_OK or #CA_STATUS_FAILED or #CA_STATUS_INVALID_PARAM or #CA_MEMORY_ALLOC_FAILED
* @return #CA_STATUS_OK or #CA_STATUS_FAILED or #CA_STATUS_INVALID_PARAM or
* #CA_MEMORY_ALLOC_FAILED
*/
CAResult_t CAGetNetworkInformation(CALocalConnectivity_t **info, uint32_t *size);
......@@ -255,3 +258,4 @@ CAResult_t CAHandleRequestResponse();
#endif
#endif
=== Pre requites ===
=== Prerequisites ===
* 1. Scons
......@@ -31,7 +31,7 @@ Linux Build:
3) The above command will build sample also.
For Enabling Secured server,
For Enabling Secured server,
* Note: tinydtls library has to copied to "connectivity/lib/tinydtls" for secured build.
Secured Server will be only used for WIFI and ETHERNET transports.
......@@ -121,3 +121,4 @@ Note :- Currently only megaADK build is supported.
By Default DEVICE_NAME=OIC-DEVICE, if device name option is not specified
To change the port number, please modify "port" variable in __upload() function in: "/build/arduino/SConscript".
......@@ -52,7 +52,11 @@ install:
clean:
sh arduino/build.sh clean
else
$(info *********error**********)
$(error Wrong value for PLATFORM !!)
endif
......@@ -48,7 +48,10 @@ target_arch = ARGUMENTS.get('TARGET_ARCH', default_arch) # target arch
# True if binary needs to be installed on board. (Might need root permissions)
# set to 'no', 'false' or 0 for only compilation
require_upload = ARGUMENTS.get('UPLOAD', True)
require_upload = ARGUMENTS.get('UPLOAD', True)
# Get the device name
device_name = ARGUMENTS.get('DEVICE_NAME', "OIC-DEVICE")
######################################################################
# Common build options (release, target os, target arch)
......@@ -61,6 +64,9 @@ help_vars.Add(EnumVariable('TARGET_ARCH', 'Target architecture', default_arch, o
help_vars.Add(EnumVariable('SECURED', 'Build with DTLS', '0', allowed_values=('0', '1')))
help_vars.Add(BoolVariable('UPLOAD', 'Upload binary ? (For Arduino)', require_upload))
help_vars.Add(EnumVariable('BUILD_SAMPLE', 'Build with sample', 'ON', allowed_values=('ON', 'OFF')))
help_vars.AddVariables(('DEVICE_NAME', 'Network display name for device', 'OIC-DEVICE', None, None),)
######################################################################
# Platform(build target) specific options: SDK/NDK & toolchain
######################################################################
......@@ -82,9 +88,7 @@ else:
Help(help_vars.GenerateHelpText(env))
# Get the device name and set it to __OIC_DEVICE_NAME__
device_name = ARGUMENTS.get('DEVICE_NAME', "OIC-DEVICE")
print device_name
# Set device name to __OIC_DEVICE_NAME__
env.AppendUnique(CPPDEFINES = ['-D__OIC_DEVICE_NAME__=' + "\'\"" + device_name + "\"\'"])
tc_set_msg = '''
......@@ -187,8 +191,8 @@ Export('env')
######################################################################
if target_os == "yocto":
'''
This code injects Yocto cross-compilation tools+flags into scons'
build environment in order to invoke the relevant tools while
This code injects Yocto cross-compilation tools+flags into scons'
build environment in order to invoke the relevant tools while
performing a build.
'''
import os.path
......@@ -250,3 +254,4 @@ if env.GetOption('clean'):
Execute(Delete(dir + '/.sconf_temp'))
Return('env')
Compiling Interface APIs FOR Android:
===================================
•Preconditons :
Please download the glibc directory and keep $(CA_HOME)\lib\android\glib-master
Please download the following
1) glib directory and keep at $(CA_HOME)/lib/android/glib-2.40.2
2) tinydlts library and keep at $(CA_HOME)/lib/tinydtls
•Supported version : 5.0 ( Lollipop )
•Required NDK version : android-ndk-r10d ( https://developer.android.com/tools/sdk/ndk/index.html )
• Modify Makefile ( connectivity/build/android/Makefile )
......@@ -13,3 +15,4 @@ Compiling Interface APIs FOR Android:
$ cd ${CA_HOME}/connectivity/build/android
$ ndk-build clean; ndk-build
......@@ -155,14 +155,16 @@ else:
env.AppendUnique(CCFLAGS = ['-g'])
env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '__ANDROID__','-DTB_LOG'])
env.AppendUnique(CCFLAGS = ['-Wall', '-fPIC'])
env.AppendUnique(LINKFLAGS = ['-ldl', '-lpthread', '-llog', '-landroid'])
env.AppendUnique(CCFLAGS = ['-Wall', '-fPIC','`pkg-config','--cflags','glib-2.0`'])
env.AppendUnique(LINKFLAGS = ['-ldl', '-lpthread', '-lglib-2.0', '-lgthread-2.0', '-llog', '-landroid'])
env.ParseConfig("pkg-config --cflags --libs glib-2.0 gthread-2.0")
env.Append(LIBS=[
'-lglib-2.0', '-lgthread-2.0'
])
# From android-5 (API > 20), all application must be built with flags '-fPIE' '-pie'.
# Due to the limitation of Scons, it's required to added it into the command line
# directly (otherwise, it will also be added when build share library)
env.Replace(CCCOM = '$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM -fPIE $SOURCES')
env.Replace(CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM -fPIE $SOURCES')
env.Replace(LINKCOM = '$LINK -o $TARGET -pie $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS')
\ No newline at end of file
env.Replace(LINKCOM = '$LINK -o $TARGET -pie $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS')
......@@ -14,20 +14,20 @@ DTLS_LIB = $(PROJECT_LIB_PATH)/tinydtls
#Modify below values to enable/disable the Adapter
#Suffix "NO_" to disable given adapter
EDR = EDR_ADAPTER
EDR = EDR_ADAPTER
WIFI = WIFI_ADAPTER
LE = LE_ADAPTER
LE = LE_ADAPTER
ETHERNET = NO_ETHERNET_ADAPTER
#Add Pre processor definitions
DEFINE_FLAG = -DWITH_POSIX -D__ANDROID__ -D__WITH_DTLS__
DEFINE_FLAG += -D$(EDR) -D$(LE) -D$(WIFI) -D$(ETHERNET)
DEFINE_FLAG += -D$(EDR) -D$(LE) -D$(WIFI) -D$(ETHERNET)
#Add Debug flags here
DEBUG_FLAG = -DTB_LOG
#DEBUG_FLAG += -DADB_SHELL
BUILD_FLAG.debug = $(DEFINE_FLAG) $(DEBUG_FLAG)
BUILD_FLAG.debug = $(DEFINE_FLAG) $(DEBUG_FLAG)
BUILD_FLAG.release = $(DEFINE_FLAG)
BUILD_FLAG = $(BUILD_FLAG.$(BUILD))
......@@ -146,3 +146,4 @@ LOCAL_SRC_FILES = \
$(WIFI_ADAPTER_PATH)/cawificlient.c $(WIFI_ADAPTER_PATH)/cawifinwmonitor.c \
include $(BUILD_STATIC_LIBRARY)
......@@ -6,4 +6,4 @@ APP_MODULES := CA
APP_PLATFORM = android-19
APP_CPPFLAGS += -fexceptions
APP_CPPFLAGS += -frtti += -Wno-error=format-security
APP_CFLAGS = -Wno-error=format-security
\ No newline at end of file
APP_CFLAGS = -Wno-error=format-security
STEPS to setup Arduino on linux machine for building CA code:
1) Download the Arduino package as per your system specification from the given link :
1) Download the Arduino package as per your system specification from the given link :
http://arduino.cc/en/main/software
2) Unzip the downloaded package to some location say ARDUINO_DIR(This is the arduino installation directory).
ARDUINO_DIR = <PATH_TO_ARDUINO_INSTALL_DIR>/arduino-1.5.x
3) Change permissions for executable in "ARDUINO_DIR"
chmod -R +x ./*
4) ONE TIME ONLY - ADDITIONAL LIBRARIES
3) Change permissions for executable in your "ARDUINO_DIR"
chmod -R +x <ARDUINO_DIR>
4.1) ONE TIME ONLY - ADDITIONAL LIBRARIES (Time)
Arduino builds are dependent on latest Time library. Download it from here:
I. http://playground.arduino.cc/Code/Time
Place this library in the "ARDUINO_DIR/libraries/Time" folder where remaining libraries are present.
[P.S - The Time library files path should be as follows "ARDUINO_DIR/libraries/Time/Time/{***files***}"]
Place this library in the "ARDUINO_DIR/libraries/Time" folder where other libraries are present.
[P.S - The Time library files path should be as follows "ARDUINO_DIR/libraries/Time/Time/{***files***}"]
Some files in this library has windows style line endings, for patch to run properly, please execute following command:
cd <ARDUINO_DIR>
find ./libraries/Time/ -type f -exec dos2unix {} \;
4.2) ONE TIME ONLY - ADDITIONAL LIBRARIES (BLE)
Note: Prior to building for BLE Transport, following additional steps are required:
(1) Download RedBearLab Arduino RBL_nRF8001 Library from link(https://github.com/RedBearLab/nRF8001/tree/25643e7b1b7da3740406325a471e3faa4b948747)
(2) Extract zip file and apply RBL patch(connectivity/lib/arduino/RBL_nRF8001.patch) to "RBL_nRF8001" folder by following below steps,
i) Go to downloaded RBL_Library Folder ("nRF8001-master/Arduino/libraries/RBL_nRF8001")
ii) Apply dos2unix for RBL_Library Folder and RBL Patch File (RBL_nRF8001.patch), if we have downloaded Library in Non UNIX Platform.
iii) Apply RBL Patch by using the below command
patch -p1 < RBL_Patch_File_Location(RBL_nRF8001.patch)
(3) Copy the patched RBL_nRF8001 Library and place it in "arduino-<x.x.x>/libraries" folder
(4) Download Nordic Arduino BLE library [Tag: "0.9.5.Beta" Version] from the link (https://github.com/NordicSemiconductor/ble-sdk-arduino).
Extract the zip file and copy the "BLE" folder available under "libraries" folder and place it in "arduino-<x.x.x>/libraries" folder
5) ONE TIME ONLY - PATCH
Complete patch has been provided at : "connectivity\lib\arduino\arduino_libraries.patch"
Copy this patch file to "ARDUINO_DIR/libraries/"
6) To apply patch give the command :
Copy this patch file to "ARDUINO_DIR/"
6) To apply patch give the command :
patch -p1 < arduino_libraries.patch
To undo the patch give the command :
patch -R -p1 < arduino_libraries.patch
7) Launch Arduino IDE (required for logs and port and board selection.)
7) ONE TIME ONLY - FIRMWARE UPGRADE (FOR WIFI SHIELD)
To support UDP over WiFi, WiFi shield needs to run latest firmware. Please refer:
(http://arduino.cc/en/Hacking/WiFiShieldFirmwareUpgrading)
for instructions on how to upgrade your firmware.
8) Launch Arduino IDE (required for logs and port and board selection.)
Goto to "ARDUINO_DIR" directory.
Launch command := sudo ./arduino
8) Select your board and port under the tools option in Arduino IDE.
\ No newline at end of file
9) Select your board and port under the tools option in Arduino IDE.
......@@ -9,7 +9,7 @@ BUILD := release
PLATFORM := arduinomega
TRANSPORT := BLE
OBJ_DIR := ./bin
APP_NAME := sample_main
APP_NAME := casample
ARDUINO_PORT := ttyACM0
include ./local.properties
......@@ -72,3 +72,4 @@ clean:
Setting Wi-Fi SSID and Password for Arduino Wi-FI Shield
=====================================
PreCondition: In connectivity\src\wifi_adapter\arduino\cawifiserver.cpp
Update the SSID and Password credentials before testing with Wi-Fi Shield
char ssid[] = ""; // your network SSID (name)
char pass[] = ""; // your network password
BUILDING for ARDUINOMEGA:
========================================
PREREQ: Arduino MUST be installed in the machine where we compile. Refer to Arduino_Setup_README file for help.
......@@ -14,17 +7,6 @@ PREREQ: Arduino MUST be installed in the machine where we compile. Refer to Ardu
sudo make PLATFORM=arduinomega TRANSPORT=<ETHERNET/BLE/WIFI> ARDUINO_DIR = <PATH_TO_ARDUINO_INSTALL_DIR>/arduino-1.5.x
P.S : For PATH_TO_ARDUINO_INSTALL_DIR value refer Arduino_Setup_README.txt file.
Note: Prior to building for BLE Transport, following additional steps are required:
1) Download RedBearLab Arduino RBL_nRF8001 Library committed (2014/7/30 18:17:53) from link(https://github.com/RedBearLab/nRF8001)
2) Extract zip file and apply RBL patch(connectivity/lib/arduino/RBL_nRF8001.patch) to "RBL_nRF8001" folder by following below steps,
i) Go to downloaded RBL_Library Folder ("nRF8001-master/Arduino/libraries/RBL_nRF8001")
ii) Apply dos2unix for RBL_Library Folder and RBL Patch File (RBL_nRF8001.patch), if we have downloaded Library in Non UNIX Platform.
iii) Apply RBL Patch by using the below command
patch -p1 < RBL Patch File Location(RBL_nRF8001.patch)
3) Copy the patched RBL_nRF8001 Library and place it in "arduino-<x.x.x>/libraries" folder
4) Download Nordic Arduino BLE library from the link (https://github.com/NordicSemiconductor/ble-sdk-arduino).
Extract the zip file and copy the "BLE" folder available under "libraries" folder and place it in "arduino-<x.x.x>/libraries" folder
Flashing Interface APIs for ARDUINOMEGA:
========================================
Precondition: Connect Arduino Mega Board to Linux PC. Open Arduino IDE and select corresponding connected PORT
......@@ -33,6 +15,6 @@ Precondition: Connect Arduino Mega Board to Linux PC. Open Arduino IDE and selec
It will flash BLE Transport Adaptor in Arduino Board. Similarly, TRANSPORT can be changed to ETHERNET, BLE, WIFI etc..
To Run Adapter code in ARDUINOMEGA Board: