# CoAP methods and Observe on local UDP

Use Python 3.9 or newer. In this folder:

```bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txt
python main.py
python main.py --step 5
```

Steps 1–4 run discovery, GET and PUT, then GET the updated target. Step 5 subscribes to the observable temperature and triggers two changes. Step 6 checks that notifications retain the CoAP token. Each `--step` reruns the whole short scenario to start from a known state, then prints only that step. The program runs a real aiocoap server, client and UDP relay on 127.0.0.1 ports 17681 and 17680. The relay records the actual datagram bytes; the values are fictional. No radio link, cloud service or public endpoint is used. Stop another service using these ports before starting the lab.

After the full run, choose an investigation: compare the GET and PUT method codes in steps 2–4, or follow the Observe token and notification sequence in steps 5–6. The aiocoap client/server show application behavior; the standard-library UDP relay shows the corresponding transmitted bytes.
