2
List<CellInfo> cellInfoList = telephonyManager.getAllCellInfo();

First, I got total cellInfoList, and separated to CellInfo

cellRSRP = ((CellSignalStrengthNr) ((CellInfoNr) cellInfo).getCellSignalStrength()).getCsiRsrp();

I tried to get 5G RSRP rate for a few days, and this is the best I can approach and this doesn't work.

When It comes to LTE Cell Data,

cellRSRP = ((CellInfoLte) cellInfo).getCellSignalStrength().getRsrp();

It works like this, and It outputs the value well.

The Difference of these two Codes is:

  1. Change CellInfoLte -> CellInfoNr

  2. Additional CellSignalStrengthNr casting
    (Because (CellInfoNr) cellInfo).getCellSignalStrength() returns CellSignalStrength, Not CellSignalStrengthNr.)

    (Deliberately casted.)

Is 5G Cell Signal Strength measurement isn't ready by now?
I've spent a lot of time in this problem, but didn't found a single solution.

ROZIA
  • 49
  • 6

1 Answers1

2

I have a similar issue and the following casting seems to be working. Unfortunately, there is not possible to test it on real 5g radio in our country.

int mCsiRsrp = ((CellSignalStrengthNr) ((CellInfoNr) cellInfo).getCellSignalStrength()).getCsiRsrp();
Stepan Hruska
  • 151
  • 1
  • 6
  • Did you have a chance to test it? I can not get CSI RSRP, it always returns max Int. All the other parameters from this class can be fetched. I'm talking about 5G SA network – joe Mar 15 '21 at 11:38
  • I have a chance to test on the 5G NSA network coverage and Android 10 device (Samsung SM-A51B). Thing is that 5G NSA use LTE Cell as the (primary) anchor and NR cell as secondary, but it is not shown in the API. If you are able to get NR cell info on 5G SA, but not all the parameters it would be a more terminal firmware-related issue. I have a similar experience with the radio parameters availability on different devices. In the other words if you get max Int it means this particular value is not available. – Stepan Hruska Mar 15 '21 at 21:38
  • Yep..but it's strange. Correct me if I'm wrong, but I believe CSI Rsrp should only be available in 5G SA. SS Rsrp should be in both SA and NSA – joe Mar 16 '21 at 07:38
  • Unfortunately, the presence of the particular parameter depends on the RIL to the Android API mapping implementation. Even if there is a radio parameter presented in the network radio environment, the presentation of it to the API should differ on the different terminals and firmware. Can you test your app on the phone with a different chipset(s)? – Stepan Hruska Mar 17 '21 at 00:33
  • Agree...Yes, we were testing NSA on different chipsets and if I remember correctly, we couldn't get the CellSignalStrengthNr nor CellInfoNr on Qualcomm phones, but on Exynos, we could. – joe Mar 18 '21 at 06:40
  • Unfortunatelly now we only have Qualcomm and we Android API reports Max INT for RSRP CSI. I would really like to see if there is any difference on Exynos... But in general it's all so strange and Google really doesn't seem to care too much about it. – joe Mar 18 '21 at 06:42
  • HI, i am getting cellInfo null in 5g SA in Qualcomm device. please help – DevMobApp Jul 02 '21 at 13:15