nRF Bluetooth sensor network communicating with Xbee3 (part 2)

I created a small nrf52480 BLE application and am running it on their DK development board. It advertises two services, one if them is BLE_UUID_DEVICE_INFORMATION_SERVICE. It seems to be working well - I can see it with my phone using the nordic nrf-connect app.

The xbee3 cannot, however, see it at all. It doesn’t show up in gap_scan().

Any ideas why this would be? Is there some restriction on what devices gap_scan() will see?

Actually … I disabled the bluetooth “Appearance” field in the advertisement, and now it shows up on the Xbee3 with a gap_scan(). I cannot, however, connect to it and I’m not sure why. It just times out.

I also re-enabled Appearance but set an advertised appearance value of 1344 (generic sensor) to see if the Xbee3 could then see it. It cannot.

So it seems like the Xbee ignores any device that advertises an appearance.

I installed a bluetooth packet sniffer and when I attempt to do a gap_connect() I don’t see anything different coming out of the XBee3. It makes me think that the first step of the process is just to do a passive scan of some sort, and it’s not seeing my nRF52840 device, so nothing ever comes out.

I still do not have this working, but I installed the nRF52840 scan tool (which connects to WireShark) and can’t find any ATTEMPT out of the Xbee to communicate with the nRF52840-DK. This has me perplexed.

When you call gap_connect() should there be a connect request transmission? What’s the process that goes on under the hood?

I did find one difference in the advertisements:

Xbee3 can connect to this:

Packet Header: 0x0d00 (PDU Type: ADV_IND, ChSel: #1, TxAdd: Public)

but not to this:

Packet Header: 0x1960 (PDU Type: ADV_IND, ChSel: #2, TxAdd: Random)

so the main differences there are the channel and the address type. Should either of those be the difference?

Hey everyone, I figured it out. It needs to be:

conn=ble.gap_connect(ble.ADDR_TYPE_RANDOM, binascii.unhexlify(“F64D1D24B0E6”), timeout_ms=5000)

because the nordic is using a RANDOM address, not PUBLIC. What I didn’t understand is that these two things are more or less separate addresses spaces. I failed to notice that difference in the IND packet. That was the whole problem.

1 Like