Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9867 Discussions

BLE Service - Location and Navigation, help needed

KSels
New Contributor II
1,133 Views

Can anyone help me With the Location and Navigation Service off the BLE?

I want to be able to read UTC Time, Latitude, Longitude, HDOP and VDOP.

0 Kudos
4 Replies
idata
Community Manager
166 Views

Hi KimLorentz,

 

 

Thanks for your interest in the Intel Curie platform.

 

 

Could you please let me know if you are using the Arduino IDE or the Curie ODK?

 

 

I have found an article about using BLE with the Arduino 101* Board, that discusses how to create a BLE Service and communicate with an Android device. In this article also is set up a BLE blood pressure monitoring system to demonstrate the BLE capabilities of the Arduino 101*, therefore, you can take that example as a reference to set up the Localization and Navigation service and the characteristics you need. Please take a look at the article for more details: https://software.intel.com/en-us/articles/arduino-101-bluetooth-low-energy Use Bluetooth® Low Energy Technology with the Arduino 101* Board.

 

 

Hope you find this information useful.

 

 

Regards,

 

-Yermi A.

 

KSels
New Contributor II
166 Views

I found out that my tinyTILE Board BLE system is not working. but the BLE on arduino 101 I also have is working.

How do I fix the BLE firmware on the tinyTILE Board? or how to reflash the tinyTILE to be an arduino 101.

Can I use the Curie ODK to install a New bootloader on the Board?

Where do I find the Curie ODK?

idata
Community Manager
166 Views

Hi,

 

 

The Intel Curie ODK documentation can be found on this site: https://software.intel.com/en-us/node/674972 Intel® Curie™ Open Developer Kit (ODK), it includes three firmware source trees (A, M, and Z). The A tree is the actual Arduino 101 product firmware source code, so you can try to install and use the A tree, additionally, you can try to update the BLE firmware following this instructions: https://software.intel.com/en-us/node/675512 Installing and Using the A Tree.

 

 

Regarding the bootloader we recommend you do not modify it, however, in case the bootloader is damaged, you will need to use JTAG to recover it, take a look at this site for more details: https://software.intel.com/en-us/node/675000 About the Bootloader.

 

 

Regards,

 

-Yermi A.

 

KSels
New Contributor II
166 Views

Tnx got it working. The fault was found on the Iphone. I needed to reboot the Bluetooth everytime I changed the code on the intel curie.

Here is my test code for multiple BLE services. still working on the lat/long part but gething closer.

/*

 

BLEBoolCharacteristic

 

BLECharCharacteristic

 

BLEUnsignedCharCharacteristic

 

BLEShortCharacteristic

 

BLEUnsignedShortCharacteristic

 

BLEIntCharacteristic

 

BLEUnsignedIntCharacteristic

 

BLELongCharacteristic

 

BLEUnsignedLongCharacteristic

 

BLEFloatCharacteristic

 

BLEDoubleCharacteristic

 

*/

# include

BLEPeripheral blePeripheral; // BLE Peripheral Device (the board you're programming)

 

BLEService ledService("19B10000-E8F2-537E-4F6C-D104768A1214"); // BLE LED Service

 

BLEService batteryService("180F"); // BLE Battery Service

 

BLEService temperatureService("1809"); // BLE Temperature Service

// BLE LED Switch Characteristic - custom 128-bit UUID, read and writable by central

 

BLEUnsignedCharCharacteristic switchCharacteristic("19B10001-E8F2-537E-4F6C-D104768A1214", BLERead | BLEWrite);

 

BLEUnsignedCharCharacteristic batteryLevelChar("2A19", BLERead | BLENotify);

 

BLEFloatCharacteristic tempChar("2A3C", BLERead | BLENotify);

const int ledPin = 13; // pin to use for the LED

 

int oldBatteryLevel = 0; // last battery level reading from analog input

 

float tempLevel = 12.258;

 

long previousMillis = 0; // last time the battery level was checked, in ms

 

 

void setup() {

 

Serial.begin(9600);

// set LED pin to output mode

 

pinMode(ledPin, OUTPUT);

// set advertised local name and service UUID:

 

blePeripheral.setDeviceName("NRH-01");

 

delay(100);

 

blePeripheral.setLocalName("NRH-01");

 

delay(100);

 

blePeripheral.setAdvertisedServiceUuid(ledService.uuid());

 

blePeripheral.setAdvertisedServiceUuid(batteryService.uuid());

 

blePeripheral.setAdvertisedServiceUuid(temperatureService.uuid());

// add service and characteristic:

 

blePeripheral.addAttribute(ledService);

 

blePeripheral.addAttribute(switchCharacteristic);

 

 

blePeripheral.addAttribute(batteryService);

 

blePeripheral.addAttribute(batteryLevelChar);

blePeripheral.addAttribute(temperatureService);

 

blePeripheral.addAttribute(tempChar);

// set the initial value for the characeristic:

 

switchCharacteristic.setValue(0);

 

batteryLevelChar.setValue(oldBatteryLevel);

 

tempChar.setValue(tempLevel);

// begin advertising BLE service:

 

blePeripheral.begin();

Serial.println("BLE LED Peripheral");

 

}

void loop() {

 

// listen for BLE peripherals to connect:

 

BLECentral central = blePeripheral.central();

// if a central is connected to peripheral:

 

if (central) {

 

Serial.print("Connected to central: ");

 

// print the central's MAC address:

 

Serial.println(central.address());

// while the central is still connected to peripheral:

 

while (central.connected()) {

 

// if the remote device wrote to the characteristic,

 

// use the value to control the LED:

 

if (switchCharacteristic.written()) {

 

if (switchCharacteristic.value()) { // any value other than 0

 

Serial.println("LED on");

 

digitalWrite(ledPin, HIGH); // will turn the LED on

 

} else { // a 0 value

 

Serial.println(F("LED off"));

 

digitalWrite(ledPin, LOW); // will turn the LED off

 

}

 

}

long currentMillis = millis();

 

if (currentMillis - previousMillis >= 200) {

 

previousMillis = currentMillis;

 

updateBatteryLevel();

 

}

 

}

// when the central disconnects, print it out:

 

Serial.print(F("Disconnected from central: "));

 

Serial.println(central.address());

 

}

 

}

void updateBatteryLevel() {

 

/* Read the current voltage level on the A0 analog input pin.

 

This is used here to simulate the charge level of a battery.

 

*/

 

int battery = analogRead(A0);

 

int batteryLevel = map(battery, 0, 1023, 0, 100);

if (batteryLevel != oldBatteryLevel) { // if the battery level has changed

 

Serial.print("Battery Level % is now: "); // print it

 

Serial.println(batteryLevel);

 

batteryLevelChar.setValue(batteryLevel); // and update the battery level characteristic

 

oldBatteryLevel = batteryLevel; // save the level for next comparison

 

}

 

}
Reply