opendroneid / receiver-android

Example Android receiver application for unmanned aircraft Remote ID
Apache License 2.0
186 stars 61 forks source link

Moto Edge Pro 20 - Long Range capabilities #46

Closed anu-branco closed 2 years ago

anu-branco commented 2 years ago

Hi,

Smartphone Model | Chipset | Android version | BT 5 LR Basic Support (Elimination criteria) | BT 5 LR Receiver Support | Wi-Fi Beacon | Wi-Fi NAN | Proof | Note -- | -- | -- | -- | -- | -- | -- | -- | -- Motorola Edge 20 Pro | Snapdragon 870 5G (7 nm) | 11 | ✅ 3/2022 | ❌ 3/2022 | | | To_Be_added | Long range support is claimed but the signals are never received. Test done using LAUNCHXL-CC1352P-2 from Texas Instrument.

Screen shot with "nRF Connect for Mobile" attached to this issue. Device Information - Motorola Edge 20 Pro

Extremely frustrated, since a premium cell phone like this doesn't support LR.

friissoren commented 2 years ago

That is actually a bit strange. Do you have any possibility to test your transmitter with other phones (some that on the list are stated to partly or fully receive the Long Range signals)? Just to ensure the problem is not with the transmitter implementation?

I assume you have tried normal advertising mode on the transmitter and you are able to pick up that on the phone? If not, maybe the discussion in #7 will help you get some simple static legacy advertisement message going, just to prove that data can be sent and transmitted correctly.

Will you make a PR with the update for the list for this phone? Based on the screenshots, it looks like you have mostly done the changes to the md file already?

anu-branco commented 2 years ago

I actually found it a little bit strange too. Regarding the transmitter implementation, I've tried to use legacy advertisement and it worked seamlessly, however Long Range implementation I can't assure 100% but the configuration that needs to be done is pretty straight forward: Just changing the type of advertisement from 'Legacy' to 'Extended' and choosing 'PHY CODED S2' and 'PHY CODED S8' as primary and secondary advertisement channels, no code is needed only a config tool is used.

I have no other phone - from the working list - to try, and renting one where I'm located is almost impossible.

We can do the following, I'll try to get a Bluetooth LR phone and try it out, it will take some time (months), but I'll manage it. After this is done, I'll perform the PR and update this issue. Is that fine?

friissoren commented 2 years ago

I haven't tried the CC1352 HW and do not have a dev board for that. However, I quickly looked at the simple_broadcaster example code from the Project Wizard (Resource Explorer) and it looked very similar to the simple_broadcaster example code for the CC2640 HW (which I know works).

In the SimpleBroadcaster_processGapMessage() function, it is setting up the advertisement parameters via the GapAdv_create() function. For some reason advParams1 doesn't seem to be defined anywhere in the example code but for the CC2640 examples, this can be set to either GAPADV_PARAMS_LEGACY_SCANN_CONN or GAPADV_PARAMS_AE_LONG_RANGE_CONN from C:\ti\simplelink_cc13x2_26x2_sdk_5_20_00_52\source\ti\ble5stack\inc\gap_advertiser.h.

Please note that only PHY CODED S8 should be used for both the primary and secondary PHY. Don't use S2 for either of them.

anu-branco commented 2 years ago

Thanks for the info. I double checked the automated generated code and it is flawlessly. So the only problem that could have happen is whether or my board is faulty or cellphone is faulty - both options are very unlikely -, nonetheless I'll find a way to test it and then get back to you.

Out of curiosity this is a snippet of the code (ti_ble_config.c and simple_peripheral.c).

GapAdv_params_t advParams1 = { .eventProps = GAP_ADV_PROP_CONNECTABLE, .primIntMin = 160, .primIntMax = 160, .primChanMap = GAP_ADV_CHAN_ALL, .peerAddrType = PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID, .peerAddr = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa }, .filterPolicy = GAP_ADV_WL_POLICY_ANY_REQ, .txPower = GAP_ADV_TX_POWER_NO_PREFERENCE, .primPhy = GAP_ADV_PRIM_PHY_CODED_S8, .secPhy = GAP_ADV_SEC_PHY_CODED_S8, .sid = 0 };

// Create Advertisement set #1 and assign handle status = GapAdv_create(&SimplePeripheral_advCallback, &advParams1, &advHandleLegacy); SIMPLEPERIPHERAL_ASSERT(status == SUCCESS);

friissoren commented 2 years ago

That looks exactly like what I am using on the CC2640. So the conclusion seems to be that the Motorola edge 20 Pro indeed does not pick up the coded PHY 8 advertisement beacons.

The only other test I can think of is to use the nrfConnect app but I assume you are not able to see the signal in there either, when you are only transmitting on the coded PHY.

Will you prepare a PR to add the information you listed in the beginning to the list of smartphones, or should I put it there? Thanks for reporting this.

anu-branco commented 2 years ago

Please, put it there. I'm not familiar with PR and also I didn't clone your project, I was just seeking for info in Nordic forums and found out that this is probably the best place to find compatibility for BLE 5.+ Long Range funcionality in smartphones.

Thanks