# What port does the Argon use to connect to the Particle Cloud?

**URL:** https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598
**Category:** BLE // NFC
**Created:** [November 26, 2018, 4:51pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598 "2018-11-26T16:51:03Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![dybm](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dybm](https://community.particle.io/u/dybm)
#### Post date: [November 26, 2018, 4:51pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/1 "2018-11-26T16:51:03Z")

</div>

I have port 5683 opened which allows my Photons to connect, but I am having issues getting my Argon to connect to my WiFi.

---

<div class="post-metadata">

### Author: ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)
#### Post date: [November 26, 2018, 5:16pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/2 "2018-11-26T17:16:48Z")

</div>

The Argon uses UDP port 5684.  
The Photon/P1/Core use TCP port 5683.

(Answer edited, as the original answer was wrong.)

---

<div class="post-metadata">

### Author: ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)
#### Post date: [November 26, 2018, 5:43pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/3 "2018-11-26T17:43:50Z")

</div>

The port wouldn’t play a role in your Argon not being able to connect to your WiFi but only to connect to the cloud.  
If you have issues with your Argon not connecting to your WiFi you may run into the same issue I experience due to my DHCP server insisting in providing an IPv6 address to the Argon (since it would be capable of that) but the outbound connection isn’t.  
My current workaround is to add a router that is either incapable of IPv6 or allows to fully deactivate IPv6 and use that routers DHCP.

---

<div class="post-metadata">

### Author: ![dybm](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dybm](https://community.particle.io/u/dybm)
#### Post date: [November 26, 2018, 6:02pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/4 "2018-11-26T18:02:34Z")

</div>

Thank you for the information @ScruffR, it seems that I did not explain my problem correctly. I am in fact connecting to my WiFi but am unable to establish a connection to the Particle cloud. My Argon is stuck rapidly blinking cyan. I am in the process of opening port 5683 UDP as per @rickkas7 suggestion.

---

<div class="post-metadata">

### Author: ![Mjones](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mjones/32/21658_2.png) [@Mjones](https://community.particle.io/u/Mjones)
#### Post date: [November 26, 2018, 6:25pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/5 "2018-11-26T18:25:55Z")

</div>

[Status.particle.io](http://Status.particle.io) shows a system outage right now. I have 12 customers who went down all at once.

---

<div class="post-metadata">

### Author: ![will](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/will/32/23374_2.png) [@will](https://community.particle.io/u/will)
#### Post date: [November 26, 2018, 6:45pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/6 "2018-11-26T18:45:04Z")

</div>

The outage should now be resolved per [status.particle.io](http://status.particle.io)

---

<div class="post-metadata">

### Author: ![gusgonnet](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gusgonnet/32/27491_2.png) [@gusgonnet](https://community.particle.io/u/gusgonnet)
#### Post date: [December 1, 2018, 8:01pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/7 "2018-12-01T20:01:51Z")

</div>

> [@ScruffR](#):
>
> If you have issues with your Argon not connecting to your WiFi you may run into the same issue I experience due to my DHCP server insisting in providing an IPv6 address to the Argon (since it would be capable of that) but the outbound connection isn’t.

You saved my weekend!!! Thank you ScruffR

---

<div class="post-metadata">

### Author: ![gusgonnet](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gusgonnet/32/27491_2.png) [@gusgonnet](https://community.particle.io/u/gusgonnet)
#### Post date: [December 1, 2018, 8:22pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/8 "2018-12-01T20:22:39Z")

</div>

Continuing the discussion from [Particle Mesh Known Issues and Fixes](https://community.particle.io/t/particle-mesh-known-issues-and-fixes/45722):

> [@\[Updated 3/21/19\] Gen 3 known issues](https://community.particle.io/t/updated-3-21-19-gen-3-known-issues/45722/1):
>
> Argons unable to connect to wi-fi network in setup flow.
> 
> Status: Reported
> 
> Customers experiencing this issue are able to go through an Argon setup flow up to the point of connecting to a wi-fi network. After inputting the password, the device will attempt to connect until such a point it times out, giving an error on the mobile application. (At this time, this is only tested and identified on Android.)

@will  
I was suffering from this issue number 4 until I fixed it by deactivating ipv6 on my router.  
Wouldn't it be cool to mention this suggestion from @ScruffR under that thread as a potential workaround/fix?  
thanks!

---

<div class="post-metadata">

### Author: ![will](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/will/32/23374_2.png) [@will](https://community.particle.io/u/will)
#### Post date: [December 8, 2018, 12:45am UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/9 "2018-12-08T00:45:11Z")

</div>

Thank you for the suggestion! @rickkas7 is helping to manage our **Particle Mesh Known Issues and Fixes** – we’re very close to releasing a standard fix that should resolve this issue, but if you identify other “workarounds” that ought to be included there, let myself or Rick know.

Thanks for the help!

---

<div class="post-metadata">

### Author: ![dybm](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dybm](https://community.particle.io/u/dybm)
#### Post date: [January 4, 2019, 1:29pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/10 "2019-01-04T13:29:58Z")

</div>

My Argon’s are still having connectivity issues on my work network. They are currently running rc27 and are able to connect to a hotspot without issue. My work network has port 5683 open over UDP and TCP. I have tried disabling ipv6 routing, and I have tried limiting the number of DNS servers to two. Each Argon will rapidly flash cyan for ten seconds before blinking red once, then repeating. Is there anything else that I need to modify in my network? My Photons are able to connect successfully; do the mesh devices connect through a different IP that could be potentially blocked?

---

<div class="post-metadata">

### Author: ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)
#### Post date: [January 4, 2019, 1:53pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/11 "2019-01-04T13:53:20Z")

</div>

You can try adding `SerialLogHanldler traceLog(LOG_LEVEL_ALL);` and see if you get any helpful output on USB Serial.

---

<div class="post-metadata">

### Author: ![dybm](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dybm](https://community.particle.io/u/dybm)
#### Post date: [January 4, 2019, 4:00pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/12 "2019-01-04T16:00:10Z")

</div>

Thanks @ScruffR, I ran the suggested code and recorded the following error:

```auto
0000005771 [hal] TRACE: Connecting to "SSID"
0000007671 [ncp.at] TRACE: < WIFI CONNECTED
0000008621 [ncp.at] TRACE: < OK
0000008621 [hal] TRACE: NCP connection state changed: 2
0000008622 [net.esp32ncp] TRACE: NCP event 2
0000008622 [net.esp32ncp] TRACE: State changed event: 2
0000008623 [net.ifapi] INFO: Netif wl3 link UP
0000014321 [hal] INFO: DNS server list changed
0000014322 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0000014323 [system.nm] TRACE: br_enabled=1
0000014324 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0000014326 [system.nm] INFO: Checking gateway status with the device cloud
0000014327 [system] INFO: Retrieved entry from file queue, size 33
0000014327 [system] INFO: Command 2 size 29 skipped because it is a duplicate
0000014328 [system] INFO: Cloud: connecting
0000014330 [system] INFO: Read Server Address = type:1,domain:$id.udp-mesh.particle.io
0000014330 [system] ERROR: Failed to load session data from persistent storage
0000014331 [system] INFO: Discarding session data
0000014332 [system] TRACE: Resolving e00aaaaaaaaaaaaaaaaaaaaa.udp-mesh.particle.io#5684
0000015275 [system] TRACE: Address type: 3
0000015276 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0000015276 [system] INFO: Cloud socket=0, connecting to 52.54.66.84#5684
0000015277 [system] TRACE: Cloud socket=0, connected to 52.54.66.84#5684
0000015277 [system] TRACE: Updating cloud keepalive for AF_INET: 30000 -> 30000
0000015278 [system] TRACE: Applying new keepalive interval now
0000015278 [system] INFO: Cloud socket connected
0000015279 [system] INFO: Starting handshake: presense_announce=0
0000015279 [comm.protocol.handshake] INFO: Establish secure connection
0000015663 [ncp.at] TRACE: > AT+MVER
0000015675 [ncp.at] TRACE: < 5
0000015676 [ncp.at] TRACE: < OK
0000015678 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=2
0000024681 [comm.dtls] ERROR: handshake failed -6800
0000024682 [comm.protocol.handshake] ERROR: handshake failed with code 17
0000024682 [system] WARN: Cloud handshake failed, code=17
0000024933 [system] INFO: Cloud: disconnecting
0000024933 [system] INFO: Cloud: disconnected

```

I can’t find any definitive solutions online to `Cloud handshake failed, code=17`, and like I said above it is able to connect to a hotspot without problems so I don’t believe its an issue with device keys. Am I correct to assume that the above log shows the Argon trying to connect over port 5684, instead of the documented 5683?

---

<div class="post-metadata">

### Author: ![dybm](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dybm](https://community.particle.io/u/dybm)
#### Post date: [January 4, 2019, 6:41pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/13 "2019-01-04T18:41:55Z")

</div>

I opened port 5684 over UDP and the Argon was able to connect.

---

<div class="post-metadata">

### Author: ![mstanley](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mstanley/32/20170_2.png) [@mstanley](https://community.particle.io/u/mstanley)
#### Post date: [February 5, 2019, 8:26pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/14 "2019-02-05T20:26:12Z")

</div>

Hey Dybm,

Glad to hear you got it resolved! Thanks for following up!

---

<div class="post-metadata">

### Author: ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)
#### Post date: [February 5, 2019, 10:42pm UTC](https://community.particle.io/t/what-port-does-the-argon-use-to-connect-to-the-particle-cloud/45598/15 "2019-02-05T22:42:09Z")

</div>

> [@dybm](#):
>
> Argon trying to connect over port 5684, instead of the documented 5683?

Yup, the Photon uses CoAP over TCP on 5683 but the Argon uses DTLS UDP which goes via 5684.

> [@How to force TCP on ARGON to connect to Particle Cloud](https://community.particle.io/t/how-to-force-tcp-on-argon-to-connect-to-particle-cloud/47392/3):
>
> @SammyG I’d like to make a small correction: it’s UDP 5684 defined as coaps (DTLS-secured CoAP). Devices connecting over TCP will use 5683 defined as coap [1]. At the moment Gen 3 devices also use ephemeral random source ports when establishing connections. The source port range is [49152, 65535] for Argons, Borons and Xenons with Ethernet FeatherWing and [40000, 49000] for Xenons connecting through a gateway. [1] [https://www.iana.org/assignments/service-names-port-numbers/service-names-port-n…](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?&page=95)
