Request new data from rPi not working

Posted on
Fri Dec 09, 2016 9:23 am
Hackencrash offline
User avatar
Posts: 246
Joined: Dec 16, 2015
Location: UK

Request new data from rPi not working

I have 3 rPi piBeacons configured and working fine reporting back BLE data. I've adjusted settings conservatively so as to not load these devices and ensure things work.

When I SSH to these pPi's and type the corresponding command that relates to the mac address of my phone:
Code: Select all
sudo hcitool cc 38:C9:86:DA:34:4C && hcitool rssi 38:C9:86:DA:34:4C

I get an expected result, e.g. RSSI return value: -21
Everything working so far.

However, I'm unable to kick-off the piBeacon plugin from instigating this command by selecting the option: Request new data from rPi
This fails on all 3 rPi's in that nothing gets updated even though I put devices right next to the rPi's as a test. However, rPi's do detect these devices normally through the loop cycle.

I have also tried the following code which runs without error but fails to do anything:
Code: Select all
plug = indigo.server.getPlugin("com.karlwachs.piBeacon")
plug.executeAction("newMessage" ,
   props={
   "piServerNumber" :"1"
   ,"typeId": "BLEconnect"
   }
)

Please help :)

Posted on
Fri Dec 09, 2016 12:45 pm
Hackencrash offline
User avatar
Posts: 246
Joined: Dec 16, 2015
Location: UK

Re: Request new data from rPi not working

Here's a tail -f BLEconnect.log
Code: Select all
20161209-17:57:57- DC:2B:2A:04:E7:A3  1. try ret: RSSI return value: -15
Current transmit power level: 4 --- err:
20161209-17:57:57- msg: ['/usr/bin/curl', '-u', u'someuser:somepw, '--digest', '-X', 'PUT', '-d', 'value={"program":"BLEconnect","sensors":{"BLEconnect":{"1429868393":{"DC:2B:2A:04:E7:A3":{"txPower":4,"signal":-15}}}},"pi":"1","ipAddress":"192.168.1.121","ts":"1481306277=BST"}', u'http://192.168.1.103:8176/variables/pi_IN_1']

20161209-17:57:58- 7C:01:91:BB:E1:13  1. try ret:  --- err: Read RSSI failed: Input/output error
HCI read transmit power level request failed: Input/output error
20161209-17:57:58- E0:DB:10:60:72:3A  1. try ret:  --- err: Can't create connection: Input/output error
Not connected.
Not connected.
20161209-17:57:58- 38:C9:86:DA:34:4C  1. try ret:  --- err: Can't create connection: Input/output error
Not connected.

The output is showing a successful return for the first item. However, this only works in serial mode and not in parallel mode at all - nothing is logged.

Posted on
Fri Dec 09, 2016 2:11 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Request new data from rPi not working

yes you are right, its a bug:
parameters="mac"
instead of
parameters = mac
in the code.

it was looking for a device with mac# = "mac" instead of mac# = "xx:65:90:6A:B9:xx" .. I "improved the code" :oops:

will post a fix this afternoon.

Karl

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests