prickle / Mavpixel

Mavpixel firmware repository
32 stars 12 forks source link

No Connection after flashing #3

Closed Pix4hawk closed 5 years ago

Pix4hawk commented 6 years ago

Flashing the Pro-Mini with FTDI works only after manualy downloading the .hex file. It say "flashing sucessfull...."

Connect to the GUI allways fail (no Hardwarechange after flashing => USB-FTDI-ProMini same port) Try to change USB-Port and speed, Portscann show everytime the same Port (7)? Pro-Mini is flashing quick, no LED's connected.

mp_1

nikolauskrismer commented 6 years ago

I do have a very similar problem with MavPixel/MavPixelGUI.

After flashing mavpixel onto a arduino proMini using a fedora 28 system (i failed doing the same using windows 10 and MavpixelGUI), I do see the 1Hz flashing of the led when it is connected to a pixhawk on the telem2 port. I even double checked all the Serial and SRx Parameters in mission planner and they look like they should.

I am able to connect to the Mavpixel using either a cp2102 ftdi converter or using mission planner and UDP. However, I am not able to change anything, since the connection seems to be lost immediatly. I also get the "Serial Port: Der Versionszeichenfolgeteil war entweder zu kurz oder zu lang." error message as can be seen in the screenshot by @Pix4hawk.

Is there anything I can assist with? Are there some verbose logfiles written by mavpixelGUI?

prickle commented 6 years ago

Hi. That error appears to be from deep within the OpenNETCF Serial Library API. I think my implementation of SerialPort used in MavpixelGUI v1.0 does not agree with Windows 10 perhaps. I cannot test this right now.

I have however made a new release. MavpixelGUI version 1.1 is now based on NET 4.5 and adapted to use the native serial port support with hopefully better compatibility.

This new version also has some important fixes for the firmware flasher to support Github's upgraded security.

Please try the new version 1.1 of MavpixelGUI and give me your impressions and experiences, good or bad. The current version will find the new version on startup and give you a download link with any luck. Alternatively, a direct link is here.

nikolauskrismer commented 6 years ago

I just tested the new version (which was successfully found by the GUI itself... however, I did manually download the file and performed a manual uninstall/install).

MavpixelGUI still behaves the same way when using MissionPlanner... I get the exact same message. When connected directly to a COM-Port then the MavPixel now crashes without an error message (shortly after Configuration: Fetching... is written in the status bar).

Flashing the firmware also still does not work. I now get the message that libusb0.dll was not found (as a windows error message). After that the terminal lists "Executable does not appear to be AVRdude." I also tried to set the avrdude from the arduino IDE directly with the same result.

Is there a log file written somewhere? Maybe that would help to debug the problem on my windows 10 64bit system...

prickle commented 6 years ago

Hi. Sorry, no log file is generated by MavpixelGUI. If you install Visual Studio Community 2017 (free) and compile MavpixelGUI from source you can debug and trace through the code line by line.

If you copy libusb0.dll from the Arduino install directory into the MavpixelGUI install directory does this let you use the firmware flasher?

What kind of crash are you experiencing when trying to connect over the COM port? Remember I cannot see what is happening. Do you get a timeout message in the status bar? Endless wait cursor but otherwise responsive? Does the program just hang?

nikolauskrismer commented 6 years ago

I can do some more testing next week. Right now I am in preparations for my final test at university...

The crash itself is a hard one. After showing "Configuration: Fetching... is written" in the status bar the program immediately closes (without a "program not responding" message from windows or similar).

prickle commented 6 years ago

Another user also appears to be having a similar issue, see #4

This is not good. MavpixelGUI is compliled with debugging symbols included. If one's copy of Windows has a registered debugger installed like mine has, I think that usually opens up on the error. I did not know it was being completely silent otherwise, that is a surprise!

Error Dialog

Something like this is what I expected the program should produce on an exception. I'm not sure why it isn't.

I have limited resources, your testing could be very helpful. Good luck with your final test!

mebj commented 5 years ago

I have a similar problem but I can flash Mavpixel from the GUI installed on a Win10 PC. Everything installs fine and the Pro Mini seems to run OK. But when I try to load a configuration directly using FTDI, or via SoftSerial on pins 8 and 9 or via the FC (a PixRacer) the upload always fails with a timeout message. Sometimes also a SerialErrorEventArgs message is shown.

I have tried a few Pro Mini all with same result so it seems there is a serial communication error on the Arduino side. I have also uploaded Mavpixel using the Android software and result is same.

Anyone having an idea about how to fix this?

prickle commented 5 years ago

Sure. Thanks for the report, I should have a new release to try by this weekend some time. Cheers!

mebj commented 5 years ago

Thanks for a quick answer. After many hours of trying to find the error I stumbled on it and the problem was with the Arduino. When I recompiled the firmware and uploaded it with the Arduino IDE using the 3.3V 8MHz settings then all changed and I could upload the settings using the MavPixel GUI.

This Pro Mini is marked with 8, 16 and 20 MHz as well as 3.3V and 5V so heaven knows what the original settings were.

Now it remains to see if the communication with the Pixracer will work.

Thanks again!

prickle commented 5 years ago

Ok, good to hear! Let me know how you go, good luck! Cheers!