Author |
Message |
Lego Geek
Novice
Joined: Sun Jun 13, 2010 9:26 am Posts: 58
|
 NXT2WIFI using WEP connection
Hello: I am trying to use Xander's sample code for the NXT2WIFI (benedettelli-nxt2wifi-test3.c) and made the following changes from: to: I still cannot connect to my wireless acess point. Are there other changes I need to make? Mike
|
Wed Oct 31, 2012 11:37 pm |
|
 |
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1523
|
 Re: NXT2WIFI using WEP connection
I am not sure if that's the culprit but the string type can only hold up to 19 characters and your passphrase is longer than 19 characters. Xander, You should really get rid of the string type and use char array instead. 
|
Thu Nov 01, 2012 5:05 am |
|
 |
Lego Geek
Novice
Joined: Sun Jun 13, 2010 9:26 am Posts: 58
|
 Re: NXT2WIFI using WEP connection
Xander did not supply the line: string code = "value";
That was my lack of understanding. How should the string value be entered?
Are there other changes I need to make?
Mike,
|
Thu Nov 01, 2012 9:26 am |
|
 |
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1523
|
 Re: NXT2WIFI using WEP connection
No, I am referring to the implementation of Xander's driver on N2WSecurityWPA2Passphrase where it takes one argument of type "string". Your call to that function is fine but my understanding is that the string type only supports up to 19 characters. So I am suspecting your password got truncated. I don't have RobotC in front of me. You can probably do an experiment to find out. Run the code below and make sure myString is not truncated. Caveat: since I don't have RobotC in front of me, the following code is written from memory. I think the strlen function takes the "string" type not just "char *". I also think writeDebugStream will take string type. Feel free to modify the code appropriately.
|
Thu Nov 01, 2012 5:11 pm |
|
 |
Lego Geek
Novice
Joined: Sun Jun 13, 2010 9:26 am Posts: 58
|
 Re: NXT2WIFI using WEP connection
My programming skills are very limited. I understand that the 19 character limitation. How do I pass the 26 character passcode if it will only recognize the first 19 characters?
Mike
|
Thu Nov 01, 2012 9:54 pm |
|
 |
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1523
|
 Re: NXT2WIFI using WEP connection
That's why Xander needs to change his code to accept a char pointer instead of a string. That will remove the limit of 19 characters on string. BTW, I just tried the test code I recommended you to try. It indeed confirms that it truncated your string to only 19 characters. Therefore, you should try to change your WiFi router's password to 19 character or less and you shall be successful connecting to it.
|
Fri Nov 02, 2012 1:32 am |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: NXT2WIFI using WEP connection
Hey there,
There is still a lot of work I need to do to make the NXT2WIFI driver more flexible, now that we have pointers and other nice things. Rest assured that I am working hard on it!
- Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Fri Nov 02, 2012 4:27 pm |
|
 |
Lego Geek
Novice
Joined: Sun Jun 13, 2010 9:26 am Posts: 58
|
 Re: NXT2WIFI using WEP connection
Okay.... So I now have a wireless router that supports WPA2 format. The laptop says the the wireless connection is: SSID: pickles security type: WPA2-personal encryption type: AES network security key: littlebob I then made the required changes to the benedettelli-nxt2wifi-test3.c code sample: The NXT shows: Stat: connecting 0.0.0.0 ----------- RX/TX 0/0 The debug stream shows: hallo daar The NXT will not connect to the wireless. What am I missing? Mike
|
Wed Nov 07, 2012 11:03 pm |
|
|