KA Lite server won't start on Raspberry PI 3 -- eth0 and wlan0 both go dead

I am trying to load a Raspberry PI 3 with Ka Lite, latest version as of 7/25/2016, then use it to serve a classroom of tablets.

I’m following KA Lite Versions 0.12 instructions exactly.

All is fine until i get to “4. Install the USB adapter software”. I do “sudo ./use_wipi.h”. Then I continue to “5. Complete the access point configuration”. After I do “sudo insserv hostapd”, both wlan0 and eth0 freeze up, and I’m dead in the water.

“kalite” does show up as a wireless network, but I cannot connect to it.

I tried continuing to following steps (edit ifplugd and /etc/network/interfaces, then reboot), but if I do, then after the reboot i’ve again got no eth0 or wlan0, so dead in the water.

Only way out it to reflash raspian and start over. That goes normally – up to the same point.

Any ideas what I am doing wrong? Sorry if this is a repeat question. I’m new to KA Lite.

Hello @jsterken,

I have installed several KA lite on Raspberry Pi 3 from CanaKit. I have a few questions to be able to help narrow down on the problem and help out.

  1. Did you use the same CanaKit or a different one? If CanaKit then there is just a few tweeks with /etc/network/interfaces to get it to work.
  2. Why did you choose v0.12 and not the latest 0.16.* as this seem to be the most stable and easier to install.

Hello Elvis,
Thanks for your response. I’ve been installing version 0.16.6 all along, but I’m embarrassed to say that late last night I realized I was using old 0.12 documentation. I am reinstalling from scratch now using the 0.16.6 installation instructions. Hopefully this will work better.

Note: it would be best if those instruction said to start with “sudo apt-get update”. I had to do that first, else “sudo apt-get install python…” failed with missing file errors.

Even with the new instructions though, it doesn’t seem to address the case of a PI-3 with built in WIFI – it instead talks about installing either WIPI or Edimax USB adapters. So, it is not clear what to do on the PI-3 for access point configuration.

Yes I am using the Canakit Raspberry Pi 3 complete starter kit.  I'm also using a separately powered Plugable 4-port USB hub. I am using an old VGA monitor, so my HDMI cable hooks to an Insignia HDMI->VGA converter.  I mention that just in case that converter might be causing a problem with power consumption.  There is no evidence of that I can see.

 Please sent tweaks to /etc/network/interfaces.

  Thanks for your help,
       Jim

Hello Jim,

That is true about the sudo apt-get update. This is mainly due to the fact that the OS has to be updated else you will have problems.

Excellent with the latest version.

When you want to setup Wifi just skip step 4 as Wifi is already configured. The changes that will have to take place are with files
/etc/network/interfaces - Remove “#” from the line "#allow_hotplug wlan0
and
/etc/dhcpcd.conf. - Add interface wlan0
static ip_address=1.1.1.1
For the second file it is because I realised that my default IP address to connect to the network was changed somehow.

Hope this helps

Hello Elvis,
OK. About “apt-get update”. Should I do “apt-get upgrade” too, just to be safe? I think I’ve got the latest Raspian, If I do “uname -a” I get: Linux raspberrypi 4.4.13-v7+ #894

I followed your instructions. With the /etc/dhcp.conf, does it matter where or when I make the change? I added the “static ip_address=1.1.1.1” statement in the middle, with other dhcp related statements.

Also with the /etc/network/interfaces change, when do i need to do that? I did it at the end, after doing all the steps.

I did the Raspberry Pi WIFI setup instructions from the Advanced Installation Options linked to by the installation instructions.There are 6 steps. I did them, skipping step 4 (Install the USB adaptor software) as you suggested.

Everything appeared to proceed normally with no error messages.

In the end though, no success. Same behavior as before.

After doing step 6, "sudo reboot", the PI-3 won't talk.  If I bring up the browser, it won't connect to anything.  The wireless network "kalite" does show up, but it will not connect.

 Hmmmm.  If I "ping www.google.com" it does appear to be connecting to something:

sudo ping www.google.com
PING www.google.com (1.1.1.1) 56(84) bytes of data
64 bytes from 1.1.1.1: icmp_seq=1 ttl=64 time=0.114 ms

 If I click on the wireless interfaces icon, top right side, I get: "No wireless interfaces found".  If I rightclick I get:

 - etho: configured 1.1.1.1/8
 - wlan0: Associated with kalite
 - wlan0: Configured 1.1.1.1/8

So, the PI-3 is still responsive in that I can bring up terminal windows and do things locally, but I cannot connect to the internet, and the kalite server does not appear to be running either.

I tried: "sudo service kalite start", but that did not help either.  During installation it said kalite would be started at bootup.

Any further ideas?

Thanks, Jim

Hi Jim,

sudo apt-get update is enough for the current system files.

One of the challenges is getting it to connect to the internet after everything is installed. It cannot do that over wifi and you have to do that with the ethernet. This also involves adding router IP to the file /etc/resolv.conf. what happens is the information in this file is reset regularly so you have to check constantly if you want to keep connected to the internet.

Have you tried kalite manage setup? To make sure installation was completed well.

Access kalite directly on the pi is done use the address given in etho and from other devices 1.1.1.1:7007 or 1.1.1.1:8008.

About your editing above, the file i mentioned is /etc/dhcpcd.conf it seems you edited anothe rfile as you stated above. Anywhere in the file is ok.

Hello Elvis,
Thanks again for your reply. Sorry about the delay responding.

Do you know if anyone has ever gotten KA Lite running successfully on a Canakit Raspberry PI 3. I’m getting the feeling I may be going first.

I need a stable eth0 connection, else I cannot download video content. It is not good if this gets reset regularly. How can I fix that?

Currently, /etc/resolv.conf says: (Is this what you would expect?)

Generated by resolvconf

nameserver 127.0.0.1

I have an Edimax N150 nano USB Adapter.  If I can't get eth0 working should I try to install it as wlan1 and connect to the internet that way?  With wlan0 being the KA Lite master server hotspot?  If so, how do i do that?

Yes, I tried "kalite manage setup".  Everything went normally.  It said everything was uptodate, and it started kalite normally.

About /etc/dhcpcd.conf: I mistyped above.  I did add the "static ip_address=1.1.1.1" statement to /etc/dhcpcd.conf as you directed.

Where I am now is that I can start kalite successfully on the Raspberry by bringing up the browser and entering http://127.0.0.1:8008/.  That brings up the expected KA Lite user interface.

Also, from the Raspberry browser, "1.1.1.1" also brings up KA Lite -- it turns it into http://1.1.1.1:8008/

However, I cannot load videos.  If I login to admin, then bring up KA Lite in a browser window, then go to Manage -> Videos, I get "Could not connect to the central server: videos cannot be downloaded at this time".

So, I need to get eth0 working.  Or the Edimax USB Adapter attached to wlan1.

Also, if I go to my ipad or PC and try to connect from there via 1.1.1.1:8008, that does not work either. "kalite" shows up as a WIFI network, but I cannot connect to it.  I just get a "spinner" icon next to the network name, but never a checkmark, or a prompt for a password.  So without a connection, I can never get to the point of even trying "1.1.1.1:8008"

 So, I'm closer, but still not there.  Any further ideas?

     Thanks, Jim

Hey Jim,
did you manage to work it out in RPI3?

I am smoothly running KALite on RPI3B. Though i had to mount it near my router as internet only works with LAN.

Normally KALite is accessible in localhost(127.0.0.1) through port 8008 …so to work it in a network you just need to configure a access point successfully.

Now i followed the instruction here. RPI3 as a wifi access point
Its working fine for me.

I have successfully installed and run KA lite on RPi3 here in Guanajuato, Mexico.

Yes that is what to expect. I have not been able to do that myself. My best approach is what i mentioned earlier with editing /etc/resolv.conf. Just for the set up and getting remaining videos but apart from that connections are very good with other devices have been working well.

This is because your etho is configured to the address 1.1.1.1. That is fine.

Loading videos

  1. Move your downloaded video files to /pi/.kalite/content (Download video files from here: http://pantry.learningequality.org/downloads/ka-lite/)
  2. Edit /etc/resolv.conf to your router address
  3. Run the command: kalite manage retrievecontentpack download en

That should get your videos in place for you to use on the raspberry pi.

Thanks for pointing me to that link: https://frillip.com/using-your-raspberry-pi-3-as-a-wifi-access-point-with-hostapd/

Before installing KA Lite I can access the internet successfully via both eth0 and wlan0, just with the standard RPI3 installation configuration. It all locks up when I install KA Lite and then try to set up the “kalite” access point. After that neither eth0 nor wlan0 work. And I cannot connect to the “kalite” access point from other devices.

I will give a try to the instructions from www.frillip.com, but I would much prefer to work with the KA Lite people directly with the hope that they can fix remaining glitches and update KA Lite so it works out-of-the-box without extra tuning needed.

Thanks, Jim

Elvis, thanks for your continuing help.

There must be some way to maintain a stable eth0 connection. Can this be referred to someone else on the KA Lite development team, for a permanent fix?

Regarding /etc/resolv.conf, what you said before was " This also involves adding router IP to the file /etc/resolv.conf. what happens is the information in this file is reset regularly so you have to check constantly if you want to keep connected to the internet. ". Also you said: " Edit /etc/resolv.conf to your router address ".

I’m sorry, but it is not clear to me how to do this. How do I find the router IP address, and how do I add it to /etc/resolv.conf? Do I put in another nameserver statement?

Once I know that I will try the Loading videos procedure you describe. With that, do I need to set up Bittorent to do that download from http://pantry.learningequality.org/downloads/ka-lite/ ?

What is your opinion about using the procedure described by rifatbd to set up an access point: https://frillip.com/using-your-raspberry-pi-3-as-a-wifi-access-point-with-hostapd/ ?

Also, what about the approach I suggested of using an extra USB WIFI adapter, and getting permanent internet access that way if eth0 is going to be flakey?

Thanks, Jim

Hello Jim,

To find the router IP address:
Mac - Open termina and type in arp -a it should give you a list of IPs with one defined as router.
Windows - Open cmd prompt and type ipconfig, locate the line Default Gateway. That is the router IP.

Just add the new IP address as a new name server For example for me I add nameserver 192.168.1.254 and that will do the trick with downloading videos (Remember it is a temporal issue so you would have to check after some time to make sure it is still there).

@aronasorman @benjamin - Can you help with the suggestion above please (maintaining a permanent connection to internet via eth0 or using a USB wifi adapter.

Yes set up bittorrent and download the videos.

Hello Elvis,
Thanks again for your suggestions, but I’m sorry to say that things are still not working.

I used ipconfig as you suggested on my PC to get the router IP which is 192.168.1.1. Then I added “nameserver 192.168.1.1” to /etc/resolv.conf. And, I rebooted for good measure, and i double checked to make sure the router IP had not changed.

After that, I still have the problem that the RPI3 is not talking to the outside world because eth0 and wlan0 are not working. Adding “nameserver 192.168.1.1” didn’t fix that.

So with your Loading Videos instructions, how to I move the downloaded files to “/pi/.kalite/content” on the RPI3? The RPI3 cannot connect to the internet. The “kalite manage retrievecontentpack” command fails because it cannot make a connection.

I suppose that I could download the video files to a USB drive on my PC, then mount the USB Drive on the RPI3 and copy the files in place on the RPI3. Is that what you are suggesting?

Even then though I would still have the problem that the kalite WIFI access point is not working on the RPI3. My whole goal is to load up the Kalite content on an RPI3, then WIFI-connect to a classroom full of 30 students with Android tablets. This doesn’t work though because while “kalite” does show up as a WIFI access point, it never connects.

I could try the alternate approach rifatbd suggested for setting up a WIFI access point, above, using the instructions on www.frillig.com , but I'm starting to think I'd be better off waiting for the next release of Kalite to come out to see if some of these problems are fixed.

Maybe I'm being unrealistic, but my hope here was that Kalite would work, out of the box, as described in the Kalite documentation, with no special tuning required.

hey @jsterken,
Just curious did you managed to get it working…

No. I posted more questions to Elvis last week but have not heard back.

1 Like

Can you do skype call. Sent you a couple of messageseconds in your inbox.

Sorry, my email reply yesterday didn’t go through. Yes, I can Skype today 1pm to 3pm EST. Or Monday 9am to 3pm EST. Jim

I am online now so we can chat if you are available now. My skype ID elvistgh.

Hi there!

Great support, @elvistek! Thanks for jumping in!

I’m trying to think of something to explain the unstable eth0 connection… but I haven’t actually used the scripts we have for configuring an RPi hotspot. However, those scripts were written a long time ago, back when RPi didn’t have wifi onboard. I can only recommend to ditch it entirely – there are probably many good guides online on how to configure your RPi as a hotspot.

My recommendation would be:

  1. Get the hotspot working. Nevermind KA Lite… just install a fresh RPi and configure it.
  2. Install KA Lite

KA Lite will listen on all IPs, so you will be able to access it both on the internal and external interface of your hotspot.

Best,
Ben