How to Set Up the WiFi Database Project

Nov 2, 2023 | Programming

This guide will take you through the steps needed to successfully set up and run the WiFi Database project created by Anton Kokarev to collect data from Router Scan log reports, search for access points, and display their geolocation on a world map. With clear instructions and troubleshooting tips, you’ll have your database up and running in no time!

Prerequisites

Before diving into the installation process, ensure that you have the following configurations and PHP extensions set up:

  • Disable the display of errors, warnings, and notices in php.ini
  • Make sure your web server is configured to apply .htaccess policies per directory
  • Install the following PHP extensions: bcmath, curl, mysqli, and simplexml

Installation Steps

Follow these steps to install the WiFi Database project:

  1. Copy all required files to your www directory.
  2. Create the database by executing 3wifi.sql to create the necessary tables.
  3. Rename config.php-distr to config.php.
  4. Edit config.php to configure your database settings (DB_SERV, DB_NAME, DB_USER, DB_PASS, etc.).
  5. (Optional) Turn on memory tables by setting TRY_USE_MEMORY_TABLES to true in config.php.
  6. (Optional) If you have an old format database, use import.free.php once to import it.
  7. Start all background daemons by executing the following commands:
    • sh
    • To load data into the database: php -f 3wifid.php uploads
    • To prepare tasks for finalization: php -f 3wifid.php finalize
    • To locate new BSSIDs on the map: php -f 3wifid.php geolocate
    • To cache statistics (use only when stats caching is enabled): php -f 3wifid.php stats
    • To manage memory tables (only with memory tables enabled): php -f 3wifid.php memory

Database Maintenance

If you need to recheck for not found BSSIDs in the database, you can run the following command:

  • To recheck: php -f 3wifid.php recheck

Ensure that the php-cli interpreter is accessible from your directory before executing the daemons.

Understanding the Code: An Analogy

Imagine you’re a postmaster in a small town where you manage the delivery of parcels. The Router Scan log reports are like parcels arriving at your office, representing various access points. Your goal is to organize them efficiently.

In this case:

  • The database acts as your storage room, where you stack all sorted parcels (data) safely for future retrieval.
  • The commands you execute are akin to the delivery vehicles that help move these parcels to the right locations (database operations) swiftly.
  • As you geolocate each BSSID, it’s as if you’re placing a pin on a map to show where each parcel should be delivered in the town, ensuring no delivery gets missed!

Troubleshooting

If you encounter any issues throughout the installation or operation of the WiFi Database project, consider the following troubleshooting tips:

  • Check your web server configurations to ensure that they are applying .htaccess policies correctly.
  • Verify that all required PHP extensions are installed and enabled.
  • Make sure that your database credentials in config.php are correct and your database is properly created.
  • If background daemons do not seem to run, ensure that you have access to the php-cli interpreter from your working directory.
  • For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Conclusion

Setting up the WiFi Database project can seem challenging, but by following the outlined steps carefully, you’ll streamline the process and overcome potential setbacks. At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox