Author Topic: How to work with Particle  (Read 14969 times)

exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: How to work with Particle
« Reply #15 on: February 08, 2016, 10:52:42 pm »
Are you kidding me???? Decided to run the OakSoftAP in developer mode (on Firefox) and watch the network traffic. Failed the first time through, so I started over and watched intently trying to understand what was going on. Of course it all seemed a bit cryptic and then bang. I looked up and I was informed that I was connected to the cloud (ran this on my laptop with the Oak powered by it's USB port).  Went to particle.io and there it was, a device id with no name. I unplugged the Oak and left particle.io, came back to particle.io and the id was still there but not shown as connected. I then connected the Oak and shortly there after, it showed up as connected.

I wish I could tell everyone that has not been able to connect to the cloud what the magic was but I can't. I can say that if you get the long rapid flash (about 20 seconds) you mostly likely loaded firmware successfully. So I'm guessing the fail has something to do with connecting to the cloud.

At this point I'm more interested trying to understand why is does or doesn't work. So rather than trying to load and run sketches, I'll remove my device from particle.io and try to repeat the success or fail and try to understand why. I mostly likely won't figure it out but I just can't let it go.

Now here is the really interesting part (big grain of salt required). I don't put much stock in it but somewhere on the forum in the last few days someone said they tried to shield the Wifi signal with their body (I'll have to find the post). Well guess what, on the last and only attempt that worked, the Oak was tucked under my leg (I was willing to try anything). Probably a red herring, but if I continue to have fails after I remove the Oak from particle.io, you can bet I will try it again.

Damn I wish I could say "It worked because..." or "It fails because...".

exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: How to work with Particle
« Reply #16 on: February 08, 2016, 11:04:36 pm »
FastEddy,
Just saw your post after I posted my post. Yep, I saw the fast LED heartbeat many times and for what appears to be about 20 seconds. So I probably loaded firmware successfully many times without really knowing it because of the cloud connect fails. So at least we can surmise that the pattern you described is a good indication of the firmware load. It is the connect to cloud that I would like to understand even though I now have a device on the cloud. If you see my post you'll see that it was my laptop that succeeded. So I'm guessing the cause of success or failure has something to do with network traffic, protocol, timing, who knows.

If I gain any insights or clues I'll post, but I'm an ex eng and by no means an expert.

exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: How to work with Particle
« Reply #17 on: February 08, 2016, 11:55:02 pm »
OK an update before I close my eyes for the night...

I'm beginning to think that the failures to get Oak setup up and on the cloud are timing issues related to switching between networks, that is, Oak's ACORN-XXXX wireless net and the internet connected wireless routers as you go through the steps. At least that is the direction I'm going now.

exeng


exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: How to work with Particle
« Reply #18 on: February 09, 2016, 10:33:56 am »
Been able to repeat successful setup and successful connection to the cloud this morning, but still not able to explain why it works. Also managed to get it to work without running OakSofpAP in developer mode. Still think has something to do with timing of network changes from ACORN_XXXX to and fro to Internet Router Access.

tcarleton

  • Newbie
  • *
  • Posts: 21
Re: How to work with Particle
« Reply #19 on: February 10, 2016, 11:06:43 am »
Tried a different tactic. Setup DNSMASQ w/dhcp on a RaspPi so I could see the requests. On a provisioning attempt, I'd see the IP Request come through, then 5 seconds later a second ip request from the same device. If this didn't happen, it doesn't do the rapid blinks.  I haven't figured out if that behavior is normal (asking for an IP 5 seconds after it got it) or an artifact of my hopping around from router to router.

Also found a ticket (https://github.com/digistump/OakCore/issues/20) that provided helpful information.

http://192.168.0.1/info will give you basic info in JSON including Firmware_Version (look for 1.0.0)
http://192.168.0.1/particle either gave me a "Not Found" or "Connected" response.  Connected was a bit of a shock as I couldn't tell it was online.

Waited a few minutes, kept checking particle. Finally copied the ID string from my /info page, manually added the device on particle and was instantly connected.

I've got one more oak "in the box".  If I have time I'll try to recap the procedure for the final one this weekend including what I see on the DNSMASQ side. At this point I'm simply obsessed with figuring out the on-boarding process.

FastEddy

  • Newbie
  • *
  • Posts: 9
Re: How to work with Particle
« Reply #20 on: February 10, 2016, 09:56:51 pm »
I was wondering about something I read in the light of an observation I had that the WiFi signal from the Oak is MUCH stronger than my wireless hub (even when both are right next to the Android phone running WiFi Analyzer). When I saw this, my initial reaction was to move the Oak to the other side of the house and try updating at a distance (thinking that reflections might mess up reception in a home environment). I have no idea if this would have helped since I was successful with the update in a different room of the house right afterward. Still I had moved from the kitchen (with much metal around) to the dining room (perhaps with a simpler environment). And, come to think of it, I had hung the Oak inside a heavily-leaded Waterford crystal vase by the cable so that I could see the blinking LEDs.

I'm thinking that signal attenuation could help.

Maybe????

I am certainly going to look at the strength of the signal from inside the vase Vs outside this weekend.
« Last Edit: February 10, 2016, 10:07:51 pm by FastEddy »

olman011

  • Newbie
  • *
  • Posts: 4
Re: How to work with Particle
« Reply #21 on: February 10, 2016, 10:10:17 pm »
Using the advice in this thread I was able to update the firmware on my first Oak.
It took two attempts but it went through. Then, like most people, I couldn't get through the connecting to the cloud part.

I followed tcarleton's advice and checked the "info" page of my Oak. It had the 1.0.0 firmware so I knew I was okay there, then I check the "particle" page and saw the connected message.

I went to the particle dashboard but didn't see anything connected so I again followed his advice and copied the ID number and registered it manually. It instantly recognized it and connected me.

I'm a little hesitant to try to flash it with a new program but I really want to get busy using it.

tcarleton

  • Newbie
  • *
  • Posts: 21
Re: How to work with Particle
« Reply #22 on: February 10, 2016, 10:56:52 pm »
olman011,
So far for me the sketch upload experience has been pretty smooth. At worst I've had to hit upload from the arduino idea twice. Once the flash starts (If you're watching the Oak) its really obvious its going through.

The only bad situation I got into (pre .92?) was by accidentally uploading a demo ESP8266 sketch without changing the SSID/pw info -- and the recovery options might be better now (https://github.com/digistump/OakCore, haven't done it yet but see the bit about pulling pin 10 to ground for WifiConfig Setup Mode)

exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: How to work with Particle
« Reply #23 on: February 10, 2016, 11:33:29 pm »
Well, I've managed to get all 3 of my Oak's setup and on the cloud. The last one took the least amount of retries (who knows why?) but on that last try I did configure my laptop not to automatically connect to my AP (router). Only after the long rapid flash sequence (of expected length) and some quiet time (40 seconds or so) in slow flash, did I manually connect to my AP to provide internet access to OakSoftAP to do the Check Cloud Connection. Got an immediate response that it was there. I've never had to manually register the Oaks.

In prep for possible bricking, I've recorded all of my device IDs in a table with SSID, Name on AP, Name on Particle (the ones I assigned) just in case.

Used 192.168.0.1/device-id to see the ID when connected directly to the Oak or whatever IP address you AP assigns/device-id when it is connected to your AP.



theevl

  • Newbie
  • *
  • Posts: 5
Re: How to work with Particle
« Reply #24 on: February 11, 2016, 08:38:29 am »
tcarleton,

can you tell us what demo ESP8266 sketch you used?
and did it work after you fixed the SSID/password information?

thanks

olman011

  • Newbie
  • *
  • Posts: 4
Re: How to work with Particle
« Reply #25 on: February 11, 2016, 08:45:41 am »
Has anyone used the particle web IDE to program their Oak?
I can't get anything to compile, probably because the details for my Oak under "Particle Devices" list "No firmware available".
I assume that means that things aren't ready yet for that part of the system?

All I'm trying to do is use the "web-connected-LED" example to see if it works.

Do I have to use the Arduino IDE locally and then go to my particle dashboard so see if the Oak is communicating with the web?

tcarleton

  • Newbie
  • *
  • Posts: 21
Re: How to work with Particle
« Reply #26 on: February 11, 2016, 07:40:16 pm »
theevl,

I'm pretty sure it was the IRServer example from https://github.com/markszabo/IRremoteESP8266 (which works fine). I neglected to change (or omit!!) the explicit ssid password default values: Literally this:

const char* ssid = "........";
const char* password = "........";

In my mind I had just uploaded a sketch that basically said "yeah, boot up and then spend your life connecting to nothing" and I couldn't find any recovery info at the time so I went the OakRestore route.

Typing this out, its possible that I didn't even bother trying to hit upload again with a "good" sketch -- I don't really know (beta or even roadmap wise) what scenarios we can recover from.

FastEddy

  • Newbie
  • *
  • Posts: 9
Re: How to work with Particle
« Reply #27 on: February 25, 2016, 09:52:27 pm »
Things seem to be moving faster now.

Thanks again Erik!

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: How to work with Particle
« Reply #28 on: February 27, 2016, 12:15:22 am »
That sounds pretty much the same as my experiences FastEddy... I had too many issues with my laptop trying to connect to the Oak's AP, and instead used my tablet, and that was pretty solid.

olman011: The Particle Web IDE isn't ready for Oak yet - only supported method at present is via the Arduino IDE, which then delivers the compiled binary OTA via Particle. Expect some progress on the Web IDE once the firmware for Oak has stabilised.