Wifi Access Point
Set up Jetson as Wifi Access Point
In this section you will learn to set up an access point with the create_ap tool. It will set the IP to 192.168.12.1 by default. If you want to set up the access point with a script that does all the steps in this instructions, you can download it here Download create access point script.. If your wifi interface is something other than wlan0 you will have to modify the script. Run it like this
chmod +x setup_hotspot.sh
sudo ./setup_hotspot.sh
1. Install Dependencies:
- Open a terminal and run:
sudo apt update
sudo apt install git dnsmasq hostapd iptables procps
2. Clone and Install create_ap from Git:
- Clone the repository:
git clone https://github.com/oblique/create_ap.git
cd create_ap - Install the script:
sudo make install
3. Verify Installation:
- Check the location of the
create_apexecutable:which create_ap- Note the path; it should be
/usr/bin/create_ap.
- Note the path; it should be
4. Create a Systemd Service File:
- Create a new service file:
sudo nano /etc/systemd/system/create_ap.service - Paste the following content into the file, replacing the placeholders with your actual values:
[Unit]
Description=create_ap service
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/create_ap wlan0 wlan0 JetsonStorm knightec
Restart=on-failure
[Install]
WantedBy=multi-user.target
- Info:
- The first
wlan0is the interface you want to set up the access point on. - The second
wlan0is the network interface with internet access. If you use a wired connection for internet, this should most likely beeth0. JetsonStormis the SSID (hotspot name).knightecis the Wi-Fi password.
- The first
- Save the file (Ctrl+X, Y, Enter).
The sensors will use these credentials when they connect, so if you use some other SSID and password chances are they won't work with your platform.
5. Reload Systemd:
- Inform systemd of the new service file:
sudo systemctl daemon-reload
6. Enable the Service:
- Enable the service to start on boot:
sudo systemctl enable create_ap.service
7. Start the Service:
- Start the service immediately:
sudo systemctl start create_ap.service
8. Check the Service Status:
- Verify that the service is running:
sudo systemctl status create_ap.service
Troubleshooting
You can run create_ap --help to see how it's supposed to be used. Basic usage is
create_ap [options] <wifi-interface> [<interface-with-internet>] [<access-point-name> [<passphrase>]]
You can monitor the service in real time and try to figure out what's wrong.
- View the service logs in real-time:
sudo journalctl -u create_ap.service -f
Other methods
There are other methods to set up an access point, for example with hostapd and Network Manager. Whatever method you chose to use, please use JetsonStorm as SSID and knightec as password, since that is what most sensors will use to try to connect to your platform.