Author Topic: [SOLVED] Can see oak in wireless network manager, but cannot connect  (Read 4959 times)

jwhendy

  • Newbie
  • *
  • Posts: 44
I finally took some time to try and play with my oak, and I'm feeling really really confused about what I'm supposed to do! Other posts seem to be about not seeing the oak SSID at all, being able to connect to the oak, but then not to a network, or being able to connect to a network but then having issues on the particle/update process. I'm stuck in between those steps!

I see an SSID, ACORN-xxxxx, in wicd (linux network manager), click connect, but it times out trying to obtain an IP address. I get this in my log:

Code: [Select]
[34011.885035] iwlwifi 0000:3e:00.0 wlp62s0: disabling HT as WMM/QoS is not supported by the AP
[34011.885037] iwlwifi 0000:3e:00.0 wlp62s0: disabling VHT as WMM/QoS is not supported by the AP
[34011.885562] wlp62s0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
[34011.887102] wlp62s0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x1 status=0 aid=1)
[34011.896779] wlp62s0: associated
[34011.896802] IPv6: ADDRCONF(NETDEV_CHANGE): wlp62s0: link becomes ready
[34012.188394] iwlwifi 0000:3e:00.0: No association and the time event is over already...
[34012.188404] wlp62s0: Connection to AP xx:xx:xx:xx:xx:xx lost

Is there a manual way I can try associating, or is there something additional I need to do on my computer/wireless for this to work properly?

I got my oaks on the kickstarter campaign... I see references to various firmware versions in these forums but don't even know how to check what mine is, if that's an issue. There have been firmware updates posted on the kickstarter campaign for some time; it's not clear to me if this means that all the oaks shipped in an unusable state and I have to buy the 3.3v USB thingy to make it functional via a firmware update?

Any pointers would be appreciated, and feel free to request other system details if those would be helpful.
« Last Edit: March 13, 2016, 01:26:38 pm by jwhendy »

djflix

  • Newbie
  • *
  • Posts: 24
Re: Can see oak in wireless network manager, but cannot connect
« Reply #1 on: March 13, 2016, 08:55:50 am »
If you don't already have a particle account, create one here:

Then I suggest using a smartphone or tablet to do the following:
- Open http://rawgit.com/digistump/OakSoftAP/master/config.html
- Follow the instructions on the page (including the instructions telling you to switch WiFi networks)
- Wait and pray that the oak updates successfully

There are two possible outcomes:
1. Your oak has updated and has connected to particle => Yay! Check out dashboard.particle.io and verify your Oak is connected!
2. You receive an error message. This basically means: try again, or use a different WiFi network (could be you mobile phone hotspot, other WPA/WPA2-settings, whatever).

If the above doesn't help, you unfortunately belong to the group of users that is not able to use the Oak just yet. The 3.3v thingy is mostly to recover a bricked Oak or to restore the Oak to factory state. You won't need this unless you have pre-release firmware on your Oak and are unable to update via OTA.


jwhendy

  • Newbie
  • *
  • Posts: 44
Re: Can see oak in wireless network manager, but cannot connect
« Reply #2 on: March 13, 2016, 09:56:58 am »
Progress!

Ah, thanks so much. Hadn't occurred to me to use my phone to connect/i] to the oak AP! I thought the phone suggestions in the forums were simply for the purpose of using an open hotspot after connecting to the oak network from the computer. In any case, it worked, with medium-level frustration. I found the process fairly tedious, as the oak didn't seem to connect to my home router. Thus, I had to have LTE on, go to the SoftAP site, enter particle details, turn on wifi and connect to the oak, manually enter AndroidAP for my phone hotspot, click next, quickly turn on my hotspot (turning it on turns off wifi), let the oak do it's thing, and then hope it was done before turning wifi back on to re-connect to the oak and go to the next step.

Anyway, it took about 10 tries before I finally got it to succeed. Now I'm moving on to the Arduino programming section, so psyched about that!

Thanks so much for the nudge in the right direction and taking the time to explain something that probably should have been clear to me. Not sure if the wiki is totally open, but I may write up my experience or simply clarify the exact steps required, as I've never used an IoT device so setting up connectivity was foreign. Cheers!

jwhendy

  • Newbie
  • *
  • Posts: 44
Re: Can see oak in wireless network manager, but cannot connect
« Reply #3 on: March 13, 2016, 12:56:13 pm »
Alright, so I have another question. How does one change which wireless AP the oak is connected to without having to access the SoftAP site? I don't need to do the firmware update, but I realized that it's still looking for my phone's hotspot (now off), and not my home wireless. I'm still unable to get my computer to connect to it, and my phone is just showing blank pages for all of the ones listed here, which is how I assumed I could do it (the scan-ap internal url, for example).

Any suggestions on connecting from my computer and/or accessing the internal urls from my phone (if that's the only way I'll be able to connect to the oak)?

update: so it seems I need to manually turn off mobile data to see the pages, but none of them seem to allow me to change the desired network. info, version, and device-id provide sane information. scan-id shows me the list of visible ssids, but configure-ap and set just feature what looks like json with a single entry:

Code: [Select]
{"r" : 1}
Some have a 0, but the point is nothing looks settable.

update2: well, I took a gamble and just went to the SoftAP website again, which gladly didn't try and re-download the firmware but just let me point the oak to a different network. I think I'm solved now. Successfully flashed a modified blink program so I know it takes code pushes, and have it on my home network. I'll mark this solved.

« Last Edit: March 14, 2016, 01:21:07 pm by jwhendy »

jwhendy

  • Newbie
  • *
  • Posts: 44
Re: [SOLVED] Can see oak in wireless network manager, but cannot connect
« Reply #4 on: March 14, 2016, 01:27:15 pm »
Well, I should have knocked on wood. Here's the sketch I flashed to try controlling the RBG color of an LED strip with POST commands and Particle.function():

Code: [Select]
#define FASTLED_FORCE_SOFTWARE_SPI
#include "FastLED.h"

// must use fastLED 3.1: https://github.com/FastLED/FastLED/tree/FastLED3.1
// fast led constants and initialize
#define DATA_PIN    4
#define LED_TYPE    WS2812B
#define COLOR_ORDER GRB
#define NUM_LEDS    28
CRGB leds[NUM_LEDS];

int sat = 255;
int bright = 200;
int hue = 0;

void setup() {               
  delay(2000);

  FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER > (leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
  FastLED.setBrightness(200);
 
  pinMode(1, OUTPUT); // LED on oak

  Particle.function("value", setter);
 
}


int setter(String val)
{
 
  hue = val.toInt();
  return 1;
 
}

// the loop routine runs over and over again forever:
void loop() {

  fill_solid(leds, NUM_LEDS, CHSV(hue, 255, 200));
  digitalWrite(1, HIGH);
  FastLED.show();
  delay(1000);
  fill_solid(leds, NUM_LEDS, CHSV(0, 0, 0));
  digitalWrite(1, LOW);
  FastLED.show();
  delay(5000);
 
}

I flashed it successfully, then hooked up my strip to vcc, gnd, and p4. Nothing happened, which I thought was an issue with my code. I went back to tinker and re-upload (replacing the "hue" variable in my fill_solid() call with a static value), and was unable to upload.

Every since, my oak will not take a sketch. It uploads to particle, then times out either during the flashing or reboot step of the process. In addition, on a power cycle, it connects to my wifi and I can see it on particle but then it goes offline after just a couple of minutes never to return.  So I grabbed my other oak, got it setup (SoftAP update) and also flashed a successful blink routine. Then I flashed the code above and now I'm experiencing the same with both. They connect, then disconnect after a few minutes (doing nothing) or upon flashing.

Is there anything wrong with what I did that could cause this?? As in, can a sketch binary file goof with the wireless settings at all? I don't get why it's leaving my wireless network and going offline according to particle. That said, I could see it still listed as connected in my router status page. I have no idea what's going on...

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: [SOLVED] Can see oak in wireless network manager, but cannot connect
« Reply #5 on: March 15, 2016, 12:13:51 am »
Hey jwhendy... what happens if you leave it alone for a few minutes? Does it keep disconnecting and reconnecting? I had the same issues with mine at one point... but the disconnect/connect cycle seemed to settle down after being left alone for a few minutes. I could program them without any issue, but every now and then, they would go bonkers and start the disconnect/connect cycle for several cycles / 2-3 minutes, and then calm down.

As an demo, just use the below code to make one of the Oaks do simple little double blink program, and see if it has the same issue. I expect it will have some issues starting up - the blinks won't be on time, and will freeze, and then it will probably start doing a double blink and thendisconnect/connect, and repeat that cycle, and hopefully after 2-3 minutes, it will work perfectly. Hopefully!!  :D

Pete

Code: [Select]
void setup()
{
  pinMode(1,OUTPUT);
  digitalWrite(1,LOW);
}

void loop()
{

  digitalWrite(1,HIGH);
  delay(100);
  digitalWrite(1,LOW);
  delay(100);
 
  digitalWrite(1,HIGH);
  delay(100);
  digitalWrite(1,LOW);
  delay(1700);
}
« Last Edit: March 15, 2016, 12:15:28 am by pfeerick »

jwhendy

  • Newbie
  • *
  • Posts: 44
Re: [SOLVED] Can see oak in wireless network manager, but cannot connect
« Reply #6 on: March 15, 2016, 11:22:49 am »
@pfeerick: thanks for the reply. To my knowledge, it never reconnects at least certainly not within a few minutes. I honestly wonder if it had to do with the LED strip code posted  above or inadvertently wiring something improperly. Is there anything from the hardware side that could goof with it's settings? I can still get to wifi mode by grounding pin 1, so I would think the firmware is intact...

I can't flash a blink routine anymore and used one very similar to what you have.

Code: [Select]
void setup()
{
 
 pinMode(1, OUTPUT);

}

void loop()
{

  digitalWrite(1, HIGH);
  delay(200);
  digitalWrite(1, LOW);
  delay(500);

}

Basically, the same as the _OAK_EXAMPLES -> Start.ino sample file.

I'd like to try and watch my router log or use wireshark to see definitively what's going on. Your comment made me wonder if it's "connected" but not associating with Particle. I hadn't thought of that... Then again, it shows being online via the Particle android app for ~2-3 minutes and then goes offline.

Also, my issue includes the fact that I can no longer flash a new file. The Oak has never completed the "Rebooting Oak........" step of the upload. Most of the time it doesn't even get past "Flashing....." and times out. The rare times it supposedly flashes, it doesn't reboot and I get the message about "the flashing probably failed" or whatever it is.

djflix

  • Newbie
  • *
  • Posts: 24
Re: [SOLVED] Can see oak in wireless network manager, but cannot connect
« Reply #7 on: March 16, 2016, 03:41:11 am »
I'm glad you were able to finish the initial setup using your phone :). Concerning your later question:

I had some issues when using the 0.9.5 Oak Board stuff in Arduino 1.6.5 after having used an earlier version (0.9.3) before. When opening dashboard.particle.io I could see the device going online, and then offline again. Over and over. I think this was just after the first FastOTA flash on that specific Oak board.

Slightly frustrated, I connected my 3.3v Serial-to-USB converter and used https://github.com/digistump/OakRestore to return the Oak to factory state. After that everything has been working great! If you have a 3.3v Serial-to-USB converter I highly recommend restoring it and starting with a 'clean' base firmware. This does mean that you have to remove the device from build.particle.io (Devices -> Remove), and run through the SoftAP setup again + the initial update.

jwhendy

  • Newbie
  • *
  • Posts: 44
Re: [SOLVED] Can see oak in wireless network manager, but cannot connect
« Reply #8 on: March 16, 2016, 12:38:33 pm »
@djiflix: I have a 3.3v UART on order and actually just posted on github to see if it's possible to just use an Arduino with a voltage divider or straight up (the ESP8266 is supposedly 5V tolerant). If someone confirms over there, I'll probably try on one of mine to do the restore process. Otherwise, looks like my 3.3v UART will show up on Saturday from ebay!

Mine has never reconnected/cycled. Online (according to particle) for ~2-5min, then gone. I left one plugged in all of last night and the particle dashboard says it was last seen at ~9p (when I plugged it in), so looks like it's not there. Interestingly, my router still says it has a DHCP lease but when I log in and use the arp command, indeed it's not connected.