# How to configure the UDP listening port in Xbee S6B + Teensy 3.1?

**URL:** <https://forums.digi.com/t/how-to-configure-the-udp-listening-port-in-xbee-s6b-teensy-3-1/14347>\
**Category:** XBee - WiFi\
**Tags:** wifi, xbee-wifi, tcpip, teensyduino, xbee\
**Created:** [February 11, 2015, 11:20pm UTC](https://forums.digi.com/t/how-to-configure-the-udp-listening-port-in-xbee-s6b-teensy-3-1/14347 "2015-02-11T23:20:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ellipsis13](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@ellipsis13](https://forums.digi.com/u/ellipsis13)\
**Post date:** [February 11, 2015, 11:20pm UTC](https://forums.digi.com/t/how-to-configure-the-udp-listening-port-in-xbee-s6b-teensy-3-1/14347/1 "2015-02-11T23:20:33Z")

</div>

Hi all,

Using Teensy 3.1 + XBee S6B, trying to configure via SPI. All firmware is updated to the latest versions.

I’m having some trouble understanding how to program the UDP listening port.

On page 107 of the manual, ([http://ftp1.digi.com/support/documentation/90002180\_K.pdf](http://ftp1.digi.com/support/documentation/90002180_K.pdf)), the “C0” description is unclear to me.

How does this work? Does this control the serial port or the listening port? FYI “AP” is set to “API Mode Without Escapes [1]”

If C0 does not control the UDP listening port, what command do I need to use instead?

Thank you!

---

<div class="post-metadata">

**Author:** ![ellipsis13](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@ellipsis13](https://forums.digi.com/u/ellipsis13)\
**Post date:** [February 13, 2015, 10:04am UTC](https://forums.digi.com/t/how-to-configure-the-udp-listening-port-in-xbee-s6b-teensy-3-1/14347/2 "2015-02-13T10:04:53Z")

</div>

For reference, here is the .ino file:  
[http://pastebin.com/W5YSy9Pm](http://pastebin.com/W5YSy9Pm)
