Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Bluetooth Service Null Pointer Exception in BLE Scanner Example(Bluetooth Service Null Pointer Exception in BLE Scanner Example)
Bluetooth Service Null Pointer Exception in BLE Scanner Example [message #1759950] Thu, 20 April 2017 10:35 Go to next message
Rangan Roy is currently offline Rangan RoyFriend
Messages: 1
Registered: April 2017
Junior Member
Hi,

I was trying to implement kura's ble scanner example . I made that as plugin project and exported as deployble plugins and fragment and deployed that in raspberry-pi using mToolKit . But when that bundle starts it is giving and Nullpointer exception inside setup() method . It is giving me the NullPointerException in the below line in side setup() method :

this.bluetoothAdapter = bluetoothService.getBluetoothAdapter(adapterName);


Here, adapterName is coming as a string and the value is "hci0".

I'm uploading the project as well as error log . Kindly help me .

Re: Bluetooth Service Null Pointer Exception in BLE Scanner Example [message #1760848 is a reply to message #1759950] Wed, 03 May 2017 15:18 Go to previous message
Pierantonio Merlino is currently offline Pierantonio MerlinoFriend
Messages: 39
Registered: March 2016
Member
Hi,

it seems that the bluetoothService object is null, so when you try to get the adapter, a NullPointerException is thrown.

IMHO, start with a fresh user workspace and import the original beacon scanner. Then start modifying that working code.
Or, develop the bundle from scratch (as shown http://eclipse.github.io/kura/doc/configurable_component.html) using the beacon scanner code.
Previous Topic:Make changes in kura
Next Topic:org.eclipse.kura.example.camel.publisher does not build from sources (KURA_2.1.0_RELEASE)
Goto Forum:
  


Current Time: Fri Apr 26 23:46:52 GMT 2024

Powered by FUDForum. Page generated in 0.03065 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top