Recurrent problem with Photon


#1

Hello everyone.

I purchased a complete Maker Kit + Raspberry Pi and Relay Kit

My Photon is giving me headaches. It just wont connect.

I have used the Android app’s Particle and Spark …they do connect …but mainly will not connect.

I got help from tech support ( idea was that my router was the cause)

First router Trendnet TEW-639GR it did connect with this one.
Second Router ASUS AC1200 did connect (replaced unit after 1 week due to low signal in the house)
Third router AFOUNDRY Q500 connected last night today it will not connect.

I installed df util Json and the shell version of particle.cli.

It works but i get error messages following is a cut and paste of the error file.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2017/03/11 13:05:29 particle: Adding dependencies…
2017/03/11 13:06:11 done
2017/03/11 13:06:11 particle: Installing plugins…
2017/03/11 13:23:54 particle: Installing plugins…
2017/03/11 13:33:35 particle: Installing plugins…
2017/03/11 13:52:10 particle: Installing plugins…
2017/03/11 14:34:00 particle: Installing plugins…
2017/03/11 14:46:07 particle: Installing plugins (retrying)…
2017/03/11 15:00:54
2017/03/11 15:00:54 ! Error reading plugin: particle-cli
! exit status 1
! module.js:327
! throw err;
! ^
!
! Error: Cannot find module ‘particle-cli/package.json’
! at Function.Module._resolveFilename (module.js:325:15)
! at Function.Module._load (module.js:276:25)
! at Module.require (module.js:353:17)
! at require (internal/module.js:12:17)
! at [eval]:3:15
! at Object.exports.runInThisContext (vm.js:54:17)
! at Object. ([eval]-wrapper:6:22)
! at Module._compile (module.js:397:26)
! at node.js:611:27
! at nextTickCallbackWith0Args (node.js:452:9)
2017/03/15 00:34:17 particle: Installing plugins…
2017/03/15 00:36:58 particle: Installing plugins (retrying)…
2017/03/15 00:49:31
2017/03/15 00:49:31 ! Error reading plugin: particle-cli
! exit status 1
! module.js:327
! throw err;
! ^
!
! Error: Cannot find module ‘particle-cli/package.json’
! at Function.Module._resolveFilename (module.js:325:15)
! at Function.Module._load (module.js:276:25)
! at Module.require (module.js:353:17)
! at require (internal/module.js:12:17)
! at [eval]:3:15
! at Object.exports.runInThisContext (vm.js:54:17)
! at Object. ([eval]-wrapper:6:22)
! at Module._compile (module.js:397:26)
! at node.js:611:27
! at nextTickCallbackWith0Args (node.js:452:9)
2017/03/15 01:21:36 particle: Installing plugins…
2017/03/15 01:33:32 done
2017/03/15 05:38:40 Error: connect ECONNREFUSED 192.168.0.1:5609
at Object.exports._errnoException (util.js:856:11)
at exports._exceptionWithHostPort (util.js:879:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1062:14)
2017/03/15 05:43:22 Error: connect ECONNREFUSED 192.168.0.1:5609
at Object.exports._errnoException (util.js:856:11)
at exports._exceptionWithHostPort (util.js:879:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1062:14)
2017/03/15 05:45:34 Error: connect ECONNREFUSED 192.168.0.1:5609
at Object.exports._errnoException (util.js:856:11)
at exports._exceptionWithHostPort (util.js:879:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1062:14)
2017/03/15 05:47:54 Error: connect ECONNREFUSED 192.168.0.1:5609
at Object.exports._errnoException (util.js:856:11)
at exports._exceptionWithHostPort (util.js:879:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1062:14)
2017/03/15 22:44:10 Updating CLI…
2017/03/15 22:44:17 no plugins to update.
2017/03/18 22:12:35 Error: connect ECONNREFUSED 192.168.0.1:5609
at Object.exports._errnoException (util.js:856:11)
at exports._exceptionWithHostPort (util.js:879:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1062:14)
2017/03/18 18:23:44 Updating CLI…
2017/03/18 18:24:03 no plugins to update.
2017/03/18 22:28:39 Error: connect ECONNREFUSED 192.168.0.1:5609
at Object.exports._errnoException (util.js:856:11)
at exports._exceptionWithHostPort (util.js:879:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1062:14)
2017/03/18 22:49:24 Error: connect ECONNREFUSED 192.168.0.1:5609
at Object.exports._errnoException (util.js:856:11)
at exports._exceptionWithHostPort (util.js:879:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1062:14)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

It seems to be a connection error …via the shell command.

When i use Android Particle it connects to my network but when it goes to claim the device in the cloud the app just hangs.


#2

Well guess what …it just reconnected again.

Could all these troubles be caused by my Satellite internet connection …cause my pings are very high.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Terminal - Gateway Connectivity Test
Sat Mar 18 23:18:56 2017
Packet Loss: 0.00%
Average Delay: 712.63 ms
Minimum Delay: 644.22 ms
Maximum Delay: 828.35 ms
IP Gateway: EDM16XCIIGW15C001Adv
Result Interpretation: If Packet loss is 0%, you have good access to the gateway. If Packet loss is 100%, you have no access to the gateway and have a problem. If Packet loss is between 1-100%, you have limited connectivity to the gateway.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I really cant developp and test with all this stuff side tracking me …

All of my ESP8266 modules work fine and even my NodeMcu relais work great. (android apps …same network)

What gives …any thoughts will be welcomed.

Frank


#3

Where is that log from? What are you trying install particle-cli on? Raspberry Pi?

Are you using a current version of npm and node?

Install with:

curl -sL https://deb.nodesource.com/setup_7.x | bash -

Does the following help install particle-cli?:

sudo npm install -g --unsafe-perm node-pre-gyp npm serialport particle-cli

You can claim a photon using particle-cli:

# Put photon into listening mode
particle serial identify # Obtain deviceID
particle serial wifi # Connect photon to wifi
particle device add your_deviceID # Claim photon

#4

Nrobinson …that is the error log from particle cli in my pc.

Particle is to claim my photon, and configure it to connect to the cloud

Yes allversions have been updated.

PS you made a good piece of soft your linux po-util …good job.


#5

@DevIoTCanada, I assume your are in Canada from your username. I am too.

We use Bell DSL at the house and XploreNet satellite (same as you, maybe?) at the farm. Both are not very good …

Anyways, long story short, both services have been causing issues for the last five days (after 2 months of solid connection). I have both a Photon and a newly added RaspberryPi connecting to the particle cloud, or at least they should be.

Something seems to happen and the modem stops serving some of the services. It is hard to determine, since it seems to continue serving HTTP and browsing a website still works. (I am certain particle cloud connection is using something other than HTTP.) However, doing a test at www.speedtest.net will indicate a problem if it fails to perform a speed test (it usually gets stuck on the ping phase when there is a connection problem).

When this happens, I see a fast flashing green pattern on the Photon.

Powering off the modem for 15 seconds and then re-connecting solves it for half a day. Once the modem is reset, then the devices re-establish connection almost immediately. Then repeat half a day later.

There are known issues with mains power sensitivity for the modems of both companies. In fact, Bell stores keep a supply of replacement wall-warts on hand for the particular modem they provided me.

Or, it could be something else.

Let us know if it could be the same thing I am seeing, or provide details if it is something else. It may not be a Photon or particle issue, but we will try and get you up and running!


#6

Hi Allan

Yes I am with Xplornet
But i have been having this trouble since the first week of January when i received the Photon…but since then i have configured multiple Esp2866 boards and some NodeMcu relay shields and they dont behave this way.

Frank in Quebec. 1 km from the Vermont border.


#7

Do they also talk to a remote cloud?


#8

Yes they are connected via mydevices.com and Windows 10 Iot via cloud


#9

@DevIoTCanada, Hi Frank, I am Al in Quebec, except I am closer to Ottawa.

I just reset my DSL modem (again)…!

What kind of symptoms are you seeing on your Photon when it will not connect?
Is it right from power-up, or does it lose connection at some point?
Is it losing connection to WiFi, Internet or the particle cloud?

@Scruffr, Is there a quick way to determine what internet service is being used to connect Photons and R Pis?
The reason for asking is technical support at my ISP asks me to go to google.ca (a HTTP service) to verify the internet is working.
However, when I lose connection, HTTP still works fine, but other services fail such as Windows Update, speedtest.net and particle…
I need to be better informed to be able to insist there is a modem/DSL/service problem.

Thanks!


#10

It will just randomly diconnect and then it flashes green to get the connection to the wifi …but never reconnects

Trying it right know


#11

It just connected fine took like 5 seconds


#12

Here is my speed test …pathetic


#13

I’m not sure what exactly they’d expect you to tell them, but to talk to the cloud you need CoAP port 5683 open.


#14

I’m in Ottawa and I am not having any problems with disconnects. I’m using Teksavvy cable, not DSL.


#15

Me and Alan are having various disconnect from cloud situations …with satellite internet.

We are both clients of xplornet and trying to figure out what is causing these disconnects


#16

@DevIoTCanada, it may be related to DNS lookup timing out due to the round-trip time. The system firmware does a DNS lookup to find the Particle Cloud so it is quite possibly timing out. Latency on Satellite links is notoriously bad. Are you using the Particle Cloud? Which SYSTEM_MODE are you using?


#17

At the moment all i am doing is trying to configure the Photon correctly and using the online IDE to flash programs …question to verify the integrity and performance on OTA updating for a project I am developping.


Trying again to fix the whole Particle experience
#18

@peekay123, It could very well be that @DevIoTCanada and I have different problems. I am absolutely certain that my problem is with the modem/ISP.
The first time it happened was about a week ago, I reset the Photon, which did not fix the connection. Since then, powering off then on ONLY the modem allows the Photon and R Pi to immediately reconnect to the particle cloud.

As @peekay123 suggests, your issue may be latency. My ping latency is an order of magnitude better, but my upload and download speeds are very similar.
Here is my result for DSL at the house:

By the way, I have had no connection problems today, now that I am used to regularly resetting the modem.


#19

Well today i was Ste-Justine with my son and while waiting i flashed a script via the shared wifi of the hospital …monitored the reaction (didnt compile properly) but i still flashed the unit remotely and it did load (got errors due to not setting any hardware to report data)

And i just reset the unit OTA and everything came back to normal.

i am assuming it must have to do with all the devices at home ( 3 cells, 2 lan cpu’s, 1 wifi cpu, 3 Raspberry Pi,s , the printers, sound system and tv all taking data) and the Photon.

Since we where not at home the bandwidth must of just been a few keep alive signals.


#20

@DevIoTCanada, With all your devices, I suggest experimenting with removing all other devices from the network except a single photon (or temporarily shutting them down) and see if you can successfully connect that way. If you have marginal latency or download speed issues, then you might at least determine the cause (ie. If the photon starts to work, then sharing the internet service with other devices is delaying the particle connection and you know it is a satellite latency/speed performance issue. If it still does not work, it could still be a latency/speed issue or it could be something else.

Another test could be to try connecting your photon to your router on someone else’s high speed internet. If it works there, then you at least eliminated the router as a problem. If not, then you know there is a router issue.

I know these are inconvenient things to try, but you would at least gain knowledge of where the issue is.