> For the complete documentation index, see [llms.txt](https://docs.kiloiot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kiloiot.io/kilo-docs-pt/kilo-center/kilo-mioty-service-center/onboarding/verify-the-first-downlink.md).

# Verificar o Primeiro Downlink

Envie e verifique o primeiro downlink MIOTY no KiloCenter — coloque um comando em fila para um endpoint bidirecional e confirme a entrega.

### Objetivo

Enfileire um comando de downlink para um endpoint e verifique o resultado.

### Pré-requisitos

* Endpoint registado com **bidirecional** sinalizador ativado
* Estação base ligada e com suporte para comunicação bidirecional
* Pelo menos um uplink bem-sucedido confirmado (ver Verificar o Primeiro Uplink)

Tanto o endpoint quanto a estação base devem ter capacidade bidirecional para que os downlinks funcionem.

### Enviar um downlink via KC-Web

1. Abra o KC-Web em `Altere a palavra-passe de administrador predefinida ou remova esta conta antes de qualquer implementação em produção ou pública. As credenciais predefinidas estão publicadas neste repositório.` (contentor) ou `http://localhost:5173` (origem de desenvolvimento).
2. Navegue até **Endpoints** e selecione o seu endpoint bidirecional.
3. Use a interface de downlink para enfileirar uma mensagem:
   * **Carga útil**: dados codificados em base64 (por exemplo, `AQIDBA==` para bytes `01 02 03 04`)
   * **Confirmado**: se deve solicitar confirmação de entrega
4. Submeta o downlink.

### Enviar um downlink via gRPC (Alternativa)

```bash
grpcurl -plaintext -d '{
  "endpoint_eui": "<EP_EUI_HEX>",
  "data": "AQIDBA==",
  "confirmed": false
}' localhost:9090 kilocenter.api.v1.KiloCenterService/SendDownlink
```

### Verificar o Resultado

#### No KC-Web

Verifique a vista de resultados de downlink do endpoint para atualizações de estado. Um downlink bem-sucedido mostra o estado de entrega e qualquer confirmação do endpoint.

#### Nos registos

```bash
tail -f kilocenter-modules/logs/runtime/kc-core.log
```

Procure `dlDataQue`, `dlDataQueRsp`, e `dlDataQueCmp` entradas -- estas representam o handshake de três vias da operação de downlink.

### Resolução de Problemas

| Sintoma                      | Causa provável                                                        |
| ---------------------------- | --------------------------------------------------------------------- |
| O downlink permanece em fila | Endpoint não ligado ou não bidirecional                               |
| erro de "não bidirecional"   | Endpoint ou estação base `bidi` sinalizador não definido              |
| Nenhum resultado devolvido   | A estação base não concluiu o handshake do downlink                   |
| Carga útil rejeitada         | Dados não válidos em base64 ou excedem o tamanho máximo da carga útil |


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kiloiot.io/kilo-docs-pt/kilo-center/kilo-mioty-service-center/onboarding/verify-the-first-downlink.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
