qgroundcontrol icon indicating copy to clipboard operation
qgroundcontrol copied to clipboard

Setting Windows for use with WiFi ESP8266 connection

Open Seeelefant opened this issue 7 years ago • 42 comments

The following template is for Issue/Bug reporting only. https://docs.qgroundcontrol.com/en/Support/Support.html#github-issues I am waiting forever for the Wifi connection: image from a Windows 10 box.

The hardware is working, as shown here: image

With an Android tablet I a,m able to connect.

Please advice --Seeelefant

For questions about how to use or build QGC see: http://qgroundcontrol.com/#resources

If you are using an old stable release please upgrade first and verify your issue before reporting.

Expected Behavior

Please tell us what should happen as detailed as possible.

Current Behavior

Please describe what happens instead of the expected behavior.

Steps to Reproduce:

Please provide an unambiguous set of steps to reproduce the current behavior

System Information

When posting bug reports, include the following information

  • Operating System: Windows 10
  • QGC Version: 3.4.4
  • QGC build: stable]
  • Flight Controller: Pixhawk 2
  • Autopilot (with version): [e.g., PX4 1.8.12 ]

Detailed Description

Provide further details about your issue/bug.

Log Files and Screenshots

  • QGC Console Logs
  • Autopilot logs when available (post a link).
  • Screenshots of QGC to help identify the current issue/bug behavior.

Seeelefant avatar Jan 24 '19 23:01 Seeelefant

Hello @Seeelefant , I had bumped into the same question as you do with QgroundControl v 3.4.4 on Windows 10. I just uninstall the QgroundControl v3.4.4 and reinstall it again turn off the firewall then it works well include rtsp video streaming.

polarbeargo avatar Feb 01 '19 07:02 polarbeargo

Hi Polarbeargo, thank you, now it is working. It was a problem with the windows firewall, I enabled QGroundcontrol within the Windows Defender Firewall. Best --Seeelefant

Seeelefant avatar Feb 10 '19 22:02 Seeelefant

I'm having the same (I think...) issue. Can someone please explain how this has to be setup to work? I see no wifi setup anywhere in QGroundControl. I can connect via usb to my pixracer. With the wifi module plugged into the pixracer and usb disconnected (pixracer powered by battery), I expected QGroundControl to find the wifi and connect. I'm using windows 7 and in network and sharing center, I see the "pixracer" network. I can connect to it on the PC by entering the default password. So far so good but QGroundControl still does not connnect. Not sure what Seeelefant means by "enabling QGroundControl "within" windows defender. I opened windows defender and I see no way to "enable" QGroundControl, whatever that means. What am I not understanding?

rminer57 avatar Feb 26 '19 22:02 rminer57

Hi at least for Windows 10 the settings look like this: image

Seeelefant avatar Feb 26 '19 23:02 Seeelefant

Thanks for replying. My German from college is a little "rusty" but I get the idea. I will search to see how to do this for my version. Danke Schon!

rminer57 avatar Feb 27 '19 00:02 rminer57

@hamishwillee FYI: This is the first I'm hearing of some Windows Defender thing blocking QGC WiFi connections from working right out of the box. Maybe something for the docs?

DonLakeFlyer avatar Feb 27 '19 00:02 DonLakeFlyer

It didn't fix my problem, investigating.....

I get an endless "Waiting for vehicle connection" message on the summary screen. Actually after switching over to PX4 from INAV, I was really expecting a gui that was far more intuitive to use. The cleanflight and Inav GUIs are very easy to use but are focused on racing. QGroundControl is a lot harder to learn, setup and understand. Not sure why. Would have been nice to have had the ability to actually choose the connection (ie. wifi or usb) instead of the only choice being an automatic connection.

rminer57 avatar Feb 27 '19 00:02 rminer57

For what's worth, I was never able to get WiFi/UDP working on Windows. I can see the packets being sent but they never reach the application (QGC). I tried turning off the firewall (which is burried under an ungodly amount of settings pages) but nothing ever worked.

dogmaphobic avatar Feb 27 '19 00:02 dogmaphobic

Docs for this in https://github.com/mavlink/qgc-user-guide/pull/199 It is more generic than Windows Defender - I use Norton and I can see that the app has been granted access.

hamishwillee avatar Feb 27 '19 04:02 hamishwillee

Would have been nice to have had the ability to actually choose the connection (ie. wifi or usb) instead of the only choice being an automatic connection.

You can turn off any flavor of autoconnect from Settings/General page. You can set up manual links from Settings/Comm Links. The point is that if you are using a standard connection type there is no need to do anything it just works. Creating a manual link isn't going to make it work either if auto doesn't work. Manual links are almost never needed. Only if say you WiFi setup uses ports which differ from the standard or say the radio you are connecting to runs at a baud rate different from the default.

DonLakeFlyer avatar Feb 27 '19 17:02 DonLakeFlyer

I'm reopening to try WiFi on Windows to see if there is some additionals sequence of steps of futzing with the OS to get things to work. Then we can doc that if so. That said, this is the first I'm hearing of WiFi problems on Windows.

DonLakeFlyer avatar Feb 27 '19 17:02 DonLakeFlyer

It is more generic than Windows Defender - I use Norton and I can see that the app has been granted access.

Ah. So you have WiFi on windows working then right. I'll close this then.

DonLakeFlyer avatar Feb 27 '19 17:02 DonLakeFlyer

Ah. So you have WiFi on windows working then right. I'll close this then.

No I don't - I don't have a wifi telemetry module (just RC one). What I was saying is that I can see in Norton where the app is granted firewall access. I can't see it in windows defender because norton overrides those settings.

It sounds from what @dogmaphobic said that Wifi can be a problem on Windows outside the scope of this issue.

hamishwillee avatar Feb 27 '19 21:02 hamishwillee

Just a additional remark: I have a WiFi stick attached to my PC, with the new firewall settings QGroundcontrol gets contact to my drone without any problem. Before I made these changes I had connection problem on all windows PCs whereas Mission Planner from the Arducopters worked out of the box.

Seeelefant avatar Feb 27 '19 23:02 Seeelefant

Would have been nice to have had the ability to actually choose the connection (ie. wifi or usb) instead of the only choice being an automatic connection.

You can turn off any flavor of autoconnect from Settings/General page. You can set up manual links from Settings/Comm Links. The point is that if you are using a standard connection type there is no need to do anything it just works. Creating a manual link isn't going to make it work either if auto doesn't work. Manual links are almost never needed. Only if say you WiFi setup uses ports which differ from the standard or say the radio you are connecting to runs at a baud rate different from the default.

Don, I believe you but I spent an hour painstakingly looking thru parameter settings, trying to find something obvious and could not. I'm guessing that you're a developer on this very familiar with the c code inside and out, knowing what every parameter does. I don't have that experience and rely on the manual or what is intuitively presented in the settings. Another thing, its not possible to change anything without first having a vehicle connection based on what I'm seeing. So I cant even get access to the parameter settings without first connecting via usb. Thanks for your opinion and comment. I'm giving up on wifi. Not worth the effort of spending endless hours of guessing or trial + error.

rminer57 avatar Feb 28 '19 00:02 rminer57

@hamishwillee Might want to have a discussion with @minerran1 as to what could be made better in the docs to make this less confusing.

There are two types of settings:

  • QGC Application Settings - These only relate to how QGC works, not how the vehicle works. They are available from the Settings page.
  • Vehicle Settings - These relate to how the Vehicle works. They are actually stored on the vehicle (not in QGC) so you can't do anything with them unless you are connected to a vehicle. They are available from the Setup page.

The important point is that if you are using a standard WiFi thingy like an ESP8266 which has the standard mavlink firmware on it other than getting the connection setup in the OS there is nothing else you need to do. There is nothing else in QGC to look for or change. There is nothing that requires a connection that needs changing. It should just work. If it doesn't there is a hardware or OS problem somewhere as opposed to a ground station problem. Any debugging of that sort of thing needs to happen at the OS level.

DonLakeFlyer avatar Feb 28 '19 18:02 DonLakeFlyer

@DonLakeFlyer Sure.

  1. For this particular case we do currently say in the quickstart: Attach your vehicle to the ground station device via USB, through a telemetry radio, or over WiFi. QGroundControl should detect your vehicle and connect to it automatically.

Which I guess covers the main cases except "what will happen if you have wifi and USB connection"?

What could we have done differently? I think probably adding an explicit connection doc here: image At least then people would have an obvious place to look for connection information, and once finding that would be able to start looking for host computer issues rather than QGC issues. We could also add the troubleshooting note to the quick start too.

@minerran1 Do you think that would have helped/would help?

  1. Getting to grips with QGC

@minerran1 Did you just jump into QGC .... or "have you been guided by the docs". I am by no means advocating that the docs are great but if you haven't used them then talking about how they could be better is probably not going to help.

If you have been using them then would be great to gather your thoughts. Would slack or email or some other system suit you best?

hamishwillee avatar Mar 01 '19 01:03 hamishwillee

First let me answer your questions. I always try to use new applications without first reading documentation to see if I can figure it out. Sometimes its intuitive. If I run into issues, I then look for documentation which I found. I did find the instructions you posted above. I was not 100% sure what "ground station device" was but it has to be a computer or mobile phone with QGroundControl installed. I would have wrote it that way explicitly but thats just me. I favor verbose whereas most people these days favor the opposite. As far as commenting on how to "write it better/help", I cannot offer suggestions until I know why my wifi isn't working.

I would give the details of how the wifi connection must be setup at the "ground station device" end in order for QGroundControl to find it. wifi has security and protocol parameters as you know. If any one of these are wrong, we won't play. You can see mine below. Did I do it correctly? Beyond the SSID which was in documentation somewhere, I have no idea. e.g. Is my security type correct?

Now you said, "It should just work." Does "should just work" mean that after installing QGroundControl and opening it for the FIRST TIME WITHOUT ANY SETUP of QGroundControl or setup of any pixracer board parameters/settings, it will automatically connect to the "pixracer" network connection assuming the following preconditions?

  1. OS is connected to a Pixracer network connection with SSID of "pixracer"
  2. Pixracer board has latest PX4 firmware.
  3. Pixracer board hardware is good.

Is the above a correct understanding of the functionality? No wifi setup required would tell me that the connection SSID must be the default of the wifi board, never to be changed.

What about if a USB cable between computer and pixracer is installed in addition to the wifi board? Which will QGroundControl use, usb or wifi?

I tried an experiment. With wifi board AND usb connected to computer, (pixracer also powered by 3S battery, I launched QGroundControl. I setup everything previously using USB and its "happy" will all the settings, compass calibrations, etc. QGroundControl connected to the board automatically. I then disconnected usb hoping the application would switch to wifi. It did not and displays "waiting for vehicle connection". I have not done any wifi settings in QGroundControl because I did not find any.

If I'm the only person who ever had a problem with this then I'd say you guys should forget my issues and move on. But if that is not the case then perhaps we can make it better. Hope I've helped in some way.

pixracerconnectionwin7

image

rminer57 avatar Mar 01 '19 02:03 rminer57

Is the above a correct understanding of the functionality?

That is correct. As long as you include 4) An anti-virus program isn't blocking QGC from seeing things on the WiFi network. QGC doesn't care/know anything about SSIDs or even WiFi really. That is all handled when you connect the OS to the PixRacer WiFi connection. There are many, many people using QGC and PixRacers out there using PixRacers with the little WiFi thingy they come with. I think there maybe an RC Groups forum which is specific to the PixRacer. You might want to ask there about people using Windows and PixRacer WiFi to see if there is some other OS level magic which may be required.

If you have an Android or iOS Phone/Tablet you could install QGC and try that. That would remove Windows out of the equation which is always the most PITA OS to get things working on. If it works there, then you know there is some OS level setup problem. If it doesn't then that might point to bad hardware.

What about if a USB cable between computer and pixracer is installed in addition to the wifi board? Which will QGroundControl use, usb or wifi?

It will connect to both and switch from one to the other as one goes away. USB connections are given priority over all other connections.

I then disconnected usb hoping the application would switch to wifi. It did not and displays "waiting for vehicle connection".

I thought you didn't have WiFi working? It's not going to suddenly start working because you are also connected to USB.

DonLakeFlyer avatar Mar 01 '19 03:03 DonLakeFlyer

Some basic answers:

The default IP address of the PixRacer WiFi is 192.168.4.1 Once you connect your computer to it, load a browser and connect to http://192.168.4.1/getstatus See if you get a page back with the WiFi status. If you don't, something is wrong with the ESP module on your PixRacer. If you get a status, it should be all fine.

Does "should just work" mean that after installing QGroundControl and opening it for the FIRST TIME WITHOUT ANY SETUP of QGroundControl

Yes, it should automatically connect without any configuration. It's all pre configured.

Is the above a correct understanding of the functionality? No wifi setup required would tell me that the connection SSID must be the default of the wifi board, never to be changed.

Correct. The SSID can be whatever you want. By default, it's pixracer. The SSID is only used for you, using your OS' WiFi tool, to find it and associate with it. QGC does not even know the connection is WiFi.

What about if a USB cable between computer and pixracer is installed in addition to the wifi board? Which will QGroundControl use, usb or wifi?

They will both connect. QGC will see that both connections are from the same vehicle and assign a "priority link" to the faster link (USB in this case).

If I'm the only person who ever had a problem with this then I'd say you guys should forget my issues and move on.

No, you are not. I've had the same issues to the point where I simply gave up playing with Windows. The issue is the OS. Not PixRacer, not QGC. When you boot the PixRacer and you are connected to its WiFi, the PixRacer will start broadcasting UDP packets. That's how QGC finds it automatically. The issue I noticed was that Windows was blocking these UDP packets and QGC never got them. I'm sure there is a way to fiddle with Windows' firewall and/or some other Windows voodoo and make that work. I just didn't have the patience to continue.

dogmaphobic avatar Mar 01 '19 03:03 dogmaphobic