HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Aug 30, 2012, 03:44 PM
Registered User
Vista, CA
Joined Feb 2008
1,182 Posts
Quote:
Originally Posted by happul3 View Post
I am confused: How could program.elf still do anything useful if drone does not accept wifi connections? I confirmed that manually killing program.elf does not prevent normal wifi communication. Therefore, not having wifi connectivity seems to indicate that that the whole linux system has crashed, not just the program.elf.

I did few experiments with telnet. Evidently, killing program.elf then restarting it by hand with "/bin/program.elf > log &" provides a lots of information - I just do not know how to interpret it. Interestingly, when I kill/start program.elf then turn radio on the drone can be controlled by radio normally; it takes off and land just fine. The log file created by dumping stdout of program.elf is quite large and contains lots of diagnostic information - some bits and pieces included below.
Surprisingly, some of that info changes in subsequent runs of program.elf even though drone remains powered. For example, on first try I got

340.477972 Master 6 1072 BLC call for motor 2
341.470168 Master 6 1072 BLC motor 2 flash & start FAILED
341.530048 Master 6 1072 BLC call for motor 3
341.642320 Master 6 1072 BLC motor 3 soft version 1.16, hard version 3.0, su
pplier 1.1, lot number 06/10, FVT1 01/06/10
341.700051 Master 6 1072 BLC call for motor 4
341.812324 Master 6 1072 BLC motor 4 soft version 1.16, hard version 3.0, su
pplier 1.1, lot number 06/10, FVT1 01/06/10
341.840043 Master 6 1072 BLC motor 2 dead
341.840371 Master 6 1072 BLC reflash required, perform off/on cycle

And on three subsequent tries, motor 2 passed fine, same as other motors.
It is alarming to see that there is an intermittent failure on motor 2, but that can't be the reason I am having problems described in my previous messages.

Other alarming thing in that log (and it is reproducible run-to-run) is that there are hundreds of repeating messages like following. Is it just temporary, until program.elf initializes? Or does it indicate some problem with specifically my drone? Could some kind soul please check what their program.elf say when started?


1017.831237 Master 6 1080 ********* Previous runs gave emergency ******
***
1017.831290 Master 6 1080 Pic software version not ok !!!
1017.831317 Master 6 1080 mykonos_state = 0x80000000
1017.831363 Master 6 1080 vbat = 0
1017.831388 Master 6 1080 ctrl_state = 0x00000001
1017.831415 Master 6 1080 -----------------------------------
1017.831438 Master 6 1080 Motors have not been initialized correctly !!!
1017.831461 Master 6 1080 mykonos_state = 0xc7801000
1017.831483 Master 6 1080 vbat = 0
1017.831506 Master 6 1080 ctrl_state = 0x00000001
1017.831529 Master 6 1080 -----------------------------------
1017.831551 Master 6 1080 Emergency signal sent by user !!!
1017.831574 Master 6 1080 mykonos_state = 0xcf810054
1017.831596 Master 6 1080 vbat = 11107
1017.831618 Master 6 1080 ctrl_state = 0x00000000
1017.832159 Master 6 1080 -----------------------------------
1017.832201 Master 6 1080 Angles out of range !!!
1017.832228 Master 6 1080 mykonos_state = 0x8f888014
1017.832250 Master 6 1080 vbat = 10561
1017.832274 Master 6 1080 ctrl_state = 0x00000000
1017.832299 Master 6 1080 -----------------------------------
1017.832321 Master 6 1080 Angles out of range !!!
1017.832344 Master 6 1080 mykonos_state = 0x8f880014
1017.832366 Master 6 1080 vbat = 11817
1017.832389 Master 6 1080 ctrl_state = 0x00000000
1017.832413 Master 6 1080 -----------------------------------
1017.832435 Master 6 1080 Angles out of range !!!
1017.832457 Master 6 1080 mykonos_state = 0xcf880810
1017.832479 Master 6 1080 vbat = 12509
1017.832501 Master 6 1080 ctrl_state = 0x00000000
1017.832525 Master 6 1080 -----------------------------------
1017.832546 Master 6 1080 Angles out of range !!!
1017.832568 Master 6 1080 mykonos_state = 0x8f880414
1017.832590 Master 6 1080 vbat = 12291
1017.832613 Master 6 1080 ctrl_state = 0x00000000
1017.832636 Master 6 1080 -----------------------------------
1017.832657 Master 6 1080 Emergency signal sent by user !!!
1017.832679 Master 6 1080 mykonos_state = 0x8fcb0414
1017.832701 Master 6 1080 vbat = 12266
1017.832724 Master 6 1080 ctrl_state = 0x00000000
1017.832747 Master 6 1080 -----------------------------------
Don't worry about the motor firmware, it gets lost from time to time. 'program.elf' checks the firmware on every startup and reloads it if it does not match with the firmware that is has in the /firmware directory (think the file is BLC.hex).
As to the other log messages, I see those all the time and have not figured out yet what and why they are there, looks like a sequencing problem in the startup of the threads to me.
miru is offline Find More Posts by miru
Reply With Quote
Sign up now
to remove ads between posts
Old Aug 30, 2012, 05:07 PM
Registered User
Joined Aug 2012
115 Posts
Quote:
Originally Posted by miru View Post
Don't worry about the motor firmware, it gets lost from time to time. 'program.elf' checks the firmware on every startup and reloads it if it does not match with the firmware that is has in the /firmware directory (think the file is BLC.hex).
As to the other log messages, I see those all the time and have not figured out yet what and why they are there, looks like a sequencing problem in the startup of the threads to me.
I see. Thank you, that was reassuring. Do you know if there is a way to make program.elf to always dump stdout/stderr into file? I am thinking of editing whichever script starts program.elf after reboot.
happul3 is offline Find More Posts by happul3
Reply With Quote
Old Aug 30, 2012, 06:23 PM
Registered User
Vista, CA
Joined Feb 2008
1,182 Posts
Quote:
Originally Posted by happul3 View Post
I see. Thank you, that was reassuring. Do you know if there is a way to make program.elf to always dump stdout/stderr into file? I am thinking of editing whichever script starts program.elf after reboot.
Not all messages go through stdout/stderr, the startup script is in /bin/check_update.sh . I think they make the kernel (syslog) print directly to ttyPA0.
miru is offline Find More Posts by miru
Reply With Quote
Old Aug 31, 2012, 02:54 AM
Registered User
Joined May 2011
3 Posts
Logic Level Converter replacement

Hi,

Does anybody know where can I buy the sparkfun logic level converter in Germany? Or is any other part that I could use as a replacement?

Thank you in advance.
snowOwl is offline Find More Posts by snowOwl
Reply With Quote
Old Aug 31, 2012, 03:28 AM
Registered User
Joined Dec 2006
7 Posts
Quote:
Originally Posted by snowOwl View Post
Hi,

Does anybody know where can I buy the sparkfun logic level converter in Germany? Or is any other part that I could use as a replacement?

Thank you in advance.
Hi,

check this page
themelle is offline Find More Posts by themelle
Reply With Quote
Old Aug 31, 2012, 03:54 AM
MiruMod supporter
pawelsky's Avatar
Polska
Joined Jan 2012
1,293 Posts
Quote:
Originally Posted by themelle View Post
Hi,

check this page
or this one http://lipoly.de/index.php?main_page...ducts_id=11385
pawelsky is online now Find More Posts by pawelsky
Reply With Quote
Old Aug 31, 2012, 12:38 PM
Registered User
Joined Aug 2012
115 Posts
Quote:
Originally Posted by miru View Post
Not all messages go through stdout/stderr, the startup script is in /bin/check_update.sh . I think they make the kernel (syslog) print directly to ttyPA0.
Update for whoever might find this useful or amusing. I edited check_update.sh to make it dump its output into log file. Testing it few times without mod showed reproducible behavior, with logs not showing anything suspicious. After that I plug-in arduino, turn radio on, and connect drone battery to observe the usual failure ending in slow blinking and drone being not responsive to wifi. Unplug the battery, turn radio off, plug the battery back, drone goes through normal startup. Now I am able to telnet to it and get the log file documenting both start-ups - failed and successful. Unfortunately the two logs are essentially identical ending up with usual 18.040578 Master 6 98 .....
I then turn radio on and see iarduino and drone initializing correctly, which is reflected in log as well.

Conclusion: whatever happens during failed startup of companion program causes a massive crash that is not limited to program.elf and companion program. Looks like the whole system crashes. Because this behavior does not prevent me from using drone and miru's mod, I am going to stop further investigation for now.

On a related subject, I am going to keep the script that dumps the log file. During one of the test runs, I noticed that drone suddenly turned motor leds red and did not reset after pulling throttle stick right (it is in land mode). It is however still accessible by telnet and, having handy log file, I discover the source of the unresettable emergency:

25.099422 FlashMgr 6 985 Mykonos configuration saved.
25.100822 FlashMgr 6 985 Mykonos configuration saved.
136.740092 Acquisition 6 983 pic_read_select timeout
136.740143 Acquisition 6 983 !!! ADC timeout !!!
138.170324 Navdata 6 980 Navdata Watchdog (delta = 1429480 us)
139.620347 Navdata 6 980 Navdata Watchdog (delta = 1449573 us)

Anyone knows which part of the drone might be referred by pic_read_select and ADC? Nav board perhaps, I think there is pic there?
happul3 is offline Find More Posts by happul3
Reply With Quote
Old Aug 31, 2012, 12:53 PM
Registered User
Vista, CA
Joined Feb 2008
1,182 Posts
Quote:
Originally Posted by happul3 View Post
Update for whoever might find this useful or amusing. I edited check_update.sh to make it dump its output into log file. Testing it few times without mod showed reproducible behavior, with logs not showing anything suspicious. After that I plug-in arduino, turn radio on, and connect drone battery to observe the usual failure ending in slow blinking and drone being not responsive to wifi. Unplug the battery, turn radio off, plug the battery back, drone goes through normal startup. Now I am able to telnet to it and get the log file documenting both start-ups - failed and successful. Unfortunately the two logs are essentially identical ending up with usual 18.040578 Master 6 98 .....
I then turn radio on and see iarduino and drone initializing correctly, which is reflected in log as well.

Conclusion: whatever happens during failed startup of companion program causes a massive crash that is not limited to program.elf and companion program. Looks like the whole system crashes. Because this behavior does not prevent me from using drone and miru's mod, I am going to stop further investigation for now.

On a related subject, I am going to keep the script that dumps the log file. During one of the test runs, I noticed that drone suddenly turned motor leds red and did not reset after pulling throttle stick right (it is in land mode). It is however still accessible by telnet and, having handy log file, I discover the source of the unresettable emergency:

25.099422 FlashMgr 6 985 Mykonos configuration saved.
25.100822 FlashMgr 6 985 Mykonos configuration saved.
136.740092 Acquisition 6 983 pic_read_select timeout
136.740143 Acquisition 6 983 !!! ADC timeout !!!
138.170324 Navdata 6 980 Navdata Watchdog (delta = 1429480 us)
139.620347 Navdata 6 980 Navdata Watchdog (delta = 1449573 us)

Anyone knows which part of the drone might be referred by pic_read_select and ADC? Nav board perhaps, I think there is pic there?
The Navboard is run by a pic. The pic sends a sensor data package every 5 ms (200HZ), the arrival of the data is the clock for the drone firmware loop. The Navboard data comes in over one of the serial ports (/dev/ttyPA2) at 460800 baud. Maybe there is a problem with the serial connection in your mod setup that makes it misbehave?
miru is offline Find More Posts by miru
Reply With Quote
Old Aug 31, 2012, 01:08 PM
Registered User
Joined Aug 2012
115 Posts
Quote:
Originally Posted by miru View Post
The Navboard is run by a pic. The pic sends a sensor data package every 5 ms (200HZ), the arrival of the data is the clock for the drone firmware loop. The Navboard data comes in over one of the serial ports (/dev/ttyPA2) at 460800 baud. Maybe there is a problem with the serial connection in your mod setup that makes it misbehave?
What can I do to check that possibility? Naively, it seems like physical connection between navboard and main board should not be affected be the mod, should it? I assume that the mod uses different i/o lines. Or do you mean that my mod setup somehow disrupts timing of the serial connection to navboard?
happul3 is offline Find More Posts by happul3
Reply With Quote
Old Aug 31, 2012, 01:26 PM
Registered User
Vista, CA
Joined Feb 2008
1,182 Posts
Quote:
Originally Posted by happul3 View Post
What can I do to check that possibility? Naively, it seems like physical connection between navboard and main board should not be affected be the mod, should it? I assume that the mod uses different i/o lines. Or do you mean that my mod setup somehow disrupts timing of the serial connection to navboard?
I am not talking about the Navboard connection. Most likely all ttyPAx are handled by the same driver and the same interrupt line, which means there can be interaction. ttyPA0 is the one the mod is talking to, ttyPA1 is the motor serial link and ttyPA2 is the Navboard. Since your setup does start when you make the mod go later there must be something going on when it comes in early. BTW what rev of the drone firmware and mod are you running?
miru is offline Find More Posts by miru
Reply With Quote
Old Aug 31, 2012, 01:45 PM
Registered User
Joined Aug 2012
115 Posts
Quote:
Originally Posted by miru View Post
I am not talking about the Navboard connection. Most likely all ttyPAx are handled by the same driver and the same interrupt line, which means there can be interaction. ttyPA0 is the one the mod is talking to, ttyPA1 is the motor serial link and ttyPA2 is the Navboard. Since your setup does start when you make the mod go later there must be something going on when it comes in early. BTW what rev of the drone firmware and mod are you running?
Thank you for explaining - it sounds plausible but what do I do about it?

I've sent a request to macdrones to provide information on revision number. Judging from the ability to switch camera views by right stick, it is at least 0.13.
happul3 is offline Find More Posts by happul3
Reply With Quote
Old Aug 31, 2012, 03:55 PM
XR-4Drone.com
Joined May 2011
323 Posts
Has anyone used a different GPS module or are the ones listed pretty much the only ones we can use?

Thanks,

Dante1
dante1 is offline Find More Posts by dante1
Reply With Quote
Old Aug 31, 2012, 04:33 PM
Registered User
Vista, CA
Joined Feb 2008
1,182 Posts
Quote:
Originally Posted by dante1 View Post
Has anyone used a different GPS module or are the ones listed pretty much the only ones we can use?

Thanks,

Dante1
Any GPS that reports NMEA sentences, understands PMTK commands (251, 314 and 220) and can do a 5Hz update rate should work.
miru is offline Find More Posts by miru
Reply With Quote
Old Sep 01, 2012, 12:10 PM
XR-4Drone.com
Joined May 2011
323 Posts
Quote:
Originally Posted by miru View Post
Any GPS that reports NMEA sentences, understands PMTK commands (251, 314 and 220) and can do a 5Hz update rate should work.
I am going with the LS20031. Do I have to put a resistor between the GPS and the arduino?

Thanks,

Dante1
dante1 is offline Find More Posts by dante1
Reply With Quote
Old Sep 01, 2012, 01:35 PM
Registered User
Vista, CA
Joined Feb 2008
1,182 Posts
Quote:
Originally Posted by dante1 View Post
I am going with the LS20031. Do I have to put a resistor between the GPS and the arduino?

Thanks,

Dante1
Yes
miru is offline Find More Posts by miru
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Mini-HowTo RC Controlled AR.Drone w/o WiFi! nosaari Multirotor Talk 116 Mar 14, 2014 02:23 PM
For Sale Parrot AR Drone w/TX/RX mod *Flies Nice* Z06 Tony Aircraft - Electric - Helis (FS/W) 4 Apr 16, 2011 09:42 PM
Discussion Wifi Boosted AR.Drone Fallengod Multirotor Talk 7 Feb 12, 2011 10:52 AM
Discussion And yet another AR drone Arial Video project taudronis Multirotor Talk 17 Dec 07, 2010 11:04 AM
Sold Parrot AR.Drone Four rotor platform control with your iPodTouch/iPhone/iPad Hoverup Aircraft - Electric - Helis (FS/W) 0 Oct 12, 2010 03:54 PM