View Issue Details

IDProjectCategoryView StatusLast Update
0000753SkyChart1-Softwarepublic11-09-03 14:49
Reportergroz Assigned ToPatrick Chevalley  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Platformx86OSLinuxOS Version2.6
Product Version3.2 
Target Version3.4Fixed in Version3.3 SVN 
Summary0000753: Indi port handling issues
DescriptionWhen skychart connects to the indi server, for telescope information, it insists on setting the DEVICE_PORT Property, irrelavent of the rest of the state.

This is not correct. If skychart connects to an active indi server, and finds a telescope there, if the telescope is already in a connected and running state, there is no need to set the DEVICE_PORT property for that telescope.

In reality, for remote connected scopes, it should be the responsibility of the server hosting the telescope to set this property, and it should be transparent to remote clients. In our case, we have two telescopes on the network. Scope number one is physically attached to /dev/ttyS0, while scope number two is physically attached to /dev/ttyUSB0. These telescopes are pretty much always in the CONNECTED state, we have various processes on the network managing them fully automated.

At times, we would like to connect with a planetarium, and see where they are pointed etc. Since the telescopes are already running in a fully automated run, and the indi server will be reporting a state of CONNECTED for both of them, the client should not be trying to change properties like the serial port, it should just start digesting the RA/DEC messages being produced.

Since I have full sources to all of our indi drivers, some from the indi svn, and some still a 'work in progress' here, my solution for now is to re-compile the drivers with some extra indi switches defined, one of the essentially says 'ignore port requests'. When our software starts on the remote box that hosts the indi server, it sets the correct port for each telescope, then sets the 'ignore more requests' state. After that, if Skychart connects, our drivers will accept the port, report it changed, and throw it into /dev/null, not actually touching the physical port.

A 'more appropriate' behaviour for skychart in this regard would be along this line

1 - Connect to remote telescope
2 - If state of scope is connected, all done
3 - if state is not connected, set connect=on
4 - if setting connect=on results in failure, try set port

This would result in skychart just using any existing configuration already in place on the remote end, and, only trying to override it, if the existing configuration doesn't work.

TagsNo tags attached.

Activities

Patrick Chevalley

10-12-05 17:46

administrator   ~0001464

I agree it must not set the port for an already running server.

Revision 1599 enforce that, and change the telescope setting menu to make clear that "server command", "driver name", "device port" are not used if the server is not started locally by skychart.
It also allow to indicate the "Telescope type" if Other is selected (necessary for 0000752 )

Now it not send a "connect=on" if the telescope is already connected.

In the improbable case the port is not already set on the server, you can use such a script after starting the server:
#!/bin/bash
netcat localhost 7624 << EOF
<newTextVector device="Celestron GPS" name="DEVICE_PORT"><oneText name="PORT">/dev/ttyUSB0</oneText></newTextVector>
EOF

http://svn.origo.ethz.ch/viewvc/skychart?view=rev&revision=1599

Issue History

Date Modified Username Field Change
10-11-29 22:55 groz New Issue
10-11-30 08:27 Patrick Chevalley Assigned To => Patrick Chevalley
10-11-30 08:27 Patrick Chevalley Status new => assigned
10-11-30 08:27 Patrick Chevalley Target Version 0.3.0 => 3.4
10-12-05 17:46 Patrick Chevalley Note Added: 0001464
10-12-05 17:46 Patrick Chevalley Status assigned => resolved
10-12-05 17:46 Patrick Chevalley Resolution open => fixed
10-12-05 17:46 Patrick Chevalley Fixed in Version 0.3.0 => 3.3 SVN
11-09-03 14:49 Patrick Chevalley Status resolved => closed