App's main page to launch the server
The devices KiwixSpot server accessed from another device showing a KhanAcademy ZIM file resource
Compressed KhanAcadmey website available through the server
Overly-crowded classrooms are the only educational resource for children of low-income families in Egypt.
Page that shows list of ZIM filed - to be completed
Settings page - to be completed
As a developing country, Egypt has suffered from a poor educational system. It placed the last in terms of the quality of education, according to the World Economic Forum Global Competitiveness Report for 2013-2014. The major issue with the Egyptian education system is that it depends heavily on memorization and discards any form of critical thinking, research, or personal development. Also, in a research done on the challenges facing the Egyptian educational system, it was found that more than a third of general secondary students report being absent from school in order to study outside of school. This indicates that students are not provided with enough educational resources or learning material at school. Indeed, the same study shows that private tutoring in the high school stage is more than 90% among the wealthiest students at a rate of 330 LE per month (which has actually dramatically increased since the time of the study, based on personal experiences). For context, it is estimated that 32%, around a third, of Egyptians live below the poverty line, which is defined as just 736 LE per month. Comparing that to the price of private tutoring lessons mentioned before, it is no doubt that low-income families suffer tremendously to provide their children with a good education.
Photo: Overly-crowded classrooms are the only educational resource for children of low-income families in Egypt.
In an attempt to improve the education system, the Egyptian government has started to introduce a set of changes in the past three years. Students entering that high school stage will each receive a tablet that will mainly be used to take midterms and final exams as a way to reduce cheating, since questions are randomized for each student. In addition, it will also facilitate access to educational resources, improve the interaction between students and teachers, and encourage activities inside classrooms. Despite the tablet being low-spec, it serves its purpose and is definitely a step in the right direction. However, the solution is not perfect, and there are some major challenges that arose from the introduction of the new changes. Students and parents have started addressing their concerns regarding this system.
- There are not many resources: the government only advertised for two websites that it will be launching to provide educational material and resources to students, one of which mostly recites the curriculum and printed textbooks already published by the government. While students can access other resources publicly available on the internet, there are some restrictions imposed by the government's software installed on the tablets as to which websites to block.
- Unreliable internet connection: the internet infrastructure in Egypt is built on millennia-old telephone lines and is known for being notoriously unstable with frequent outages and disconnections. Since the introduction of the system, there have actually been multiple incidents since the introduction of the tablet system where students were unable to take their final exams or even redo them because of the unpredicted internet disconnections.
- High cost of bandwidth: while the government provided the tablet to students for free, it is the students' responsibility to get access to the internet outside the classroom (this does not apply to exam periods, of course). Actually, the majority of schools have not still been equipped with WiFi or an internet access network. The cost of internet subscriptions is relatively high. With the internet being very unstable, a lot of people are left with the only option of using mobile data plans, which is even more expensive.
And this is where KiwixSpot comes!
What it does
KiwixSpot is an Android application that provides access to and share of educational resources publicly-available on the internet without needing a continuous internet connection. Using KiwixSpot, students will be able to surf Wikipedia pages, KhanAcademy educational videos, TED talks, StackExchange forums, and more on their tablets without the internet. In addition, teachers and students can easily set up a hotspot sharing network where educational resources on one device can be accessed by other students in the same classroom or in a group through a regular internet browser. KiwixSpot directly addresses the issues raised by the new tablet system, where:
- A plethora of educational resources in different formats, including text, images, and videos, are made available to students through KiwixSpot
- Internet connection reliability is less of a concern as KiwixSpot does not require an internet connection for students to access its resources
- Students can share educational material with each other through hotspot networks, thus significantly decreasing the use of bandwidth to access resources
How we built it
KiwixSpot uses the libraries and tools provided by the open-source project Kiwix which has the same mission of facilitating access to internet resources. Kiwix works by scanning, downloading, and compressing internet pages and resources (videos, images) into what is called a ZIM file, an archive format that allows compressing resources using LZMA2 file compression. ZIM files can be created to include various resources. For example, a ZIM file with Wikipedia pages discussing topics related to trigonometry, or a ZIM file for KhanAcademy Physics videos. Kiwix website provides a list of already-compressed ZIM files for various resources, some of which are used in this project.
KiwixSpot creates a local web server socket on the host device (the tablet) with a fixed IP address and a socket, uncompresses ZIM files, and serves them as web pages through its local server for offline use. The user can then use the hotspot functionality of their device to establish a WiFi access point where other devices can connect and access the server and the pages hosted on it (including the user themselves from their own host device).
The first stage of the project was to compile Kiwix tools from the source code (written in C++) in order to work on the ARM architecture used by Android mobile devices. This involved going through the code, understanding how the system works, and finding the right tools and files to include in compilation. The compilation was done using Android Native Development Kit (NDK) which allows native C/C++ code to be compiled for the ARM architecture.
Next was creating an Android app that runs the compiled executables to serve ZIM files. The app was built on Android Studio using Java. The interface in XML is still in development stage. It is intended to be intuitive and simple. The user can click on a button to start the server, and the IP and Port information are displayed so that other users can use them to connect.
Challenges we ran into
There were some challenges when deciding how ZIM files would be stored. ZIM files can get large, especially for videos. The tablets' storage space might not be enough to store that many ZIM files. It was decided that the best approach is to split the resources across multiple tablets and sharing ZIM files on the same hotspot network from more than one device at the same time. This is easier to have in the current implementation of KiwixSpot. Another idea was to have a central Raspberry Pi server at school that hosts all ZIM files where students can use it to copy files to their devices. Both ideas are discussed in "What's next for kiwixSpot"
There were multiple challenges faced when building KiwixSpot:
- Compiling the libraries using NDK was a process. There was a learning curve to it as we had never used it before.
- There were some issues with getting the app to open a server socket. Android places restrictions on apps that prevent access to the root shell for security reasons. It took time to sort app permissions. However, after a lot of research on the internet, we found out that using specifying higher port numbers, like a 5-digit number, solves the problem as these ports are open ports that are not reserved for restricted use.
- Android 10 places restrictions on how to use and store external libraries. The executables were initially placed in the assets folder and then copied to the app's local storage directory. However, Android 10 requires libraries and executables to be stored in a separate lib folder. Otherwise, they will not be allowed to run.
Accomplishments that we're proud of
We were able to build a working version on KiwixSpot that can run the server and host some ZIM files successfully!
What we learned
We learned a lot from the ton of research involved to come up with the idea. This includes discovering more about Egyptian society, the problems facing Egyptian students understanding the educational system with the new changes. It is great to see such changes actually take place in a developing country, despite the challenges associated with it.
When it comes to technical knowledge, we learned about Kiwix, a very cool project that we did not know about before. Also, by going through the C++ code for the libraries and tools, we gained an understanding of Object-Oriented Programming structures, code structure, and the coding practices followed by professionals.
We also learned about TCP sockets and servers, as well as how to use NDK to compile a C++ program for ARM architecture.
What's next for KiwixSpot
The next steps in the project involve:
- Improving the user interface for the Android app
- Adding the ability to open a hotspot network from within the app as opposed to manually doing it
- Adding the ability to send/receive ZIM files between devices through WiFi direct
- Making the project open-source on GitHub to that it can be used to help other students around the world!
Some potential ideas include:
- Creating a central Raspberry Pi FTP server that is set up at the school and that students can connect to in order to get new ZIM files and update their libraries. There are some challenges with that when it comes to costs. More work needs to be undertaken in this area.
- Making a separate KiwixSpot teacher app where teachers can specify what resources are relevant to a certain course and share them with students.