pibeacon selecting hci0 and not hci1

Posted on
Sun Mar 24, 2019 12:54 pm
shrxman offline
Posts: 83
Joined: Apr 22, 2015

pibeacon selecting hci0 and not hci1

Hey Karl,

How the heck are you? Hope all is well :)

I have 3 rpi3's added and working just fine in my system, and use them with my XY beacons quite well. But, now I seem to have an issue adding a few more rpi3+'s and think it's related to which hci interface is being selected. All of them are using the external BLE dongle you recommended, and three of them are using that without any issue. I pulled up the settings on each of my pi devices and manually selected "use USB = external for RPI3+" for iBeacon, and "use USB = external" for BLEconnect, as I use WiFi as my primary interface and you had mentioned before that wifi and bluetooth seem to cause conflict when they are on the same chip.

In short, when I added two new pis, the ip addresses would change so that the were both identical. I've deleted and added them back several times, but always eventually get the same result. I noticed when I looked at the devices in the "Initial Basic Setup" drop down, that they had identical MAC addresses, which got me poking around a bit. Don't know too much about bluetooth, but I did discover that all of the bluetooth dongles, including the ones that are working just fine, have the same hci0 MAC address, and unique hci1 addresses, and that the pi's that work all have the correct hci1 MAC address in place.. But, for some reason, these new pi's pull up the hci0 address, which is why/how I suspect something in your code flips the IP addresses around on the devices until they are the same as one another. I haven't done much more testing, at the moment, as I suspect I should resolve this before continuing.

I also see this in the logs:
Code: Select all
dev: droomPi fixing piDevId in RPI
dev: dsofficePi fixing piDevId in RPI


I'm using version 7.103.272 of piBeacon along with the older image you suggested I use with the rpi3+'s. Any suggestions on how to resolve this one?

thanx, as always!
~ken

Posted on
Sun Mar 24, 2019 1:20 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: pibeacon selecting hci0 and not hci1

I am traveling in Europe , back April 10.

I might be able to to check the code

But when u use the older image you don’t need the extra ble dongle for the rpi3+

And the rpi has the ip mac and the ble MAC address. I guess you are talking about the ble #?

Karl.

Posted on
Sun Mar 24, 2019 1:41 pm
shrxman offline
Posts: 83
Joined: Apr 22, 2015

Re: pibeacon selecting hci0 and not hci1

Hope you're enjoying your time out in Europe. Thanks for replying all the same, but I can survive with the 3 I have working until you return, of course ;-)

I was referring to the BLE number.. Sorry, it just looks so much like a MAC that I can't seem to help it. lol. These are rpi 3's, not 3+'s, though I do have one 3+ that I may set this up on as well. What would be the best config for rpi3 using wifi as primary interface and xy sensors then? I haven't played with adding any bluetooth devices such as phones, but may do so down the road.

~ken

Posted on
Sun Mar 24, 2019 2:36 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: pibeacon selecting hci0 and not hci1

the rpi3 has common hardware WiFi and ble. That creates problems. As I recall only w bleconnect but I am not 100% sure. When the ble scanner runs there is not enough left for WiFi and that times out.

So there yes you need the extra ble dongle.


Sent from my iPhone using Tapatalk

Posted on
Sun Mar 24, 2019 3:52 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: pibeacon selecting hci0 and not hci1

to really check this I need to be home and do some testing, setting up different RPI to replicate this.


Karl

Posted on
Sun Mar 24, 2019 5:23 pm
shrxman offline
Posts: 83
Joined: Apr 22, 2015

Re: pibeacon selecting hci0 and not hci1

No worries Karl.. Take a look at it when you get a chance and let me know when you do. Like I said, though, my system is currently functional as it is, so it's all good. Enjoy your trip! :)

Posted on
Tue Apr 23, 2019 10:45 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: pibeacon selecting hci0 and not hci1

it has been some time, but I will be looking into it now , sorry for the delay

Karl

Posted on
Tue Apr 30, 2019 12:06 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: pibeacon selecting hci0 and not hci1

looking at it now..

could you do:

ssh pi@...
cd pibeacon
sudo python beaconloop.py

you should see something like this:
Code: Select all
Beacon Use HCINo  -1 ; useHCI  hci0 ; myBLEmac  B8:27:EB:D4:E3:35 ; devId  0
HCIs {'hci0': {'bus': 'UART', 'BLEmac': 'B8:27:EB:D4:E3:35', 'numb': 0}}
20190430-13:04:03 beaconloop   MAC#: B8:27:EB:D4:E3:35 on channel:hci0; bus:UART

20190430-13:04:03 beaconloop  hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 2f 23 44 54 cf 6d 4a 0f ad f2 f4 91 1b a9 ff a6 00 09 00 02 C5 00
20190430-13:04:03 beaconloop    hcitool -i hci0 cmd 0x08 0x0006 00 10 00 20 03 00 00 00 00 00 00 00 00 07 00
20190430-13:04:03 beaconloop    hcitool -i hci0 cmd 0x08 0x000a 01
20190430-13:04:03 beaconloop  starting loop

and
sudo python BLEconnect.py
Code: Select all
20190430-13:05:32 BLEconnect   MAC#: B8:27:EB:D4:E3:35 on channel:hci0; bus:UART


could you do that for your all of your RPI3+. I like to see which MAC numbers they use

Karl

Posted on
Thu May 09, 2019 9:27 pm
shrxman offline
Posts: 83
Joined: Apr 22, 2015

Re: pibeacon selecting hci0 and not hci1

Hey Karl,

Sorry, it was my turn to be away for a while.. lol. I'll be back at the house this weekend and will give that a shot and send you the output.

thanx again,
~ken

Posted on
Thu May 09, 2019 9:47 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: pibeacon selecting hci0 and not hci1

And I will be out starting Wednesday.


Sent from my iPhone using Tapatalk

Posted on
Sat Jun 01, 2019 1:20 pm
shrxman offline
Posts: 83
Joined: Apr 22, 2015

Re: pibeacon selecting hci0 and not hci1

Hey there,

Figured it might be time to try this again. so, I have three pi's running piBeacon, 2 model 3b's and 1 model 3b+. I've inserted a BLE dongle into all of them, and currently have them set to let piBeacon decide which one to use for all three. Running pibeacon 7.105.280 on indigo, with one of your images from 12-09-2018 for all three pi's.

I noticed that when I try to push files to the pi's from piBeacon, the drop down shows the same address for all three. Is this expected as just part of the UUID, or is this an issue? Last time I saw this, piBeacon would seem to associate two devices to the same node, so results were unexpected. I removed everything, deleted the plugin and prefs, and reinstalled, and now see this duplication again. I attached a screenshot of the GUI, as I couldn't figure out how to insert an image inline here. doh..

I also noticed the following errors recurring in the plugin.log, which makes me think this duplication could be confusing piBeacon as well:
12:08:19 rPi#: 0 >>10.0.1.125<< ip number has changed, please fix in menue/pibeacon/setup pi or changed Ip number or send restart to rPi; old >>10.0.1.124<< received from pi: >>10.0.1.125<<


10.0.1.124 = pi0 = pi3b
10.0.1.125 = pi1 = pi 3b
10.0.1.126 = pi2 = pi 3b+

I have them connected to the network via wlan0, but eth0 is up on both of them for a different network:
pi0: wlan0 = 10.0.1.124, eth0 = 10.0.124.1
pi1 wlan0 = 10.0.1.125, eth0 = 10.0.125.1
pi2 wlan0 = 10.0.1.126, eth0 = 10.0.126.1

I notice that the system keeps changing /home/pi/pibeacon/ipAddress to the eth0 interface ip, then i see an error regarding the ip has changed, so i edit that file and reboot. That tends to fix it, though sometimes it comes back. Not sure if that really matters, but I think it's best to have pibeacon looking at the wlan0 address since there's no hop involved. Should i do anything differently there?

So, I guess I see two potential issues. 1) the system wants to use eth0 for the pibceaon/ipAddress, instead of wlan0 and 2) those duplicate IDs for the pi's potentially causing the system to see all devices as the same pi. Any thoughts, suggestions here?

thanx,
~ken
Attachments
Screen Shot 2019-06-01 at 11.54.33 AM.png
Screen Shot 2019-06-01 at 11.54.33 AM.png (248.22 KiB) Viewed 4607 times

Posted on
Sat Jun 01, 2019 1:22 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: pibeacon selecting hci0 and not hci1

Thanks for the analysis.

Will check when I am back home end of the week >June 6

Karl.


Sent from my iPhone using Tapatalk

Posted on
Sat Jun 01, 2019 1:24 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: pibeacon selecting hci0 and not hci1

...and do you have switch WiFi off when Ethernet is on?
I believe. It’s in config.



Sent from my iPhone using Tapatalk

Posted on
Sat Jun 01, 2019 2:01 pm
shrxman offline
Posts: 83
Joined: Apr 22, 2015

Re: pibeacon selecting hci0 and not hci1

Thanks Karl,

We'll get in sync on this one eventually. Hah.. As for "Switch WIFI off when Ethernet is on", I knew that existed, but got caught on it anyway, but did find it in the edit settings section of the pi devices, so that's all working now. ;-)

Posted on
Sat Jun 01, 2019 7:45 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: pibeacon selecting hci0 and not hci1

Could you also send the screen output for each rpi
Ssh pi@...
Cd pibeacon
Sudo python master.py

Need the hcix settings

Karl


Sent from my iPhone using Tapatalk

Who is online

Users browsing this forum: No registered users and 3 guests