×

INDI Library v1.9.0 Released (23 Apr 2021)

Major INDI Library release v1.9.0 bring significant internal changes championed by @pawel-soja to modernize core INDI Library drivers and clients. New drivers for DeepSkyDad Flat Panel & Pegasus devices plus further improvements to PCM8 drivers.

RPi CCD Simulator GSC Installation Problem

  • Posts: 60
  • Thank you received: 7
(I did do a search 1st so sorry if I missed the obvious) *** Additional Info added at bottom)
Trying to install the GSC on my RPi (Raspbian, latest release version) and I can't get it working. It's a new installation (INDI, everything and RPi is just Indi Server (no Kstars). Only difference was that on RPi, Indi Server installed via apt-get as in:
<code>sudo apt-get -y install indi-bin</code>
(as stated in www.indilib.org/download/viewcategory/14-raspberry-pi.html )
rather than through:
<code>tar -xzf libindi_1.2.0_rpi.tar.gz
cd libindi_1.2.0_rpi
sudo dpkg -i *.deb
</code>
When I run Ekos (remote) anything imaging it reports errors e.g. INDI Control Panel->CCD Simulators tab->Main Control bottom (log?) reports "2019-09-27T15:49:48: [ERROR] Got no stars, is gsc installed with appropriate environment variables set ?? " and all the image capture/displays just return "white noise"

Installation went fine except for a load of compiler warnings on "make" for gsc.exe (but gsc.exe is created, mv's and put in /usr/bin ok. Compiler warnings:
<code>cc -I. -O gsc.c prtgsc.c dispos.c decode_c.c get_head.c find_reg.c to_d.c dtos.c -lm
gsc.c:356:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
main(argc,argv)
^~~~
gsc.c: In function ‘main’:
gsc.c:442:8: warning: implicit declaration of function ‘to_d’; did you mean ‘tod’? [-Wimplicit-function-declaration]
if(to_d(line,&da0,&dd0) <0) {
^~~~
tod
gsc.c:614:9: warning: implicit declaration of function ‘lseek’; did you mean ‘fseek’? [-Wimplicit-function-declaration]
size = lseek(f2,0L,2);
^~~~~
fseek
gsc.c:617:5: warning: implicit declaration of function ‘read’; did you mean ‘fread’? [-Wimplicit-function-declaration]
cc=read(f2,ind2,size);
^~~~
fread
gsc.c:621:2: warning: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration]
close(f2);
^~~~~
pclose
get_head.c: In function ‘get_header’:
get_head.c:25:6: warning: implicit declaration of function ‘read’; did you mean ‘fread’? [-Wimplicit-function-declaration]
if (read(fp,w,4) != 4) return((char *)0);
^~~~
fread
to_d.c: In function ‘to_d’:
to_d.c:61:9: warning: implicit declaration of function ‘isspace’ [-Wimplicit-function-declaration]
while (isspace(*str)) str++;
^~~~~~~
to_d.c:62:6: warning: implicit declaration of function ‘ispunct’ [-Wimplicit-function-declaration]
if (ispunct(*str)) return(-1);
^~~~~~~
strip a.out ; rm *.o ; mv a.out gsc.exe
rm: cannot remove '*.o': No such file or directory</code>

Edit: Additional info on configuration: The RPi Indi server is being started through IndiWebManager (started from within Kstars/Ekos on a remote Mac). On th RPi the default "Pi" username has been renamed to 'phobos' and the indiwebmanager.service edited to run under that username. The RPi is headless and the IndiWebManager has been configured to startup on boot (as per the instructions on Indi website and git pages for IndiWebManager. Everything works fine 1st time except for the GSC stuff being asked about above.
Last edit: 1 year 8 months ago by Ian. Reason: Add ition configuration info added at bottom
1 year 8 months ago #43939

Please Log in or Create an account to join the conversation.

  • Posts: 2475
  • Thank you received: 667
You can compare your steps to the steps in my script to set up a raspbian system. It includes INDI and GSC.

github.com/rlancaste/AstroPi3

Thanks,

Rob
1 year 8 months ago #43944

Please Log in or Create an account to join the conversation.

  • Posts: 60
  • Thank you received: 7
It looks mainly the same. Differences I doubt would have a massive impact e.g. your script is copying the GSC files to /usr/share/GSC where the IndiLib web site keeps them under the user home ~/gsc - but my GSCDATA env variable points to where mine are as yours points to where you put hem (I've checked the environment and the variable is there correctly (I've actually tried them in two places.

I was unsure about the compiler warnings as to whether they were causing problems in the generated executable, but from my own C/C++ days warnings were not normally fatal (unlike errors) and it does generate the gsc.exe (renamed name moved same in yours and IndiLib

The IndiLib instructions adds two files from src to the gsc directory (just a copy regions.* - something not in your script: cp ~/gsc/bin/regions.* ~/gsc). But I can't believe a couple of extra files would be causing problems. (Plus on my Mac installation those region files are not present - and that works file).

Another difference is the IndiLib instructions put setting the environment variable in .bashrc where your script uses /etc/profile. But I've checked the environment and it'd in there properly and the indiwebmanager (which starts the indiserver and thus starts the CCD Simulator) is configured to run under the same username.

Is there any way I can check what username the processes are running under in case something is being run under the wrong username (which might the mean the env variable is not getting set, etc.

Many thanks

Edit: To check I've moved everything as per your config (/usr/share/GSC, changing /etc/profile, etc.) and still no stars (still
2019-09-27T21:08:53: [ERROR] Got no stars, is gsc installed with appropriate environment variables set ??
). Don't think it's an issue with Kstars/Ekos as if I run the CCD simulator on same machine (Mac) then works OK.
Last edit: 1 year 8 months ago by Ian. Reason: Tried different configuration so added results
1 year 8 months ago #43948

Please Log in or Create an account to join the conversation.

  • Posts: 2475
  • Thank you received: 667
You can also try running my new INDI web manager app to run the web manager. That might be a good way to check to see if it is something involving the user. Because you would be sure that it is running as your user account.
1 year 8 months ago #43949

Please Log in or Create an account to join the conversation.

  • Posts: 60
  • Thank you received: 7
I tried moving everything to the /usr/share and putting the new GSCDAT environment varible in /etc/profile which I assume is the global (not user specific)

I installed the same IndiWebManager as is installed by your script i.e.
sudo apt-get install python3-pip
sudo -H pip3 install indiweb

I followed the IndiLib web site instructions so I could set it to autostart as I'll mostly be headless and wanted to avoid desktop icons to start and stop stuff.

Checked running processes and indi-web is running under the correct user
740 phobos    20   0   25400  16836   8564 S   0.0   1.8   0:01.52 indi-web

The gsc executable seems to run (if I do
gsc -help
I get the help output I expect. Path to gsc seems ok as I can enter the command fine when current working directory is "elsewhere"

Edit: Additional info. Checked the indi CCD simulator driver process on the RPi and it's running under the correct username.
Last edit: 1 year 8 months ago by Ian. Reason: Added more info from more investigation
1 year 8 months ago #43953

Please Log in or Create an account to join the conversation.

  • Posts: 2475
  • Thank you received: 667
I would still try with INDI web manager app instead of the service file because you can then have more control over it and are 100% sure what paths are being used and what user is running each thing etc
1 year 8 months ago #43954

Please Log in or Create an account to join the conversation.

  • Posts: 2475
  • Thank you received: 667
1 year 8 months ago #43955

Please Log in or Create an account to join the conversation.

  • Posts: 60
  • Thank you received: 7
Sorry, I'm being slow today so a few questions:
1. Is your app a INDI Web Manager or something that controls an INDI Web Manager?
2. Does it have to be installed on the computer running the INDI Web Manager (or can I install it on my Mac client and use it to control the RPi INDI Web Manager)?
3. In your instructions for installing INDI Web Manager your say "not as root". Is this crucial only for your app or generally - as I installed INDI Web Manager as root (with sudo) as per the indiwebmanager git instructions ( github.com/knro/indiwebmanager )
4. To get rid of the systemd startup do I just "sudo systemctl disable indiwebmanager.service" (and delete out the /etc/systemd/system/indiwebmanager.service and maybe do a "sudo systemctl daemon-reload" (and a reboot for luck?

n.b. gsc app seems to work as I can trye in a command to the prompt and gets a good'ish looking response
e.g.
phobos@Phobos-1r:~ $ gsc -c 1.441 +1.345 -r 10.1 -n 3000
0000101499 001.45207 +01.19901   1.2 15.33 0.40  1 3 0516 F;   8.78 176
0000101073 001.49327 +01.22190   0.3 12.63 0.40  1 0 0516 T;   8.02 157
0000101073 001.49326 +01.22197   0.3 13.09 0.31  0 0 012J T;   8.02 157
0000100568 001.54076 +01.23600   0.4 11.50 0.34  0 0 012J T;   8.86 138
0000100568 001.54086 +01.23601   0.3 10.67 0.40  1 0 0516 T;   8.87 138
0000100490 001.57280 +01.24538   0.5 12.80 0.40  1 2 0516 T;   9.91 127
0000100490 001.57275 +01.24540   0.4 13.59 0.34  0 2 012J T;   9.91 127
0000100158 001.57343 +01.24592   0.3 14.09 0.34  0 2 012J F;   9.92 127
0000100956 001.40505 +01.25325   0.3 14.21 0.40  1 0 0516 T;   5.91 201
0000100956 001.40501 +01.25328   0.3 14.67 0.31  0 0 012J T;   5.91 201
0000101305 001.29578 +01.26928   0.3 15.50 0.40  1 0 0516 F;   9.82 242
0000100734 001.44099 +01.28381   0.3 14.54 0.40  1 0 0516 T;   3.67 180
0000100734 001.44094 +01.28382   0.3 15.50 0.31  0 0 012J T;   3.67 180
0000101492 001.33585 +01.29301   0.3 15.52 0.40  1 0 0516 F;   7.04 244
0000101449 001.29985 +01.32605   0.3 15.32 0.40  1 0 0516 F;   8.54 262
0000100040 001.44471 +01.35359   0.3 13.29 0.40  1 0 0516 T;   0.56  23
0000100040 001.44472 +01.35366   0.3 13.59 0.34  0 0 012J T;   0.57  23
0000100483 001.38725 +01.36053   0.3 14.42 0.40  1 0 0516 T;   3.36 286
0000100483 001.38732 +01.36054   0.3 14.76 0.34  0 0 012J T;   3.35 286
0000100712 001.41926 +01.36799   0.3 15.30 0.34  0 0 012J T;   1.90 317
0000100712 001.41927 +01.36801   0.3 14.83 0.40  1 0 0516 T;   1.90 317
0000101283 001.29008 +01.38563   0.2 15.55 0.40  1 0 0516 F;   9.38 285
0000100955 001.31024 +01.39150   0.3 13.75 0.34  0 0 012J T;   8.32 290
0000100955 001.31021 +01.39151   0.3 13.28 0.40  1 0 0516 T;   8.33 290
0000101234 001.43477 +01.41157   0.3 15.13 0.40  1 0 0516 F;   4.01 355
0000100477 001.55909 +01.45543   0.3 11.80 0.40  1 0 0516 T;   9.70  47
0000100477 001.55906 +01.45545   0.4 12.21 0.34  0 0 012J T;   9.70  47
0000100328 001.48468 +01.48429   0.3 14.58 0.40  1 0 0516 T;   8.76  17
0000100328 001.48467 +01.48438   0.3 15.00 0.34  0 0 012J T;   8.76  17
0000100509 001.47921 +01.48527   0.3 13.96 0.40  1 0 0516 T;   8.72  15
0000100509 001.47924 +01.48538   0.3 14.46 0.34  0 0 012J T;   8.73  15
phobos@Phobos-1r:~ $ 
Last edit: 1 year 8 months ago by Ian.
1 year 8 months ago #43958

Please Log in or Create an account to join the conversation.

  • Posts: 947
  • Thank you received: 128
GSC is for Kstars, so why are you installing in your rpi, if you don’t have Kstars installed, does not make sense...
GSC should be installed on your machine that you run ekos from..., also GSC can’t be installed on raspbian via the “sudo apt-get install gsc” command it’s has to be compiled from source...at least that’s the way I was told to do it... ?
Stellarmate OS on Raspberry pi4b
Skywatcher EQ8 pro, on steel pier
Takahashi FSQ85, FS60cb & Meade 8” SCT (de-forked)
Starlight Xpress SXVR H18, SXVR M25c, Lodestar x2 Guide Camera
Pegasus Ultimate Hub V2 for all USB & Power
Pegasus focus motors on all scopes
Last edit: 1 year 8 months ago by AstroNerd.
1 year 8 months ago #43959

Please Log in or Create an account to join the conversation.

  • Posts: 60
  • Thank you received: 7

For the CCD Simulator to return star fields. Have I got it wrong as it's the CCD Simulator that is reporting the gsc errors? (As instructed "If you are planning to use the indi_simulator_ccd driver and need to retrieve simulated images of star fields you have to install de Guide Star Catalog (GSC) on your RPi." from www.indilib.org/support/tutorials/139-in...on-raspberry-pi.html

I am compiling from source (and I got all the warnings posted 1st post in this thread). I've tried the instructions specific to Rasbian (part way down page www.indilib.org/support/tutorials/139-in...on-raspberry-pi.html ) and then the AstriPi3 script commands (i.e. the commands NOT the script itself)
1 year 8 months ago #43960

Please Log in or Create an account to join the conversation.

  • Posts: 2475
  • Thank you received: 667
1. Is your app a INDI Web Manager or something that controls an INDI Web Manager?
My App controls, starts, configures an INDI Web Manager

2. Does it have to be installed on the computer running the INDI Web Manager (or can I install it on my Mac client and use it to control the RPi INDI Web Manager)?
The App needs to be installed on whatever computer you plan to run the INDI Web Manager. I originally wrote it for Mac computers incidentally, because they can't run INDI Web Managers like Linux can, so I made an alternative method. It just so happened, that the program worked great for Linux too. But yes, it should be installed on your Raspberry PI.

3. In your instructions for installing INDI Web Manager your say "not as root". Is this crucial only for your app or generally - as I installed INDI Web Manager as root (with sudo) as per the indiwebmanager git instructions ( github.com/knro/indiwebmanager )
I recommend not running programs as root, its not great practice. You could probably run it as root, but that is not a good idea. And one big problem is that python/pip install programs in different places and run different versions if you run them as root vs. running them as the user. Yes INDI Web Manager had to be installed as root probably because of the way it was launched. But with my program, nothing needs to be installed as root.

4. To get rid of the systemd startup do I just "sudo systemctl disable indiwebmanager.service" (and delete out the /etc/systemd/system/indiwebmanager.service and maybe do a "sudo systemctl daemon-reload" (and a reboot for luck?
yes, sounds like that would work. And if you don't like my program, you can always put it back.
1 year 8 months ago #43961

Please Log in or Create an account to join the conversation.

  • Posts: 2475
  • Thank you received: 667

There is actually a reason to install it on the Pi. If he would like to run the CCD Simulator on the Pi and get stars in it, then GSC would need to be installed on the pi. If he just plans to run CCD simulator on the Mac, then GSC would just need to be on the Mac. Basically wherever you plan to run CCD Simulator is where GSC needs to be. But there is a good reason to have it on the PI as well, for testing purposes and such.
1 year 8 months ago #43963

Please Log in or Create an account to join the conversation.

Time to create page: 0.838 seconds