# Use FCntUp as a pulse counter?

**URL:** <https://www.thethingsnetwork.org/forum/t/use-fcntup-as-a-pulse-counter/36090>\
**Category:** Application Development\
**Created:** [April 11, 2020, 9:29pm UTC](https://www.thethingsnetwork.org/forum/t/use-fcntup-as-a-pulse-counter/36090 "2020-04-11T21:29:17Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [April 12, 2020, 8:19am UTC](https://www.thethingsnetwork.org/forum/t/use-fcntup-as-a-pulse-counter/36090/4 "2020-04-12T08:19:05Z")

</div>

Ah, so it’s more like: Use FCntUp as a pulse counter? (I’ve edited the title and removed some intermediate posts.)

If the pulse frequency [is not too high](https://www.thethingsnetwork.org/forum/t/limitations-data-rate-packet-size-30-seconds-uplink-and-10-messages-downlink-per-day-fair-access-policy-guidelines/1300), then: ~~yes, that will work.~~ **(I stand corrected; see below!)**

The Decoder in the payload formats really only exists to translate an application payload, and the metadata simply is not part of that payload, so I _assume_ it was not even considered. (Also, testing would be much harder.) With or without a Decoder, you still need [the MQTT Data API](https://www.thethingsnetwork.org/docs/applications/mqtt/) or some integration to actually access the (translated) application payload anyhow, which will give you the metadata as well. It’s not like that with a Decoder, you would no longer need some API or integration to access the data anyhow.

Aside: given the 13 bytes LoRaWAN overhead, an additional small application payload will not affect the total airtime much. Also beware that most SDKs have been deprecated, so when using the MQTT API just don’t bother about any SDK.

> **MQTT example**
>
> ```json
> {
> "app_id":"arjanvanb-app-1",
> "dev_id":"arjanvanb-bb-1",
> "hardware_serial":"70B3D5B020035CD1",
> "port":2,
> "counter":7165,
> "payload_raw":"CWUMqw0LDNM=",
> "metadata":{
> "time":"2017-04-27T10:07:27.207187339Z",
> "frequency":868.1,
> "modulation":"LORA",
> "data_rate":"SF7BW125",
> "coding_rate":"4/5",
> "gateways":[
> {
> "gtw_id":"eui-b827ebffff5fe05c",
> "timestamp":532315708,
> "time":"",
> "channel":0,
> "rssi":-57,
> "snr":9,
> "latitude":52.37447,
> "longitude":4.63576
> },
> {
> "gtw_id":"eui-5ccf7ff42f1970ec",
> "timestamp":1284851361,
> "time":"2017-04-27T10:07:26.494026Z",
> "channel":0,
> "rssi":-49,
> "snr":9,
> "rf_chain":1,
> "latitude":52.374523,
> "longitude":4.635771,
> "altitude":4
> }
> ]
> }
> }
> 
> ```

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/use-fcntup-as-a-pulse-counter/36090)._
