> For the complete documentation index, see [llms.txt](https://docs.eseye.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eseye.com/smartconnect/data-exchange/connecting-the-quectel-bgxx-module-to-a-lwm2m-server.md).

# Connecting the Quectel BGxx module to a LwM2M server

AnyNet SMARTconnect™ uses the essential AnyNet files to connect a Quectel BGxx module to a LwM2M bootstrap server. For more information, see Creating the essential AnyNet files.

AnyNet SMARTconnect™ then obtains the certificates and data required to connect to a LwM2M server from the LwM2M bootstrap server. There are two modes for the connection:

* Secure – CoAP messages are encrypted using a DTLS connection.
* Non-secure – CoAP messages are exchanged unencrypted via UDP.

## About LwM2M certificates

After the bootstrap procedure completes, for secure mode, AnyNet SMARTconnect™ saves these files in the `datatx` folder:

* `lwm2m_server_public_key` – the x509 server certificate
* `lwm2m_public_key` – the LwM2M public certificate
* `lwm2m_secret_key` – the LwM2M public private key
* `lwm2m_url` – the LwM2M server URL, in this format:

  ```
  coap(s)://<server>
  ```

  `coaps` indicates secure mode. `coap` indicates non-secure mode.

  If `coaps` is used, but a LwM2M file is missing, non-secure mode is used.

  For non-secure mode, only `anynet_thingname_store` and `lwm2m_url` are required.

LwM2M files require the same six-byte header as the essential AnyNet files. For more information, see Creating the essential AnyNet files.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.eseye.com/smartconnect/data-exchange/connecting-the-quectel-bgxx-module-to-a-lwm2m-server.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
