This document is incomplete and evolving daily. Suggestions are encouraged.
The ESP32 cannot do wifi and Bluetooth at the same time because there is only one radio. Both take use a lot of code space, so we have 2 versions of the pre-compiled firmware (wifi & bt). Install the one you plan to use. You can still choose the noradio and wifibt options if you compile yourself. See this page for more details.
All of the radio options are set with
$ commands and not via the config file. This was done to help make sure you have a stable radio setup while developing and fine tuning your config file. The list of settings available depends on whether you are using WiFi or Bluetooth. You will not see the Bluetooth options while using the WiFi firmware.
Below are all the settings.
STA refers to "Station" which would be your local wifi. Send
$STA to see all the current values.
[MSG:INFO: Start mDNS with hostname:http://fluidnc.local/]. If false you gain some memory, but must use the IP address for the browder URL. This can help if you are low on memory.
AP refers to "Access Point". This is a WiFi access point on the ESP32. Send
$AP to see all the current values.
$HTTP/BlockDuringMotion [since v3.6.8] Prevents serving files from LocalFS when the machine is running
$WiFi/Mode (AP, Off, STA or STA>AP) This is the mode the wifi will use. STA>AP means it will attempt to use STA, then fall back to AP mode
There are no commands to tell you the current password. This offers a little bit of security. Someone with direct access to the ESP32 can dump the flash memory and find the password. For better security you should use a network firewall.
Note: Your console does not know you are sending a password, so it will be displayed as you type it.
In this mode FluidNC becomes its own wifi access point. The startup messages show that it has created an access point with SSID "FluidNC". You can connect to this with your computer, tablet or phone. The default password is "12345678". The IP address is 192.168.0.1.
AP mode is not recommended for production, only for initial setup. It will affect the performance of your machine, possibly causing crashes after some time. Change to STA or STA>AP mode after FluidNC is set up. If you do not have an external WiFi access point to connect to in STA mode, you can set up a private network using a WiFi router that need not be connected to any outside networks. The router can be an old slow one - perhaps one that has been removed from service - because the ESP32 WiFi speed is limited to about 30 mBits/sec, which is more than enough for WebUI.
[MSG:INFO: AP SSID FluidNC IP 192.168.0.1 mask 255.255.255.0 channel 1] [MSG:INFO: AP started] [MSG:INFO: WiFi on] [MSG:INFO: Captive Portal Started] [MSG:INFO: HTTP started on port 80] [MSG:INFO: Telnet started on port 23]
In this mode your router will assign an address. You will be able to see it in the startup messages. In the case below it is
192.168.1.19. You would use this as the address in your web browser.
[MSG:INFO: STA SSID Barts-WLAN DHCP] [MSG:INFO: Connecting.] [MSG:INFO: Connecting..] [MSG:INFO: Connecting...] [MSG:INFO: Connected - IP is 192.168.1.19] [MSG:INFO: WiFi on] [MSG:INFO: Start mDNS with hostname:http://fluidnc.local/] [MSG:INFO: SSDP Started] [MSG:INFO: HTTP Started] [MSG:INFO: Telnet Started on port 23]
The WebUI is the web browser based user interface.
This is an example of failing to connect in STA mode and switching to AP mode.
[MSG:INFO: STA SSID Barts-WLAN DHCP] [MSG:INFO: Connecting.] [MSG:INFO: Connecting..] [MSG:INFO: Connecting...] [MSG:INFO: Connecting....] [MSG:INFO: Connecting.] [MSG:INFO: Connecting..] [MSG:INFO: Connecting...] [MSG:INFO: Connecting....] [MSG:INFO: Connecting.] [MSG:INFO: Connecting..] [MSG:INFO: AP SSID FluidNC IP 10.0.0.1 mask 255.255.255.0 channel 1] [MSG:INFO: AP started] [MSG:INFO: WiFi on] [MSG:INFO: Captive Portal Started] [MSG:INFO: HTTP Started] [MSG:INFO: Telnet Started on port 23]
Using AP mode for production is not recommended, use it only for the initial setup. The AP core code from Espressif seems to have problems that we have been unable to isolate, and that might be too deep in the SDK for us to fix. As a workaround, consider a dedicated external AP. It does not need to be a modern high performance one, an old one from the junk box will probably be just fine.
Users routinely use WiFi connected tablets running WebUI. Both the tablet and the FluidNC controller can connect to an external network which can be a collection of routers from a couple of generations back. Even better performance would be expected from a dedicated AP.
USB is always available as a fallback - and FluidNC will also fallback to AP mode if if fails to connect to an external AP in STA mode.
You cannot use WebUI via a USB connection. Instead you must use some other sender like UGS on a connected computer. There are also senders that run on computers connected either via Bluetooth, or serial (with some amount of extra effort to get a USB serial port into the tablet hardware/software setup).
If you are having WiFi connection problems, perhaps Bluetooth would be more reliable in your specific environment, it is unknowable. You will just have to try it.
Spindles or other high power motors can generate a lot of electrical noise that can cause interference with WiFi and Bluetooth radios. One way to determine if they are part of the problem is to run "air cut" test jobs with the spindle turned off, to see if the disconnects stop.
If the spindle turns out to be part of the problem, search the web for advice on how to filter and shield its power connections.
Check the signal strength of the target WiFi with
$Wifi/ListAPs. It is in JSON format because it is primarily used by the WebUI and senders.
SSIDs and password often use special characters. See this FAQ note on character limitations.
If you have
$Telnet/Enable=True, you can communicate via telnet with the same protocol as serial. The default port is 23 and set by $Telnet/Port. If enabled, you should see it in your startup messages.
[MSG:INFO: Telnet Started on port 23]
if you connect via a websocket (on $http/port +1, e.g. 81), you have a streaming connection to FluidNC that behaves just like serial. You send newline-delimited lines just like you would over serial, and get back the same ok or error responses. Flow control is the same as for serial, as documented on the plain old Grbl wiki.
curl -F firstname.lastname@example.org http://192.168.1.31/upload
This will upload file
test.nc to the SD card at address 192.168.1.31
curl -F email@example.com http://192.168.1.31/files
This will upload file
test.nc to the ESP32 localfs (flash) at address 192.168.1.31