Brick won't boot

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

Brick won't boot

Postby Aswin » Mon Sep 09, 2013 6:41 am

Hi,

I created a SD card for Lejos but the brick won't boot from it. If I try to boot it, with my Edimax wifi dongle inserted, the boot sequence will not get past the "starting program" screen. If I boot the brick without the wifi dongle it will eventually display the Lejos splash screen. But this takes a long (as in 2-3 minutes) time. But nothing happens after that.

Does this bahaviour indicate invalid network settings? Or should I investigate other cause? I was using the alpha 0.1 release.

Aswin
My NXT blog: http://nxttime.wordpress.com/
Aswin
leJOS Team Member
 
Posts: 187
Joined: Tue Apr 26, 2011 9:18 pm
Location: Netherlands

Re: Brick won't boot

Postby gloomyandy » Mon Sep 09, 2013 6:48 am

Hi,
First off it does take a long time to boot. When you have the dongle plugged in do you see any activity on the dongle? If you do then things are probably working to some extent. Which Edimax dongle do you have? Do you have access to a serial port adapter for sensor port 1?

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3635
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Brick won't boot

Postby Aswin » Mon Sep 09, 2013 1:56 pm

Hi Andy,

I ordered the dongle for the occasion. It is the Edimax EW-7811UN micro WiFi dongle.
It does show some activity, a blue led blinks irregular. But it does not show up on my router. I suspect there could be something wrong in the network settings. But as I already checked the obvious I wanted to know if the behavior of the brick points in this direction.
Does alpha 0.1 boot without a dongle? Wat boot time to expect? Are there differences with alpha 0.2 in this respect?


Aswin
My NXT blog: http://nxttime.wordpress.com/
Aswin
leJOS Team Member
 
Posts: 187
Joined: Tue Apr 26, 2011 9:18 pm
Location: Netherlands

Re: Brick won't boot

Postby gloomyandy » Mon Sep 09, 2013 2:23 pm

I think both should boot without the dongle. Certainly 0.2 will as I've done that. On my EV3 it takes 1:34 until the red lights go out. The splash screen shows approx 10-20 seconds after that. It sounds like you do not have your router access config setup properly. What sort of security do you use? I assume you ran the wpa_passphrase thing to generate your PSK? You may also need to change other settings in the config file to match your router setup...

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3635
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Brick won't boot

Postby skoehler » Mon Sep 09, 2013 3:12 pm

Actually, in wpa_supplicant.conf, you should be able to write
psk="<your plain text password>"
or
psk=<hex digits>

Note the quotes. I think, it might not be possible to mix quotes with the hex digits or giving the password without quotes.
man wpa_supplicant.conf is not chatty about the exact syntax.
skoehler
leJOS Team Member
 
Posts: 1350
Joined: Thu Oct 30, 2008 4:54 pm

Re: Brick won't boot

Postby gloomyandy » Mon Sep 09, 2013 3:28 pm

Really I'm pretty sure that plain text did not work for me when setting this up...

Try both I guess!
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3635
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Brick won't boot

Postby Aswin » Wed Sep 11, 2013 9:34 am

Hi,

I Worked a bit more on my problem, so far without success. Here is what I did.
I found some docs about the Syntax. It is based on BSD but I assumed no differences.
Based on this I cleared wpa_supplicant from all non essential lines. The default for most parameters are less specific compared to the example. So I assumed that by removing them the settings would allow a wider range of configurations. Also the defaults seem fit for my router. All that remained within the network statement were ssid and psk. It didn't help.
Then I tried the plain key. This also did not help.
I checked and double checked for syntax errors. I also kept an eye on my router to see if any new devices showed up.

My plan is now to configure all parameters explicitly. If that does not work too I will create a serial connection. From the terminal I want to start the wireless connection, hoping to get some feedback from the system. What commend should I use to start a wireless connection?

Alternatively I could test the wpa_supplicant and my dongle from Ubuntu. This might be quicker.

Any thoughts?
My NXT blog: http://nxttime.wordpress.com/
Aswin
leJOS Team Member
 
Posts: 187
Joined: Tue Apr 26, 2011 9:18 pm
Location: Netherlands

Re: Brick won't boot

Postby skoehler » Wed Sep 11, 2013 9:54 am

Aswin wrote:Alternatively I could test the wpa_supplicant and my dongle from Ubuntu. This might be quicker.

I was about to suggest, that you test on Linux and then see what happens.
Also, you can run wpa_supplicant on the command line - either on the EV3 or on your Ubuntu. Nut sure whether the supplicant logs to stdout/stderr. My first idea would be to find the messages that wpa_supplicant generates. It should tell you something about what is going on. It could range from: wpa supplicant can't find your network, can't authenticate, etc.
skoehler
leJOS Team Member
 
Posts: 1350
Joined: Thu Oct 30, 2008 4:54 pm

Re: Brick won't boot

Postby gloomyandy » Wed Sep 11, 2013 1:41 pm

If you have been following the thread on USB connections, you could also try using that to establish a network connection and use that to debug the WiFi side of things...
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3635
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Brick won't boot

Postby Aswin » Thu Sep 12, 2013 10:35 pm

Hi,

An update.
I tried some other, very liberal, settings. These came from the man and were advertised as
Catch all example that allows more or less all configuration modes. The configuration options are used based on what security policy is used in the selected SSID. This is mostly for testing and is not recommended for normal use.

Also these settings did not work. (just to make sure. Yes I did modify this example to match ssid and passwords, psk being the coed not the literal.)
I noticed one thing though. Once I remove the dongle the boot process continues.

I also tried another dongle. Same type and model. No luck.

I also tried to test the configuration file within Ubuntu. But then my lack of knowledge of Linux was bothering me then, especially as it is running from within VirtualBox.reverse.

How is the wpa_supplicant executed during startup? Is there a way for me to modify this and have the output directed to the stdout or to a file on the SD card?
My NXT blog: http://nxttime.wordpress.com/
Aswin
leJOS Team Member
 
Posts: 187
Joined: Tue Apr 26, 2011 9:18 pm
Location: Netherlands

Re: Brick won't boot

Postby skoehler » Thu Sep 12, 2013 10:54 pm

Use -f <logfile> to log the output of wpa-supplicant. Use -d or even -dd to increase its verbosity. Consult the man page for further detail. Note, that you don't need to specify anything to make wpa_supplicant log to stdout (at least that's my interpretation of the man page). It seems, NetworkManager is actually writing wpa_supplicant output to syslog, not wpa_supplicant itself.

It would however be far easier to test on a linux box (even if it's virtual). First, you have to stop NetworkManager (as it may respawn wpa_supplicant after you kill it). Then make sure no wpa_supplicant is running. Then start wpa_supplicant -c <config file> -i <name of the network interface> on the command line. Optionally add -d or -dd.

You can also do it the other way round. You can take a look at the wpa_supplicant.conf that NetworkManager generated make your wifi work. Open a terminal window, become root (use the command sudo -i), use ps aux | grep wpa and you should see the command line options that wpa_supplicant was started with. If so, you will see the argument to the -c option. In my case, it is /etc/wpa_supplicant/wpa_supplicant.conf.

So what is your network setup like? What are the settings of your wifi router and what's the config file you're trying to use?
skoehler
leJOS Team Member
 
Posts: 1350
Joined: Thu Oct 30, 2008 4:54 pm

Re: Brick won't boot

Postby gloomyandy » Thu Sep 12, 2013 11:06 pm

wpa_supplicant is simply started from the startwlan script:
https://sourceforge.net/p/lejos/ev3/ci/ ... /startwlan
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3635
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Brick won't boot

Postby Aswin » Fri Sep 13, 2013 12:10 pm

Success!

It seemed that wpa-supplicant was stuck in a loop negotiating something. I then created wpa-supplicant.conf file from scratch and now it works. The only noticeable difference is in pairwise. Mine now pairwise=TKIP.

Thanks for the support.

Aswin
My NXT blog: http://nxttime.wordpress.com/
Aswin
leJOS Team Member
 
Posts: 187
Joined: Tue Apr 26, 2011 9:18 pm
Location: Netherlands

Re: Brick won't boot

Postby skoehler » Fri Sep 13, 2013 12:24 pm

That would mean, that you wireless router doesn't support AES (also called CCMP). You should switch to AES if you have the chance. Look for a router firmware update or whether you limited the wireless security to TKIP by accident in your router config. That wpa_supplicant wasn't able to establish a connection sounds like a supplicant bug - or a bug in your router firmware. Which model is it? wpa_supplicant should try AES first - but it should resort to TKIP if AES doesn't work.
skoehler
leJOS Team Member
 
Posts: 1350
Joined: Thu Oct 30, 2008 4:54 pm

Re: Brick won't boot

Postby gloomyandy » Fri Sep 13, 2013 1:36 pm

You know that rings a bell. I have a feeling I ran into some sort of issue with AES/TKIP and wpa_supplicant. It is worth noting that for some reason LEGO do not use the wpa_supplicant that is part of the default distribution. They use a different binary that is distributed as part of the of VM install. I'm not sure what is going on but when I first played around with this I couldn't get it to connect to my router at all (using the standard wpa_supplicant), when I switched to using the LEGO version it all worked ok.
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3635
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Next

Return to EV3 Software

Who is online

Users browsing this forum: No registered users and 0 guests

cron
more stuff