a6d1 wpa_supplicant and PSK - How do I escape characters? - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Desktop Usage > Mobile Computing

Mobile Computing This forum discusses issues related to running FreeBSD on notebooks, laptops, and other mobile equipment.

Reply
 
Thread Tools Display Modes
  #1  
Old April 19th, 2012, 18:43
Orum Orum is offline
Member
 
Join Date: Nov 2009
Location: Virgo SC
Posts: 121
Thanks: 8
Thanked 2 Times in 2 Posts
Default wpa_supplicant and PSK - How do I escape characters?

I'm trying to use wpa_supplicant in PSK mode, but my key has a few troublesome characters in it, namely backslash, \, and double quote, ".

I thought that you could simply escape these in a manner similar to how C escapes these characters, by putting a backslash in front of them, i.e. \\ results in a \ and \" results in ". However, when I try to start wpa_supplicant with the characters escaped, it errors with:
Code:
Line 11: Invalid passphrase length 68 (expected: 8..63)
and a host of other errors following that, because it no longer has the PSK.

So, is there some other way I'm supposed to escape these characters? The key is normally 63 characters long, and I wonder if it's calculating the key length before considering the escape sequences, which would be a bug. If so, is the only way around this to use wpa_passphrase?
Reply With Quote
  #2  
Old April 26th, 2012, 23:57
chip64c chip64c is offline
Junior Member
 
Join Date: Mar 2011
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
Default

You might try converting your passphrase to a group of 64 hexadecimal digits (this is where some of the characters' values come into play); this is one of the two options when using PSK (the other is entering your passphrase either as is or some other way as ASCII characters, I believe). The backslash character, as the double- and single-quote, is PRINTABLE ASCII, so the program might interpret that as such (this might be the error; whereas C will interpret it, the backslash, as a special indicator, the program that reads the key reads the backslash as character 0x5c, printable, therefore part of your key and not a non-printable). I hope this helps; sorry if it does not.

Last edited by DutchDaemon; April 27th, 2012 at 02:00.
Reply With Quote
  #3  
Old June 13th, 2012, 18:42
CalvinZA CalvinZA is offline
Junior Member
 
Join Date: Mar 2012
Location: South Africa
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
Default

I am not sure, I found this GUI to help with the configuration of wpa_supplicant.conf:
http://opal.com/freebsd/ports/net-mgmt/wifimgr/
Hope that helps.

Last edited by DutchDaemon; June 13th, 2012 at 22:26.
Reply With Quote
Reply

Tags
escape, escape characters, psk, wpa_supplicant, wpa_supplicant.conf

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] bash & spamdb: how to escape double quotes? cbrace Userland Programming & Scripting 1 December 5th, 2010 01:15
HowTo: (escape from) rxvt, unicode, 256color, termcap, terminfo and screen (hell) jrk Howtos & FAQs 1 August 5th, 2010 21:36
username more than 16 characters ? emka81 General 4 May 31st, 2010 07:03
sh - interactive keyboard input - escape/function keys MG Userland Programming & Scripting 1 April 30th, 2010 09:54
escape to loader prompt, ...to boot 2nd disk sidney6 Installing & Upgrading 3 July 29th, 2009 21:08


All times are GMT +1. The time now is 01:53.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0