# Decrypting messages for dummies

**URL:** <https://www.thethingsnetwork.org/forum/t/decrypting-messages-for-dummies/4894>\
**Category:** Uncategorized\
**Created:** [January 17, 2017, 8:47pm UTC](https://www.thethingsnetwork.org/forum/t/decrypting-messages-for-dummies/4894 "2017-01-17T20:47:54Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [February 17, 2017, 8:02pm UTC](https://www.thethingsnetwork.org/forum/t/decrypting-messages-for-dummies/4894/18 "2017-02-17T20:02:28Z")

</div>

For an example using the port number, see step 3 and 5 of “Getting temperature, humidity and battery level” in [Getting Badgerboard to work with TTN](https://www.thethingsnetwork.org/forum/t/getting-badgerboard-to-work-with-ttn/5224).

For LMiC, the port number is the first parameter in:

```
LMIC_setTxData2(1, buffer, sizeof(buffer), 0);

```

In the TTN Arduino library, it’s the last parameter in:

```
ttn.sendBytes(buffer, sizeof(buffer), 1);

```

A bit more details in [Is there any documentation on payload functions?](https://www.thethingsnetwork.org/forum/t/is-there-any-documentation-on-payload-functions/3441/3)

And, of course, one can also define multiple applications for different payloads.

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/decrypting-messages-for-dummies/4894)._
