Originally Posted by miru
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?