BLEconnect not doing anything

bkmar1192
Posts: 274
Joined: Sat Sep 12, 2015 11:23 am

BLEconnect not doing anything

Post by bkmar1192 »

I set up a BLEconnect to my iPhone but it doesn't seem to do anything - I don't even think is running. State doesn't change, nothing the log file. What could I be missing?
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: BLEconnect not doing anything

Post by kw123 »

You have to
1 do a Bluetooth connection to another device e.g. Your laptop. If not the iPhone will not answer any BLE requests. The connection does not have to be active
2. Could you post the parameters file from pibeacon/interface directory. Or from the rpi in pibeacon directory.



Sent from my iPhone using Tapatalk
bkmar1192
Posts: 274
Joined: Sat Sep 12, 2015 11:23 am

Re: BLEconnect not doing anything

Post by bkmar1192 »

My phone is already connected to my Apple Watch.

Are those directories on the Pi or Indigo server? Where do I find them?
bkmar1192
Posts: 274
Joined: Sat Sep 12, 2015 11:23 am

Re: BLEconnect not doing anything

Post by bkmar1192 »

Found it...

{
"BLEserial": "parallel",
"acceptNewiBeacons": "1",
"authentication": "digest",
"debugRPI": {
"debugRPIBEACON": 0,
"debugRPIBLE": 0,
"debugRPICALL": 0,
"debugRPIOUTPUT": 0,
"debugRPIPRIVATE": 0,
"debugRPISENSOR": 0
},
"deleteHistoryAfterSeconds": 86400,
"distanceUnits": "0.348",
"enableRebootCheck": "restartLoop,-",
"enableiBeacons": "1",
"ipOfServer": "10.0.1.22",
"myPiNumber": "0",
"output": {},
"passwordOfServer": "????",
"portOfServer": "8176",
"pressureUnits": "Pascal",
"rPiCommandPORT": 9999,
"rPiRestartCommand": "",
"rebootCommand": "reboot now",
"rebootHour": 1,
"rebootWatchDogTime": "-1",
"restartBLEifNoConnect": true,
"sendAfterSeconds": "60",
"sensorList": "BLEconnect*614988477,",
"sensorRefreshSecs": 90,
"sensors": {
"BLEconnect": {
"614988477": {
"BLEtimeout": "5",
"iPhoneRefreshDownSecs": 1.0,
"iPhoneRefreshUpSecs": 10.0,
"mac": "bc:8e:f2:5d:3d:f8",
"retryIfUP": true
}
}
},
"shutDownPinInput": -1,
"shutDownPinOutput": -1,
"tempUnits": "Fahrenheit",
"useRamDiskForLogfiles": "1",
"userIdOfServer": "administrator"
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: BLEconnect not doing anything

Post by kw123 »

could you try
"mac": "bc:8e:f2:5d:3d:f8", with capital letters ==> edit BLE device in indigo.

And are you sure thats the right MAC number for BLUETHOOTH on your iPhone, --- it is in setting/ general / about on the iPhone
bkmar1192
Posts: 274
Joined: Sat Sep 12, 2015 11:23 am

Re: BLEconnect not doing anything

Post by bkmar1192 »

Deleted and re-added both my phone and my wife's phone. Using the bluetooth MacID for both and used upper case letters. Still nothing.

Not even sure if it is actually doing anything. It is finding other beacons OK but none of the state fields in the BLEconnect devices are updated.

if I run this should something at least show up in the log file?

plug = indigo.server.getPlugin("com.karlwachs.piBeacon")
plug.executeAction("newMessage" ,
props={
"piServerNumber" :"0" # for pi # 0, .."9" and up to "19" for sensor rPis
,"typeId": "BLEconnect" # or "sensors"
}
)
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: BLEconnect not doing anything

Post by kw123 »

could you switch on BLEconnect debugging in config on the Mac and on the RPI., see screenshot. then do a "push config to the RPIs" in the plugin menu

on the RPI do:
ssh pi@....
cd pibeacon
tail -f /var/log/BLEconnect.log
and post

and on the Mac you then should see any message from the RPI that comes from BLE devices (you could switch on "send logging to file" -- in config - if there is too much info. The MAC beacon logfile is in ~/documents/pibeacon )

and post those

Karl

on the mac you should see:

Code: Select all

07:21:13             -bleconenct data: {u'65802248': {u'18:65:90:6A:B9:0D': {u'txPower': 3, u'signal': -5}}}
07:21:13             -BLEconnect 0  mac 18:65:90:6A:B9:0D  -5.0  3.0
07:21:13             - dev iphone-Karl-BLE
07:21:13             -rssi txP dist -5.0 3.0  2.5  -5.0
and on the PRI:

Code: Select all

20170305-07:22:13 FC:E9:98:49:BB:E9  1. try ret: RSSI return value: -26
Current transmit power level: 3 --- err: 
20170305-07:22:13 msg: ['/usr/bin/curl', '-u', u'karlwachs:457654aA.mac', '--digest', '-X', 'PUT', '-d', 'value={"pi":"0","sensors":{"BLEconnect":{"142616409":{"FC:E9:98:49:BB:E9":{"txPower":3,"signal":-26}}}},"program":"BLEconnect","ipAddress":"192.168.1.20","ts":"1488720133=CDT"}', u'http://192.168.1.10:8176/variables/pi_IN_0']

20170305-07:22:34 18:65:90:6A:B9:0D  1. try ret: RSSI return value: -1
Current transmit power level: 3 --- err: 
20170305-07:22:34 msg: ['/usr/bin/curl', '-u', u'karlwachs:457654aA.mac', '--digest', '-X', 'PUT', '-d', 'value={"pi":"0","sensors":{"BLEconnect":{"65802248":{"18:65:90:6A:B9:0D":{"txPower":3,"signal":-1}}}},"program":"BLEconnect","ipAddress":"192.168.1.20","ts":"1488720154=CDT"}', u'http://192.168.1.10:8176/variables/pi_IN_0']
Attachments
Screen Shot 2017-03-05 at 07.16.45.png
Screen Shot 2017-03-05 at 07.16.45.png (69.2 KiB) Viewed 3426 times
bkmar1192
Posts: 274
Joined: Sat Sep 12, 2015 11:23 am

Re: BLEconnect not doing anything

Post by bkmar1192 »

Followed your steps and not getting anything in the log on the Indigo server. There is not a BLEconnect.log file in var/logs on the Pi. These are the only log files - the ones in bold are the ones I assume are related to piBeacon.

I deleted all of the BLEconnect devices, ran send config and reviewed the parameters file and they are gone. I then added them back, ran send config again and they show up in parameters. It seems to be sending the config file updates but I am not getting any message in the Indigo log.

-rw-r----- 1 root adm 3673 Mar 5 08:48 auth.log
-rw-r----- 1 root adm 18722 Mar 5 06:25 auth.log.1
-rw-r--r-- 1 root root 1770 Mar 4 21:05 beaconloop.log
-rw-r--r-- 1 root root 8192 Mar 5 05:28 beaconloop.print

-rw-r--r-- 1 root root 2653 Mar 4 16:17 boot.log
-rw------- 1 root utmp 0 Mar 4 16:17 btmp
-rw-r----- 1 root adm 3750 Mar 5 08:48 daemon.log
-rw-r----- 1 root adm 49826 Mar 5 06:24 daemon.log.1
-rw-r----- 1 root adm 0 Mar 5 06:25 debug
-rw-r----- 1 root adm 1668 Mar 4 17:17 debug.1
-rw-r--r-- 1 root root 488 Mar 4 21:32 execcommands.log
-rw-r--r-- 1 root root 480 Mar 4 21:05 installLibs.log
-rw-r----- 1 root adm 24030 Mar 5 08:49 kern.log
-rw-r----- 1 root adm 168382 Mar 5 06:25 kern.log.1
-rw-r--r-- 1 root root 292292 Mar 5 08:46 lastlog
drwx--x--x 2 root root 80 Mar 4 16:17 lightdm
-rw-r--r-- 1 root root 161074 Mar 5 08:49 master.log
-rw-r----- 1 root adm 24437 Mar 5 08:49 messages
-rw-r----- 1 root adm 230236 Mar 5 06:25 messages.1
-rw-r--r-- 1 root root 947 Mar 4 21:32 receiveGPIOcommands.log
-rw-r--r-- 1 root root 1592 Mar 5 08:49 sensors.log

-rw-r----- 1 root adm 28759 Mar 5 08:49 syslog
-rw-r----- 1 root adm 282990 Mar 5 06:25 syslog.1
-rw-r----- 1 root adm 0 Mar 5 06:25 user.log
-rw-r----- 1 root adm 88 Mar 4 17:17 user.log.1
-rw-rw-r-- 1 root utmp 6528 Mar 5 08:46 wtmp
-rw-r--r-- 1 root root 11275 Mar 4 16:17 Xorg.0.log
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: BLEconnect not doing anything

Post by kw123 »

Could we do a teamviewer session. ?


Sent from my iPhone using Tapatalk
bkmar1192
Posts: 274
Joined: Sat Sep 12, 2015 11:23 am

Re: BLEconnect not doing anything

Post by bkmar1192 »

Sure - I have not done that before though...
new2me07
Posts: 84
Joined: Fri Apr 07, 2017 9:40 pm

Re: BLEconnect not doing anything

Post by new2me07 »

Was there any resolution to this problem? I'm experiencing the same symptoms on a RPI3 with latest pibeacon image.
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: BLEconnect not doing anything

Post by kw123 »

See v ... 120 posted in the download section.


Sent from my iPhone using Tapatalk
new2me07
Posts: 84
Joined: Fri Apr 07, 2017 9:40 pm

Re: BLEconnect not doing anything

Post by new2me07 »

the link appears to be broken... or maybe its just that in-demand. Thanks for all the continuing work!!
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: BLEconnect not doing anything

Post by kw123 »

sorry fixed , don't know what happened
Post Reply

Return to “piBeacon”