Kari Brown replied to the topic 'KStars hangs when stopping my indi driver in FIFO indi server.' in the forum. 2 months ago

Just tested with indi_eqmod_telescope driver and it does the same thing. No other drivers were running in this test. Here's the back trace that looks similar to the one above:

^C
Thread 1 "kstars" received signal SIGINT, Interrupt.
0x00007ffff2fd098d in pthread_join (threadid=140736481720064, thread_return=0x0) at pthread_join.c:90
90	pthread_join.c: No such file or directory.
(gdb) bt
#0  0x00007ffff2fd098d in pthread_join (threadid=140736481720064, thread_return=0x0) at pthread_join.c:90
#1  0x00007ffff24b7b97 in std::thread::join() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x000000010082bb2f in INDI::BaseClient::disconnectServer (this=0x103a78f70)
    at /home/kbrown/Documents/dev/git_repos/indi/libindi/libs/indibase/baseclient.cpp:274
#3  0x00000001002df974 in DriverManager::disconnectRemoteHost (this=0x103a8fba0, dv=0x103c6f5f0)
    at /home/kbrown/Documents/dev/git_repos/kstars/kstars/indi/drivermanager.cpp:759
#4  0x00000001003b662b in EkosManager::cleanDevices (this=0x10395cd80, stopDrivers=true)
    at /home/kbrown/Documents/dev/git_repos/kstars/kstars/ekos/ekosmanager.cpp:810
#5  0x00000001003b8e60 in EkosManager::removeDevice (this=0x10395cd80, devInterface=0x103fd9240)
    at /home/kbrown/Documents/dev/git_repos/kstars/kstars/ekos/ekosmanager.cpp:1247
#6  0x00000001002955a6 in EkosManager::qt_static_metacall (_o=0x10395cd80, _c=QMetaObject::InvokeMetaMethod, _id=15, _a=0x7fffffffd220)
    at /home/kbrown/Documents/dev/git_repos/kstars/build/kstars/moc_ekosmanager.cpp:316
#7  0x00007ffff3ee0d2a in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00000001002a3a96 in INDIListener::deviceRemoved (this=0x103b5bc10, _t1=0x103fd9240)
    at /home/kbrown/Documents/dev/git_repos/kstars/build/kstars/moc_indilistener.cpp:449
#9  0x0000000100304b46 in INDIListener::removeDevice (this=0x103b5bc10, dv=0x7fffbc002010)
    at /home/kbrown/Documents/dev/git_repos/kstars/kstars/indi/indilistener.cpp:209
#10 0x00000001002a2f7d in INDIListener::qt_static_metacall (_o=0x103b5bc10, _c=QMetaObject::InvokeMetaMethod, _id=21, _a=0x7fffc3ff22c0)
    at /home/kbrown/Documents/dev/git_repos/kstars/build/kstars/moc_indilistener.cpp:190
#11 0x00007ffff3ee1c01 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007ffff4c2005c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff4c25516 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff3eb238b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007ffff3eb4786 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007ffff3f083c3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007fffee451197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007fffee4513f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007fffee45149c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff3f087cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ffff3eafb4a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007ffff3eb7bec in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00000001000c46fb in main (argc=1, argv=0x7fffffffdbe8) at /home/kbrown/Documents/dev/git_repos/kstars/kstars/main.cpp:316

Not sure if I'm able to dig deeper but I will try...

Ta,
K

Read More...

Kari Brown replied to the topic 'KStars hangs when stopping my indi driver in FIFO indi server.' in the forum. 2 months ago

Thanks Jasem. I'll see if I can reproduce this with my other devices too. I have a feeling eqmod telescope might do it as well. Will confirm later.

Ta,
K

Read More...

Kari Brown replied to the topic 'KStars hangs when stopping my indi driver in FIFO indi server.' in the forum. 2 months ago

Dug a little deeper. I compiled and installed KStars from source in order to get more detailed debug info. It seemed odd to me that it wanted to disconnect from the server after removal of the driver so as a temporary workaround I just commented out a couple of lines in EkosManager::cleanDevices() and it seems to work better. Not sure what else this breaks but at least it does not hang any more. Here's the modified function:

void EkosManager::cleanDevices(bool stopDrivers)
{
    if (ekosStartingStatus == EKOS_STATUS_IDLE)
        return;

    INDIListener::Instance()->disconnect(this);
    DriverManager::Instance()->disconnect(this);

    if (managedDrivers.isEmpty() == false)
    {
        if (localMode)
        {
            if (stopDrivers)
                DriverManager::Instance()->stopDevices(managedDrivers);
        }
        else
        {
            // TEMPORARILY COMMENTED THESE TWO LINES OUT
            // if (stopDrivers)
            //     DriverManager::Instance()->disconnectRemoteHost(managedDrivers.first());

            if (remoteManagerStart && currentProfile->INDIWebManagerPort != -1)
            {
                INDI::WebManager::stopProfile(currentProfile);
                remoteManagerStart = false;
            }
        }
    }

    reset();

    profileGroup->setEnabled(true);

    appendLogText(i18n("INDI services stopped."));
}


Read More...

Kari Brown replied to the topic 'KStars hangs when stopping my indi driver in FIFO indi server.' in the forum. 2 months ago

In an attempt to get more information of what's going on I ran KStars in gdb and took a back trace after it got unresponsive. Here's what I did:

On my Raspberry Pi
- Start indiserver in FIFO mode
- Start the indi_gpsd, indi_eqmod_telescope, indi_atik_ccd and indi_primefocus drivers. The last one is my own.

On my ubuntu laptop:
- Start KStars in gdb
- Connect to the indiserver
- Connect to indi_primefocus
- Disconnect indi_primefocus

Everything up to here works as expected. Now if I stop the infi_primefocus driver in the server, it's UI controls are removed from ekos and kstars indi control panel but it will hang. KStars becomes unresponsive. At this point I hit ctrl+c in gdb and dumped out the back trace:

^C
Thread 1 "kstars" received signal SIGINT, Interrupt.
0x00007ffff2fd098d in pthread_join (threadid=140736607545088, thread_return=0x0)
    at pthread_join.c:90
90	pthread_join.c: No such file or directory.
(gdb) bt
#0  0x00007ffff2fd098d in pthread_join (threadid=140736607545088, thread_return=0x0)
    at pthread_join.c:90
#1  0x00007ffff2163b97 in std::thread::join() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x0000000100602d3f in INDI::BaseClient::disconnectServer() ()
#3  0x0000000100234648 in DriverManager::disconnectRemoteHost (this=0x1036dec30, 
    dv=dv@entry=0x103881cc0)
    at /build/kstars-bleeding-FmmvQZ/kstars-bleeding-17.04+201708262117~ubuntu16.04.1/kstars/indi/drivermanager.cpp:759
#4  0x00000001002d7a84 in EkosManager::cleanDevices (this=this@entry=0x1035c3840, 
    stopDrivers=stopDrivers@entry=true)
    at /build/kstars-bleeding-FmmvQZ/kstars-bleeding-17.04+201708262117~ubuntu16.04.1/kstars/ekos/ekosmanager.cpp:816
#5  0x00000001002d7ef5 in EkosManager::cleanDevices (stopDrivers=true, this=0x1035c3840)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qmap.h:1020
#6  EkosManager::removeDevice (this=0x1035c3840, devInterface=0x103474390)
    at /build/kstars-bleeding-FmmvQZ/kstars-bleeding-17.04+201708262117~ubuntu16.04.1/kstars/ekos/ekosmanager.cpp:1250
#7  0x000000010021253a in EkosManager::qt_static_metacall (_o=<optimised out>, _c=<optimised out>, 
    _id=<optimised out>, _a=<optimised out>)
    at /build/kstars-bleeding-FmmvQZ/kstars-bleeding-17.04+201708262117~ubuntu16.04.1/obj-x86_64-linux-gnu/kstars/moc_ekosmanager.cpp:316
#8  0x00007ffff3ee0d2a in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00000001001f4c22 in INDIListener::deviceRemoved (this=this@entry=0x1037cd780, 
    _t1=0x103474390)
    at /build/kstars-bleeding-FmmvQZ/kstars-bleeding-17.04+201708262117~ubuntu16.04.1/obj-x86_64-linux-gnu/kstars/moc_indilistener.cpp:449
#10 0x000000010025246f in INDIListener::removeDevice (this=0x1037cd780, dv=0x7fffb8001e70)
    at /build/kstars-bleeding-FmmvQZ/kstars-bleeding-17.04+201708262117~ubuntu16.04.1/kstars/indi/indilistener.cpp:209
#11 0x000000010021582c in INDIListener::qt_static_metacall (_o=<optimised out>,

I don't know what this could imply but if I kill this instance of KStars and start it up again, I am able to connect to the server and everything works as expected. Is there a way to get more debug information than this or do I need to compile KStars myself?

Ta,
K

Read More...

Kari Brown replied to the topic 'KStars hangs when stopping my indi driver in FIFO indi server.' in the forum. 2 months ago

I am not entirely sure but to me this seems more like a KStars / Ekos problem. The indi server keeps running and I can re-connect to it after I've killed and restarted KStars. Happy to help to debug this if you have any ideas where to start looking?

Cheers,
Kari

Read More...

Kari Brown created a new topic ' KStars hangs when stopping my indi driver in FIFO indi server.' in the forum. 2 months ago

So I've coded an indi driver for my arduino based DIY focuser. It works well except when I stop the driver in my server that is running in FIFO mode. This only happens if I've actually connected to the device at least once. The starting and stopping the driver without connecting to the device works as expected. The UI panels in KStars update just as they should. But when I have connected (and optionally disconnected) to the device, KStars will hang upon stopping the driver in the server. I've noticed this same behaviour with some other drivers too like indi_eqmod_telescope for example. Some other drivers don't experience this same problem like indi_atik_ccd for example. I'm wondering if there's some clean up stuff I need to code into my driver upon disconnect to get rid of this problem? It's not really a show stopper but would be nice to get it working smoothly. Any ideas?

Cheers,
Kari

Read More...

Kari Brown replied to the topic 'Latest indi-eqmod won't compile.' in the forum. 4 months ago

Ah of course. I did compile it first but didn't install before rushing to the 3rd party drivers. All good now, thank you!

Read More...

Kari Brown created a new topic ' Latest indi-eqmod won't compile.' in the forum. 4 months ago

I just did a git pull and the 3rdparty / indi-eqmod stopped compiling. Older versions compiled just fine. Something missing from the commit? Here's what I'm getting:

Scanning dependencies of target indi_eqmod_telescope
[  1%] Building C object indi-eqmod/CMakeFiles/indi_eqmod_telescope.dir/align/htm.o
[  2%] Building C object indi-eqmod/CMakeFiles/indi_eqmod_telescope.dir/align/chull/chull.o
[  3%] Building CXX object indi-eqmod/CMakeFiles/indi_eqmod_telescope.dir/eqmod.o
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp: In member function ‘double EQMod::GetRATrackRate()’:
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp:1643:16: error: ‘TRACKRATE_SIDEREAL’ was not declared in this scope
         rate = TRACKRATE_SIDEREAL;
                ^
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp:1647:16: error: ‘TRACKRATE_LUNAR’ was not declared in this scope
         rate = TRACKRATE_LUNAR;
                ^
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp:1651:16: error: ‘TRACKRATE_SOLAR’ was not declared in this scope
         rate = TRACKRATE_SOLAR;
                ^
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp: In member function ‘double EQMod::GetDefaultRATrackRate()’:
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp:1703:16: error: ‘TRACKRATE_SIDEREAL’ was not declared in this scope
         rate = TRACKRATE_SIDEREAL;
                ^
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp:1707:16: error: ‘TRACKRATE_LUNAR’ was not declared in this scope
         rate = TRACKRATE_LUNAR;
                ^
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp:1711:16: error: ‘TRACKRATE_SOLAR’ was not declared in this scope
         rate = TRACKRATE_SOLAR;
                ^
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp: In member function ‘virtual IPState EQMod::GuideNorth(float)’:
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp:2132:24: error: ‘TRACKRATE_SIDEREAL’ was not declared in this scope
     rateshift        = TRACKRATE_SIDEREAL * IUFindNumber(GuideRateNP, "GUIDE_RATE_NS")->value;
                        ^
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp: In member function ‘virtual IPState EQMod::GuideSouth(float)’:
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp:2166:24: error: ‘TRACKRATE_SIDEREAL’ was not declared in this scope
     rateshift        = TRACKRATE_SIDEREAL * IUFindNumber(GuideRateNP, "GUIDE_RATE_NS")->value;
                        ^
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp: In member function ‘virtual IPState EQMod::GuideEast(float)’:
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp:2199:24: error: ‘TRACKRATE_SIDEREAL’ was not declared in this scope
     rateshift        = TRACKRATE_SIDEREAL * IUFindNumber(GuideRateNP, "GUIDE_RATE_WE")->value;
                        ^
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp: In member function ‘virtual IPState EQMod::GuideWest(float)’:
/tmp/indi/3rdparty/indi-eqmod/eqmod.cpp:2233:24: error: ‘TRACKRATE_SIDEREAL’ was not declared in this scope
     rateshift        = TRACKRATE_SIDEREAL * IUFindNumber(GuideRateNP, "GUIDE_RATE_WE")->value;
                        ^
indi-eqmod/CMakeFiles/indi_eqmod_telescope.dir/build.make:110: recipe for target 'indi-eqmod/CMakeFiles/indi_eqmod_telescope.dir/eqmod.o' failed
make[2]: *** [indi-eqmod/CMakeFiles/indi_eqmod_telescope.dir/eqmod.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'indi-eqmod/CMakeFiles/indi_eqmod_telescope.dir/all' failed
make[1]: *** [indi-eqmod/CMakeFiles/indi_eqmod_telescope.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2


Read More...

Kari Brown created a new topic ' Writing my first INDI (Focuser) driver' in the forum. 4 months ago

Hi,

I have just started learning how to write INDI drivers and have a somewhat working version for my arduino based DIY focuser but I have a few questions:

The focuser can be controlled with a hand controller too. When the position is changed using the hand controller I'm sending a notification to INDI via the USB serial comms. I've set up my INDI driver to poll the serial comms periodically using the SetTimer() / TimerHit() mechanisms. The serial data is sent to a parser which then calls the relevant callback functions. One of them is updating the current position where I log the incoming position and set the FocusAbsPosN[0].value.

Doing it this way seems to leave the UI widget in the INDI Control Panel in KStars out of sync. It seems to display the previous value instead of the most recent one.

Q1: Is this how you normally would hook up incoming serial communications?
Q2: Do I need to somehow notify the client I've changed the FocusAbsPosN[0].value?

Read More...

Kari Brown replied to the topic 'Indi Server And Hardware Failures?' in the forum. 1 year ago

That's perfect. I'll give it a go tonight!

Read More...

Kari Brown created a new topic ' Indi Server And Hardware Failures?' in the forum. 1 year ago

Hi,

I was out with my gear last weekend and encountered a random glitch with my Atik 383L+. It just stopped responding to anything and I had to power it down and up again to get it working. Due to this I had to also restart the indiserver and because of this I lost the current status of my other devices which were still working properly.

This got me thinking if there was a way to just restart one of the indi drivers without loosing the connection to the other ones? Would be really handy to have this capability if it doesn't exist already?

Thanks,
Kari

Read More...

Kari Brown replied to the topic 'More compact ekos user interface' in the forum. 1 year ago
Kari Brown replied to the topic 'Indi and Arduino?' in the forum. 1 year ago

Should have spent 10 more minutes looking before asking. Looks like they all talk to the standard firmata firmware. Simpler than I thought :)

Read More...

Kari Brown created a new topic ' Indi and Arduino?' in the forum. 1 year ago

Hi,

I've seen a lot of custom Indi driven DIY projects including an Arduino. Having used arduino for many applications myself I'm very interested on getting into this. The current Indi version also seems to ship with a bunch of Arduino drivers (CCD, Cosmos, Focuser etc etc). Where can I find more information about these and their respective firmwares?

Thanks,
Kari

Read More...

Kari Brown replied to the topic 'indi_gpsd and eqmod device snooping?' in the forum. 1 year ago

Ah-a. Was so close with this :)

Turns out if I connect to indi_gpsd first and then to eqmod, it won't update the location unless I hit the Update button in the GPSD Main Controls. But if I connect to eqmod first and then to indi_gpsd it'll do it automatically.

Bottom line is it works :)

Read More...

Kari Brown created a new topic ' indi_gpsd and eqmod device snooping?' in the forum. 1 year ago

Hi,

I have a BU353 usb gps module connected on my Raspberry Pi. I've got it configured so that my system time is updated automatically via ntpd and gpsd. The module is working fine and I can connect to it using indi_gpsd in the indi control panel in Kstars. I'm having trouble getting it to update the site management location settings in eqmod though. What do I need to do? I tried setting the GPS snoop device to "GPSD" and various other strings, but my location stays at zero. Update source is set to "device" in Kstars.

Read More...

Kari Brown replied to the topic 'QHY5L-II Mono stops working intermittently' in the forum. 1 year ago

knro wrote:

You can get kstars-bleeding on Pi if you use Ubuntu Mate 16.04 on it.

Thanks for the speedy answer! I'll give it a go on my spare Pi 3 tonight.

Cheers,
Kari

Read More...

Kari Brown created a new topic ' QHY5L-II Mono stops working intermittently' in the forum. 1 year ago

Hi,

I'm running the latest INDI and the latest available Kstars on a Raspberry Pi 2. Quite often my QHY5L-II mono just stops working via Ekos. It gets stuck at "Downloading" after taking an exposure. The only way to get it working again is to stop INDI, restart (unplug/plug) the camera and do it again. Any ideas?

Also is kstars-bleeding available for Raspberry Pi?

Cheers,
Kari

Read More...

Login



3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!