I have an AdaFruit ESP8266, which I wired and flashed using these instructions (wired to port 2 according to the Matek diagram):
I am using a Matek F405 TE, which is also flashed according to instructions. I can connect through USB, and I can connect to the ArduCopter WiFi access point successfully, but when I am in Mission Manager, and I disconnect USB, when I try to connect UDP like the instructions say, it says Connect failed.
I configured like so:
“If connected to Serial1/Telem1 these parameters should be set on the autopilot (if using another telemetry port, replace the “1” in the parameter name with the telemetry port’s number)”:
- [SERIAL2_PROTOCOL] = 2 (MAVLink2) or 1 (MAVLink1) - tried both, and ESP
- [SERIAL2_BAUD] = 921 (921600 baud)
I couldn’t set BRD_SER2_RTSCTS = 0 to disable flow control. I did try Disable FIFO though.
When I select UDP, if I click the Connect button/icon, it asks for local port 14550 (it doesn’t ask for the IP address or anything), the title of the popup is Listen Port. The details of the error says:
Only one usage of each socket address (protocol/network address/port) is normally permitted
at System.Net.Sockets.Socket.DoBind, blah, blah, blah
Also, under the baud rate display it shows UDP14550-1-GROUND, and it shows not connected. None of the parameters show up like it does when I connect using USB. It doesn’t show the “Connecting MavLink” or anything like it does with USB, either.
Any ideas I can try? Thanks
I don’t have your setup but I do have the PixRacer unit that comes with the ESP8266. I use and android tablet to connect to this unit. You have to connect to the ESP8266 unit with the tablet as an access point and receive a local IP address of the board. Since it’s UDP the IP address is not important nor is the baud rate.
There is a web server running on the ESP8266 unit and if your connections are correct you can bring up a web page using a browser just like it shows in the documentation.
The default port 14550 is correct in Mission Planner.
Yes, I can bring up the web page - the issue I think is that either the 8266 isn’t talking to the flight controller, or I don’t know how to configure it in the mission planner so that the flight controller knows where it is in some way. This morning I swapped TX and RX between the FC and the 8266, but it still didn’t connect to the mission planner. After I swapped RX/TX this morning, I have white (RX) from the 8266 going to TX on the flight controller and yellow (TX) from the 8266 going to RX on the flight controller.
I found the device I have is definitely a 4M variety. It is odd that the ardupilot instructions state: “[firmware-esp01_1m.bin] is for boards with 1MB of flash (most boards)”, then “on the Advanced page ensure the Flash size is set to 4MByte”. I re-flashed the board with “[firmware-esp12e.bin] is for boards with 4MB of flash”. Still no-go.
I found another 8266 in my box of goodies and flashed that as well. Still no go. I swapped TX/RX back again, still no go, both boards.
Now I wonder if I have a firewall issue blocking UDP, so I guess I should find another PC to try.
Yes, I had a problem with the latest firmware for the auto pilot and had to switch to the latest version of the 8266 firmware because it wanted to use Mavlink version 2 instead of version 1.
I have a blue LED that flickers when there is traffic.
If you use this web page you should see traffic to your board: http://192.168.4.1/getstatus
|Packets Received from GCS
|Packets Sent to GCS
|GCS Packets Lost
|Packets Received from Vehicle
|Packets Sent to Vehicle
|Vehicle Packets Lost
Do you recall where you got the latest 8266 firmware? Is it NodeMCU? Do you know what version you are running, per chance? I plan to try something from nodemcu-build.com.
Also, which pins are wired to the flight controller? I am just using the pins on the end, but perhaps the Matek needs to use the 3.3V side? Downloads | Adafruit HUZZAH ESP8266 breakout | Adafruit Learning System
I use the software from this site as I have a PixRacer.
dogmaphobic/mavesp8266: ESP8266 WiFi Access Point and MAVLink Bridge (github.com)
I am using version 1.2.2 as this works with the latest Ardupilot software.
Yeah, I tried that firmware, but it is still not functional. Tried a second computer in case it might be a firewall issue, swapped RX/TX, etc. I can connect to the WiFi network (which is also a bit spotty), but communication between the FC and Mission Planner is non-functional.
For anyone following this, I sent Matek an email, and they responded same day.
The main issue is RX2/TX2 is Serial 6, and Serial 2 uses RX3/TX3.
I also verified that RX of the 8266 is connected to RX of the FC, TX to TX.
Thanks for all who helped!
That’s also on the Arducopter Hardware Options Product page:
Matek F405-TE family