Author Topic: SSID with Leading Space  (Read 3441 times)

nic.ashby

  • Newbie
  • *
  • Posts: 17
SSID with Leading Space
« on: January 10, 2017, 09:19:28 am »
My roommate's wifi was setup with a space before the rest of the name. It's " Bachelorpad 2g".
I do believe this leading space gets ignored by the Oak and doesn't allow it to connect.
I have tried manually typing the SSID into Oak Wifi Config as well as selecting from the list each several times.
The space is definitely ignored in the SSID listing in Oak Wifi Config.

emardee

  • Full Member
  • ***
  • Posts: 135
Re: SSID with Leading Space
« Reply #1 on: January 12, 2017, 04:34:47 am »
You need to tell your housemate, that *someone* just posted his Wifi Password on the internet and therefore he'd be safest picking a new one! Hopefully that will solve your problem....   ;)

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: SSID with Leading Space
« Reply #2 on: January 12, 2017, 04:41:23 pm »
Ah... but won't he just change the password, and not the SSID? Just tell him that "Bachelorpad" is so 2016... and he needs a new WiFi name!!! :-P

It is possible to configure the Oak wifi more manually, via the JSON interface, but I think it is probably a lot easier to simply offer a six-pack of beer or something in exchange for a SSID change! :-O


malaire

  • Newbie
  • *
  • Posts: 28
Re: SSID with Leading Space
« Reply #3 on: January 13, 2017, 02:16:33 am »
It is possible to configure the Oak wifi more manually, via the JSON interface ...
That wouldn't work either, JSON interface removes spaces at start/end of SSID:
https://github.com/digistump/OakCore/blob/d2883790322044a3f8c3a26c8812218ad486e12d/cores/oak/OakParticle/particle_core.cpp#L3797

That is really strange thing to do as JSON requires SSID to be quoted in the first place, but still removes spaces given inside quotes.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: SSID with Leading Space
« Reply #4 on: January 13, 2017, 03:49:12 am »
Thanks for that malaire... I had opened up the configure_ap_from_JSON stuff earlier in the day, but got distracted and didn't get around to reading through it...  :(

So maybe compiling a version of OakSystem sans ssid.trim() then? As long as that doesn't stuff something else up, I can also submit a PR to remove that so it is 'fixed' in a later version...

nic.ashby

  • Newbie
  • *
  • Posts: 17
Re: SSID with Leading Space
« Reply #5 on: January 14, 2017, 09:18:55 pm »
I gave myself access to the router and removed the leading space from the SSID and it connects like a charm.
I'm sure this wouldn't be a super common problem as who in their right mind would add a space to the beginning to an ssid? but hey, I figured i'd at least point out that it will not work for the Oak.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: SSID with Leading Space
« Reply #6 on: January 15, 2017, 12:04:25 am »
Glad you're up and running... (and hopefully not literally running once your roommate realises he has to his devices to the WiFi :-O)

No it probably isn't common, so thanks for reporting that. I'll probably look into that next weekend and see if it is easily fixable issue. More robust / less error-prone code is always appreciated!