Connecting via Bluetooth
응답
15. 2. 14 오후 6:03
Hi folks, after flashing the sensor monitor on the XDK and installing the application on an android phone I try now to visualize the data on the smartphone. But the line graphs are staying empty and there seems to be no connectivity between the XDK and the smartphone. I can see the XDK in the BT-menue. By clicking it the pairing process seems to start but after finishing I don't see the XDK connected.
Can anybody please give me a hint on this?
0 (0 투표)
Connecting via Bluetooth
응답
15. 2. 17 오전 10:15 as a reply to Jens Mohaupt.
Hi Jens,

the Sensor Monitor on Android currently does only support connections via WLAN. So in order to use it, please configure the Firmware to use WLAN (see the documentation on how to do this - you need an micro-SD card).
You also need an WLAN access point for this setup where Smartphone an XDK connect to. The IP Adress of the XDK should be visible on the access point (it requests an IP Adress on power-up with DHCP).

Best regards
Stefan
 
0 (0 투표)
Connecting via Bluetooth
응답
15. 2. 17 오후 8:54 as a reply to Stefan Schuster.
Hi Stefan,

thank you for this hint. I'm looking forward to connecting it via BLE later. Now I will create a config.txt file on a micro-SD card and will see, if it works.

Oh, NO - I think we went one step forward but there seems to be a problem with the app on the Andriod phone. Therefore I open a new thread. Please check there to help me again.

Thanks in advance!
Jens
0 (0 투표)
Connecting via Bluetooth
응답
15. 7. 9 오전 11:25 as a reply to Jens Mohaupt.
Hi,

I'm just reusing this thread, I hope that is fine.

I would like to support BTLE for my project as well. The DSM_demoSensorMonitor is able to send data via Bluetooth to iOS devices and the DVX_demoVirtualXDK is able to send to Android and iOS devices right?

I would like to send the sensor data of the XDK to a raspberry pi which has a BTLE dongle. Can I reuse some code of the current examples for this, or is this currently impossible with the XDK Toolkit?

BR,
Florian
0 (0 투표)
Connecting via Bluetooth
응답
15. 7. 12 오후 11:15 as a reply to Florian Dittrich.
Hi florian,

the demo DSM_demoSensorMonitor is able to connect via BTLE only to iOS devices. However, a connection to android devices is possible via WLAN.

If you want to send the sensor data of the XDK to a raspberry pi, you can use code in principle and adapt it to your project.
You should note that the XDK is implemented as a bluetooth server in this demo.

Regards,
Manuel
0 (0 투표)
Connecting via Bluetooth
응답
15. 7. 15 오전 7:21 as a reply to Manuel Cerny.
Hi,

I managed to establish a connection between my raspberry pi with the Asus BT400 dongle and the XDK. If anyone is interested, I used bluez-5.4 to connect to the XDK ( http://www.elinux.org/RPi_Bluetooth_LE)
[Edit] You need to make sure to use the random flag, otherwise it doesn't work:
sudo gatttool -t random -b <ADDRESS> -I [/Edit]

Now I am able to use the python script from here:  https://github.com/IanHarvey/bluepy to read all Services and Characteristics of the XDK. I was also able to send Commands like the sensor selection and the notification interval. After the XDK received the commands it started sending the sensor data, but I always get this response:

 INFO | XDK DEVICE 1: @@@ INFO:<dtaFlushDataBufferToConnectedDevice>
 INFO | XDK DEVICE 1: @@@ BLE Result:1 

which means that the  BLEALPWDATAEXCHANGE_SERVER_SendData Method failed. The documentation of the method says:

- BLESTATUS_FAILED indicates that the operation has failed, merely because Alpwise Data Exchange Service is not registered by any profile.

But the registration call before returns:

 INFO | XDK DEVICE 1: @@@ INFO:<bleAppServiceRegister>
 INFO | XDK DEVICE 1: @@@ BLE Service registry status: 0

Which means that the service registry was successful.
Any ideas, why the BTLE send operation is not successful?

I configured the RPi as the master, but even with the link mode: SLAVE it didn't work.

BR,
Florian
0 (0 투표)
Connecting via Bluetooth
응답
15. 7. 16 오전 5:33 as a reply to Florian Dittrich.
Hi Florian,

I've recreated your situation and I was able to successfully run your python script from my MacBook.

My intution tells me that Bluez is causing problems here ... It's not the first time that I have to deal with Bluez and end up switching to alternatives and/or using other ways and hardware. Bluez is known to have a lot incompatabilities in Version 5 and dropped some things they had in Version 4.

Before we go any further into detail here, do you have the option to test your setup with something else than a RPi + Bluez? Theoretically any device + OS with BTLE support should work for this task.

- Florian
0 (0 투표)
Connecting via Bluetooth
응답
15. 7. 16 오전 7:39 as a reply to Florian Harr.
Hi Florian,

do you have any other BTLE implementation for linux in mind? 
Actually I was quite suprised that there is so little documentation and tutorials about BTLE. I couldn't find a Java library that supports BT 4.0 either. 

I have a Sony Xperia Z2 Tablet and a Nexus 4 Smartphone. They are both able to run the Virtual XDK Application. I tried to send a small image from one to the other. From RPi to Nexus 4 it worked, but not the other way round. So I assume receiving data at the Pi side is a problem somehow. Do you think this is a but or a configuration problem?

[Edit] Here the hciconfig -a command output:
pi@raspberrypi ~ $ hciconfig -a
hci0:    Type: BR/EDR  Bus: USB
    BD Address: 5C:F3:70:62:0F:F2  ACL MTU: 1021:8  SCO MTU: 64:1
    UP RUNNING 
    RX bytes:44785 acl:130 sco:0 events:375 errors:0
    TX bytes:10685 acl:106 sco:0 commands:235 errors:0
    Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
    Link policy: RSWITCH SNIFF 
    Link mode: SLAVE ACCEPT 
    Name: 'raspberrypi-0'
    Class: 0x520100
    Service Classes: Networking, Object Transfer, Telephony
    Device Class: Computer, Uncategorized
    HCI Version: 4.0 (0x6)  Revision: 0x1000
    LMP Version: 4.0 (0x6)  Subversion: 0x220e
    Manufacturer: Broadcom Corporation (15)
[/Edit]

Additionally, do you know why the XDK gives my the "BLE Result: 1" response? I assumed that the XDK just sends the data away and doesn't care if it is consumed by anyone or not. Does the XDK wait for a ACK?

BR,
Florian
0 (0 투표)
Connecting via Bluetooth
응답
15. 7. 17 오전 3:16 as a reply to Florian Dittrich.
Hi Florian,

your hciconfig -a output looks good, which doesn't mean it needs to work ...

But let's start from the beginning:
BTLE is normally quite well documented and is the first time version in the history of Bluetooth that gets quite a good support and feedback from all kinds of communities due to the standardisation and the well done design. Most documents though, are mostly for iOS as iOS supports BTLE way longer already than Android does but on a quick search I found some tutorials for Android.

I don't know many alternatives to bluez, but I would suggest you to try connecting to your XDK with a Mac OS X system or a Windows system? There are some great explorers for BTLE out for Windows/Mac/Android/iOS, you could easily investigate further with these.

Depending on the services you want to read, ACK packages are normal and required after a pairing. 

I'm sorry that I can't give you the solution here right now, I can just confirm you what a mess bluez is and how hard it is to get those things really to work. I've worked a lot with BTLE in the past and can only say as much as that it was a lot easier on iOS than anywhere else.

- Florian
0 (0 투표)
Binary
응답
17. 6. 20 오전 2:14 as a reply to Florian Dittrich.

Excuse me, hello everyone.

When i want flash project example sensor monitor and graph from workbench to xdk why not working.

The message is ''no binary file found select project xdk file project"?

Help me, Thanks

0 (0 투표)
RE: Binary
응답
17. 6. 20 오후 3:40 as a reply to Denny Setiawan.

Hello Denny,

I have answered your questions in your other thread Binary.

Kind regards,
Franjo

0 (0 투표)