I’ve recently purchased a Jetson Nano board and set up the SD card & HDMI without a problem. I’ve also purchased an Edimax EW-7811Un (Realtek RTL8188CUS chipset) and the device connects to wifi correctly too (in fact I’m currently writing this question on the Jetson Nano).
However, I run into some problems when trying to set up wifi AP connection on the board. Similar to my previous projects with Raspberry Pi, I’m trying to set it up such that it (1) connects to the current Wifi network (2) establishes an AP hotspot such that e.g. PC and phones can connect and ssh into it with a static ip address, and optionally (3) share the network through the AP (similar to a wireless repeater) to the devices connected. Such a setup allows one to use a PC/phone to control the board conveniently without needing an external monitor or keyboard/mouse.
I’ve tried the library create_ap made by the user OBLiQUE at https://github.com/oblique/create_ap. However, when I tried setting up
sudo create_ap wlan0 wlan0 Nano
the terminal shows the error
ERROR: Your adapter can not be a station (i.e. be connected) and an AP at the same time
which probably means that the adapter doesn’t support working as an AP and a WiFi client at the same time. Therefore, I’ve bought another identical Edimax adapter, and used the command
sudo create_ap wlan1 wlan0 Nano
the terminal seems to attempt at creating a network, but returns the following message
WARN: Your adapter does not fully support AP virtual interface, enabling --no-virt WARN: If AP doesn't work, please read: howto/realtek.md Config dir: /tmp/create_ap.wlan1.conf.TuzyWi4G PID: 11749 Network Manager found, set wlan1 as unmanaged device... DONE Sharing Internet using method: nat iptables: No chain/target/match by that name. Doing cleanup.. done
and the hotspot does not show up. I’ve also tried to use the idle adapter (wlan1) to simply create an AP without network connection with
sudo create_ap -n wlan1 Nano
, but it shows the same error of “iptables: No chain/target/match by that name.”
I’ve installed the library dependencies including hostapd, iproute2, iw, dnsmasq, iptables, but still create_ap does not work properly. (On the other hand, I tried to use the system GUI to create a hotspot in the system settings, and the adapter is indeed able to work in AP mode - but in this case the system GUI doesn’t provide any option for sharing network from one adapter to the other, neither does it set a static ip address for the Nano to be sshed into).
May I ask if anyone has tried create_ap on a Jetson system before (or is familiar with the library and might know what causes the “iptables” error)?
Alternatively, I’ve also tried to do it the manual way, and followed some previous tutorials I used for Raspberry Pi such as https://learn.sparkfun.com/tutorials/setting-up-a-raspberry-pi-3-as-an-access-point/all, (i.e. setting /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf to connect to wifi, using /etc/dhcp.conf, /etc/dnsmasq.conf, /etc/hostapd/hostapd.conf to set up DHCP for the AP hotspot, and using NAT with iptables to redirect traffic from wlan0 to wlan1), but it seems that the files layout is very different on the Linux for Tegra system, and for instance modifying /etc/network/interfaces causes the system to not be able to recognize the adapter correctly. (It seems the system is using a “Network Manager” package to manage wifi).
May I ask if it’s possible to manually setup wifi, hostapd, iptables to share internet over a hotspot on Jetson? (For people with experiences with Raspberry Pi too) what would be the differences between setting it up on Raspbian versus Linux for Tegra? Also, if possible, may I ask if there might be any tutorials on Wifi setup for Jetson systems online?
Thank you very much for the help!