Connecting Photon to cloud via HTTP proxy

Hello, very new to Photon (old Arduino hand) so could be doing something silly. I have looked through documentation and forum and couldn’t seem to find an up to date answer, sorry if I am missing something.

I can connect my Photon to the cloud at home and flash to it via the Build web IDE no problem, but when I try at work it just won’t connect to the cloud (fast flashing cyan). I am guessing it is because we go through an HTTP proxy?

Is it possible to set web proxy settings on the Photon? I don’t need to enter user credentials, just the proxy server address and port.

I am on a Mac if that makes a difference.

1 Like

You might have to open the CoAP port. (5683)

https://community.particle.io/search?q=Coap%20port

2 Likes

I don’t think that the Photon will work with a HTTP Proxy per say as it is not using HTTP.

@nrobinson2000’s suggestion should be all that is required for your Photon to punch out of your firewall.

2 Likes

Thanks for the replies. I see and have just done lots of reading about CoAP!

I have requested the port opening, but apparently this can take two weeks or more so I will have to wait and see if that sorts it.

In fact, the current device I want to build doesn’t need cloud access as I only want it to communicate locally over UDP (using OSC). So presumably it is already as connected as it needs to be? In that case I should be able to use Particle Build, download the binary and (somehow) flash it to the device over USB? Will it still be able to use the local network without connecting fully to the cloud?

1 Like

Yes - SYSTEM_MODE(MANUAL) or SYSTEM_MODE(SEMI_AUTOMATIC) would be the keywords to look for.

CLI would be the way for that via particle flash --usb <firmware.bin> and you can even compile via CLI

3 Likes

Brilliant, thank you.

I am able to flash my code to the Photon with CLI and ‘particle flash --serial firmware.bin’ , have set the device to semi_automatic and have connected to Wifi with ‘WiFi.connect();’.

The device is now breathing green which I believe shows it is connected to the wifi network, but not the cloud which is what I want.

I need to do some more work to get the OSC going, but hey that’s another story. Thanks for all the help.

2 Likes