# HL7800 Get service and neighbouring cells

**URL:** <https://forum.sierrawireless.com/t/hl7800-get-service-and-neighbouring-cells/29369>\
**Category:** HL78\
**Created:** [March 27, 2023, 2:04pm UTC](https://forum.sierrawireless.com/t/hl7800-get-service-and-neighbouring-cells/29369 "2023-03-27T14:04:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hkiol](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/hkiol/32/5998_2.png) [@hkiol](https://forum.sierrawireless.com/u/hkiol)\
**Post date:** [March 27, 2023, 2:04pm UTC](https://forum.sierrawireless.com/t/hl7800-get-service-and-neighbouring-cells/29369/1 "2023-03-27T14:04:32Z")

</div>

Hi,

I am trying to get information on the service and neighbouring cells that the device is connecting to.

I am able to get the needed info for the service cell using AT+KCELL=0 where I can derive the MCC, MNC, LAC and Cell ID (although I haven’t managed to get the PSC yet, any ideas?).

For example:

```auto

at+kcell=0

+KCELL: 0
+KCELL: 0
+KCELL: 3,5,02f250,27637,42,5061,58,22,0,6,6290,182,51,10,6,6290,44,46,0

MCC: 202
MNC: 05
LAC: 5061
Cell ID: 161335

```

The needed Cell IDs for the neighbouring cells are not present in the original reply (similar [topic](https://forum.sierrawireless.com/t/cellid-cell-locate-geolocation-on-hl7800/19476))

How can I get these Cell IDs?

I’ve tried AT+KCELL=2,1 like so:

```auto

AT+KCELL=2,1

OK

+KCELL: 6290,42,00027637,02f250,75,5061

+KCELL: 6390,487,0003F548,02f210,70,8000

+KCELL: 0

```

which returns the service cell and a cell that was not present in the neighbouring cells(?). Is this command the way to go?

FW version: 4.6.9.4

thanks

---

<div class="post-metadata">

**Author:** ![jerdung](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jerdung](https://forum.sierrawireless.com/u/jerdung)\
**Post date:** [March 29, 2023, 7:41am UTC](https://forum.sierrawireless.com/t/hl7800-get-service-and-neighbouring-cells/29369/2 "2023-03-29T07:41:59Z")

</div>

Hi @hkiol,

When you type the command AT+KCELL=0 and the result is

```auto
+KCELL: 0
+KCELL: 0
+KCELL: 3,5,02f250,27637,42,5061,58,22,0,6,6290,182,51,10,6,6290,44,46,0

```

According to the AT command document:  
3 → total cells  
5 → LTE serving cell  
02f250,27637,42,5061,58,22,0 → information for serving cell  
6 → LTE neighbor cell  
6290,182,51,10 → information for neighbor cell 1 → Physical Cell ID: 182  
6290,44,46,0 → information for neighbor cell 2 → Physical Cell ID: 44

Please refer to the AT command document in the following link: [HL78xx AT Commands Interface Guide](https://source.sierrawireless.com/resources/airprime/software/hl78xx_at_commands_interface_guide/#sthash.MMXbN8WH.dpbs)

Thanks,

---

<div class="post-metadata">

**Author:** ![hkiol](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/hkiol/32/5998_2.png) [@hkiol](https://forum.sierrawireless.com/u/hkiol)\
**Post date:** [March 29, 2023, 7:52am UTC](https://forum.sierrawireless.com/t/hl7800-get-service-and-neighbouring-cells/29369/3 "2023-03-29T07:52:16Z")

</div>

Hi,

The Physical Cell ID is not the unique identifier required by the cell API (HTTP API with cell database).  
The response only gives the service cell ID.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/sierrawireless/original/2X/5/52f6783b2252068fc93d5fe0543efb0ed94987ba.png)

As you can see in the above image, I need the LTE\_CI which is:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/sierrawireless/original/2X/b/ba9ae73f7d08b9da1bf4313e42bd81e9e8b54eb6.png)

AT+KCELL=2,1 does give the LTE\_CI but takes too long and outputs cells that were not in the initial KCELL=0  
command.

thanks

---

<div class="post-metadata">

**Author:** ![hkiol](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/hkiol/32/5998_2.png) [@hkiol](https://forum.sierrawireless.com/u/hkiol)\
**Post date:** [April 11, 2023, 9:21am UTC](https://forum.sierrawireless.com/t/hl7800-get-service-and-neighbouring-cells/29369/4 "2023-04-11T09:21:05Z")

</div>

Hi,

So is there no way to get a fairly accurate positioning on the HL78XX modems?

This would require at least three cells and from what I have found already, I can only get one cell?

thanks

---

<div class="post-metadata">

**Author:** ![jerdung](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jerdung](https://forum.sierrawireless.com/u/jerdung)\
**Post date:** [April 12, 2023, 8:35am UTC](https://forum.sierrawireless.com/t/hl7800-get-service-and-neighbouring-cells/29369/5 "2023-04-12T08:35:25Z")

</div>

Hi @hkiol,

If you need to determine the location, you can use the GNSS or PoLTE feature on the HL7800 module.

You are seeing only 1 cell because the location you are at may only have 1 cell supported by the technology you are using. Regarding your comment above, I see that your device has already detected 3 cells.

Regarding the AT+KCELL=2,1 command taking too long to respond, according to the definition of the +KCELL command, it should respond within a maximum of 30 seconds. If it takes longer than 30 seconds, please let me know.

Thanks,

---

<div class="post-metadata">

**Author:** ![hkiol](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/hkiol/32/5998_2.png) [@hkiol](https://forum.sierrawireless.com/u/hkiol)\
**Post date:** [April 12, 2023, 8:53am UTC](https://forum.sierrawireless.com/t/hl7800-get-service-and-neighbouring-cells/29369/6 "2023-04-12T08:53:53Z")

</div>

Hi,

I am trying to avoid using GNSS as it uses the same RF hardware as the LTE.

The LTE\_CI is only provided for the serving cell and not the rest but it is vital for actually finding the cells. So this is not given for cells other than the serving one.

KCELL=2,1 not only gives different cells than kcell=0 but 30 seconds is way too many for a low power application.

So this I guess is my question (from this [topic](https://forum.sierrawireless.com/t/cellid-cell-locate-geolocation-on-hl7800/19476)), has it been updated?:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/sierrawireless/original/2X/b/b4bc4f890b76cc844c8f0ac88ac4a488390f29b3.png)

thanks
