Reputation: 113
Good day,
May I ask how to get the eNB id of CellIdentityLte?
Is there any way of getting it?
Thanks!
Upvotes: 2
Views: 3343
Reputation: 113
I got it!
final CellIdentityLte identityLte = ((CellInfoLte) info).getCellIdentity();
int longCid = identityLte.getCi();
String cellidHex = Integer.toHexString(longCid);
String eNBHex = cellidHex.substring(0, cellidHex.length()-2);
int eNB = Integer.parseInt(eNBHex, 16);
Explanation: The output of getCi()
I convert to HEX, the last two symbols are the hex value of the Local Cell ID and the rest is the hex value of the eNodeB ID. For example 1046022 converted to hex is FF606
. eNodeB is FF6
(4086) and Local Cell ID is 06
(6).
Upvotes: 5