The most recent version of this page is a draft.DiffThis version is outdated by a newer approved version.DiffThis version (2022/02/22 00:48) is a draft.
Approvals: 0/1

This is an old revision of the document!


Under construction.

Wi-Fi

Although Batocera functions perfectly fine offline, connecting it to the internet opens it up to so much more cool stuff. An ethernet cable provides the best connection quality (especially for netplay), but Wi-Fi is available as an alternative.

Batocera should support most built-in and PCI-e Wi-Fi modules for ordinary PCs, however newer models are less likely to work out of the box. Click here for a list of known compatible USB Wi-Fi dongles.

Ethernet connects and configures itself automatically, but this is not so the case for Wi-Fi. Some manual action is required.

First, activate Wi-Fi in the first place by going to the MAIN MENUNETWORK SETTINGSENABLE WIFI (turning Wi-Fi off can be useful for battery-powered handheld devices).

Wait a moment for the Wi-Fi chip to actually turn on and start scanning (some devices may require a full reboot). Then all the available Wi-Fi access points will appear in the list.

From emulationstation menu, you can configure only 1 wifi. From batocera.conf, you can configure up to 3 wifi.

In case the access point does not appear in the list (or you just have your SSID hidden in your router's settings), an SSID can be defined manually.

The SSID is case-sensitive. Special characters should be escaped with a backslash (\). For example, if the password is special?characters@*, the entered in password should be special\?characters\@\*.

Upon connecting successfully, the Wi-Fi icon will appear in the top-right of the screen (certain themes may reposition this).

Screenshot of this very basic feature?

WIP

Access Batocera via SSH or local terminal to run these. You can use an ethernet cable for an SSH connection, or if no networking is available period then run the local terminal on the Batocera machine itself.

batocera-wifi start                      Turn on all available Wi-Fi modules.
batocera-wifi scanlist                   List all available Wi-Fi in range.
batocera-wifi list                       List all saved Wi-Fi configurations.
batocera-wifi enable <SSID> <passkey>    Connect to the specified Wi-Fi and save it.
batocera-wifi disable                    Turn off all Wi-Fi modules.

After activating Wi-Fi, it may take a moment to actually activate. In fact, it might not even activate until the system is rebooted. The power of Linux! Reboot and try again. It might even be worth waiting around ten seconds or so on the main menu before going into the Wi-Fi menu.

The best advice for this is… don't use Wi-Fi. Use an Ethernet cable, especially if you want to do something ping-sensitive like Netplay or game streaming. In the modern high-tech world we live in there is so much wireless noise in the air that getting a consistent, lag-free Wi-Fi signal is a pipe-dream. Only if you're seated right next to the router less than a few feet away, and even then…

But if your situation absolutely requires the use of Wi-Fi, here are some tips:

  • Turn off as many other Wi-Fi enabled devices as you can, including your phone, your smart thermostat, your fridge, etc.
  • Turn off any large mechanical devices that throw out lots of interference like combustion engines, generators, UPS's, microwaves, etc.
  • Try to have a direct line-of-sight to your router. If that is not possible due to a wall being in the way, try to have the least amount of objects between the device and the router.
    • Usually, the best place for the router is very high above the ground, as there are less things on the ceiling than the floor.
    • This especially applies to any metallic or perfectly-flat objects as they can reflect the signal, causing even more interference.
  • Optimize your router's settings. This can include doing things like enabling Quality of Service (QoS), Smart Queue Management (SQM), etc.
    • Typically only modern high-end routers support these features, as they require a bit more CPU power than just normal networking does. If your router supports installing OpenWRT onto it, it likely also supports this setting.
  • If your device has other wireless interfaces such as Bluetooth or internal Wi-Fi (and you're using a USB dongle), turn them off.
    • This is especially so if you only have 2.4 GHz Wi-Fi, as that operates near the same frequency as Bluetooth.

You can disable the Raspberry Pi 4's onboard Wi-Fi by adding dtoverlay=disable-wifi to /boot/config.txt.

Most network devices should already be supported by the Linux kernel included in Batocera. However, in some rare cases (such as bleeding-edge hardware) the drivers might not be included yet. If the manufacturer has provided pre-compiled binary driver files, it is possible to install them.

If your network/Wi-Fi device complains about requiring certain binary firmware files (check with dmesg via terminal), you can put them into /lib/firmware/rtlwifi/ and run batocera-save-overlay after confirming it works.

An example of a Wi-Fi device complaining about binary firmware files in dmesg:

[ X.XXXXXXX } Wi-Fi: xxx0: RTL: firmware file rtlwifi/XXXXXXXXXX.bin not found

If you've done this and it worked successfully, let the devs know so they can add it to the next version of Batocera.

  • wifi_ssid.1645487288.txt.gz
  • Last modified: 2 years ago
  • by atari