Hi Jake,
Thank you for exploring the SimpleServer/Client apps inside of
<IoTivity>/android/examples. Indeed, these apps can be used for
interoperability testing between platforms without any modifications.
The scons command that you have used builds IoTivity for Android with BLE
support. Please keep in mind that due to the limitations in implementation of
BLE adapter on Android the client and server apps must be run on the separate
Android devices. In addition, the server device must support BLE peripheral
mode (For example Nexus 6 or 9). Please find the screenshot attached that
depicts SimpleClient in Android to Android over BLE communication.
If you choose to build IoTivity for Android with support for all transports at
once such as: TARGET_TRANSPORT=IP,BT,BLE you may do discovery on a specific one
by specifying it in the query as follows:
OcPlatform.findResource("",
OcPlatform.WELL_KNOWN_QUERY + "?rt=core.light",
EnumSet.of(OcConnectivityType.CT_ADAPTER_GATT_BTLE),
onResourceFoundHandler
);
Unfortunately, I don?t have a hardware to test Android to Arduino interaction,
but this bug report<https://jira.iotivity.org/browse/IOT-705> may give you some
hints and is marked as resolved.
Best,
Tim Kourt
PS: For more information on Android build options please refer to this wiki
page<https://wiki.iotivity.org/android_build_instructions>.
From: iotivity-dev-bounces at lists.iotivity.org
[mailto:[email protected]] On Behalf Of ???
Sent: Wednesday, October 21, 2015 5:31 AM
To: IoTivity
Subject: [dev] Is there any example for communication through BLE between
android and arduino mega + BLE Shield?
Hi, guys. I have some questions.
I tried to make android app. communicate with arduino mega.
So I built Iotivity using below command.
- scons TARGET_OS=arduino BOARD=mega TARGET_ARCH=avr TARGET_TRANSPORT=BLE
SHIELD=RBL_NRF8001 UPLOAD=false
- scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=BLE
First command built casample in csdk/connectivity/sample/arduino.
So I uploaded this to arduino.
And I used simpleclient app. and simpleserver app. in android/examples.
But these didn't worked.
Shield is RedBearLab BLE v2.1, board is arduino mega 2560.
Smart phone is galaxy note 4.
Now, the questions
1. Why didn't these work? Is there any problem?
2. Is there any other example for BLE communication?
3. In Iotivity, Can I use BLE on ocstack part in csdk?
4. Does BLE support 1(Smart Phone) : N(Arduino) communication?
Samsung S/W Membership Software Developer
Sungkyunkwan Univ. Computer Engineering 08
B.E.S.T. House Team & Side Of House
Jake Kim
[Image removed by sender.]
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20151022/ab30a563/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ~WRD000.jpg
Type: image/jpeg
Size: 823 bytes
Desc: ~WRD000.jpg
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20151022/ab30a563/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SimpleClient.png
Type: image/png
Size: 240115 bytes
Desc: SimpleClient.png
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20151022/ab30a563/attachment.png>