Welcome, Guest
Username: Password: Remember me
08 Apr 2018
INDI development team is happy to announce the release of INDI Library v1.7.0. This new exciting release builds on the maturity of INDI Library and comes with many new supported devices and fixes for existing drivers.
Read More...

TOPIC: [SOLVED] FIFO start script

FIFO start script 1 week 21 hours ago #27301

  • maxer
  • maxer's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 189
  • Karma: 1
  • Thank you received: 19
Oh, sorry, I thought you solved it.. I don't see the problem either.. but you could try "expect" ? it can do a CR after a output from a device or a script..

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

FIFO start script 1 week 21 hours ago #27302

  • maxer
  • maxer's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 189
  • Karma: 1
  • Thank you received: 19
Can you try echo -ne "Some text\n\n" as the last line ??

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

FIFO start script 1 week 20 hours ago #27303

  • Gonzothegreat
  • Gonzothegreat's Avatar Topic Author
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1205
  • Karma: 3
  • Thank you received: 89
It made no difference.

Even without the script, plain command line:
heidenrod@heidenrod-obs:~/obs_control$ indiserver -f /tmp/indiFIFO &
[1] 18547
heidenrod@heidenrod-obs:~/obs_control$ 2018-07-08T19:06:27: startup: indiserver -f /tmp/indiFIFO

heidenrod@heidenrod-obs:~/obs_control$ echo "start indi_roof_odroid" > /tmp/indiFIFO
heidenrod@heidenrod-obs:~/obs_control$ 2018-07-08T19:09:54: Driver indi_roof_odroid: Init props
<--- it just seats there, does nothing until you press enter to get back to the prompt -->
heidenrod@heidenrod-obs:~/obs_control$

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

Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
HEQ5 pro / Atik titan / Atik 314L+

FIFO start script 1 week 20 hours ago #27304

  • Gonzothegreat
  • Gonzothegreat's Avatar Topic Author
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1205
  • Karma: 3
  • Thank you received: 89
While for example, the stop command works perfectly fine.
Issue the command, it gets executed, return to prompt without issues.
heidenrod@heidenrod-obs:~/obs_control$ echo "stop indi_roof_odroid" > /tmp/indiFIFO
dp->name: indi_roof_odroid - tDriver: indi_roof_odroid
name:  - dp->dev[0]: Odroid Roof
<delProperty device="Odroid Roof"/>
Child process 18577 died
heidenrod@heidenrod-obs:~/obs_control$

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

Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
HEQ5 pro / Atik titan / Atik 314L+

FIFO start script 1 week 20 hours ago #27306

  • Gonzothegreat
  • Gonzothegreat's Avatar Topic Author
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1205
  • Karma: 3
  • Thank you received: 89
Well this is odd !!!! I ran a strace against the start command and the behaviour isn't here.
heidenrod@heidenrod-obs:~$ strace echo "start indi_roof_odroid" > /tmp/indiFIFO
execve("/bin/echo", ["echo", "start indi_roof_odroid"], [/* 17 vars */]) = 0
brk(NULL)                               = 0x26000
uname({sysname="Linux", nodename="heidenrod-obs.de", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=31706, ...}) = 0
mmap2(NULL, 31706, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6f9b000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\331i\1\0004\0\0\0"..., 512) = 512
lseek(3, 894128, SEEK_SET)              = 894128
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 2960) = 2960
lseek(3, 888324, SEEK_SET)              = 888324
read(3, "A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\3\f"..., 51) = 51
fstat64(3, {st_mode=S_IFREG|0755, st_size=897088, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f9a000
mmap2(NULL, 963928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e91000
mprotect(0xb6f67000, 65536, PROT_NONE)  = 0
mmap2(0xb6f77000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd6000) = 0xb6f77000
mmap2(0xb6f7a000, 9560, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6f7a000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f99000
set_tls(0xb6f994c0, 0xb6f99b98, 0xb6fa5050, 0xb6f994c0, 0xb6fa5050) = 0
mprotect(0xb6f77000, 8192, PROT_READ)   = 0
mprotect(0x24000, 4096, PROT_READ)      = 0
mprotect(0xb6fa4000, 4096, PROT_READ)   = 0
munmap(0xb6f9b000, 31706)               = 0
brk(NULL)                               = 0x26000
brk(0x47000)                            = 0x47000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1669024, ...}) = 0
mmap2(NULL, 1669024, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6cf9000
close(3)                                = 0
fstat64(1, {st_mode=S_IFIFO|0644, st_size=0, ...}) = 0
write(1, "start indi_roof_odroid\n", 23) = 23
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?
+++ exited with 0 +++
heidenrod@heidenrod-obs:~$


I don't get it ?!?!?!?!?

heidenrod@heidenrod-obs:~$ echo "start indi_roof_odroid" > /tmp/indiFIFO
heidenrod@heidenrod-obs:~$

that works now, all I've done is logout and log back in.


So I've done the same as above again, log out log in. And it's back to square zero, not working.

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

Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
HEQ5 pro / Atik titan / Atik 314L+

FIFO start script 1 week 20 hours ago #27307

  • Gonzothegreat
  • Gonzothegreat's Avatar Topic Author
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1205
  • Karma: 3
  • Thank you received: 89
heidenrod@heidenrod-obs:~/obs_control$ ./test.sh 
started
heidenrod@heidenrod-obs:~/obs_control$ cat test.sh 
#!/bin/bash
#indiserver -f /tmp/indiFIFO &
echo "start indi_roof_odroid" > /tmp/indiFIFO
echo "started"
heidenrod@heidenrod-obs:~/obs_control$


I'm either over thinking it or there is something not behaving ....


18816 ? S 0:00 indiserver -f /tmp/indiFIFO
18939 ? S 0:00 \_ indi_roof_odroid
root@heidenrod-obs:~#

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

Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
HEQ5 pro / Atik titan / Atik 314L+

FIFO start script 1 week 20 hours ago #27308

  • maxer
  • maxer's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 189
  • Karma: 1
  • Thank you received: 19
Really strange :S so it seems that the last line is never executed for some reason, if you try with another device like a camera is the behavior the same ?? or is it only the roof driver that does something strange ??

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

FIFO start script 1 week 20 hours ago #27309

  • Gonzothegreat
  • Gonzothegreat's Avatar Topic Author
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1205
  • Karma: 3
  • Thank you received: 89
I will try with other drivers another evening. Thanks for looking into this.
I need to understand it correctly as I need to trust my scripts 100%, observatory is 400miles+ away.... can't afford any mistake LOL...

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

Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
HEQ5 pro / Atik titan / Atik 314L+

FIFO start script 1 week 20 hours ago #27310

  • maxer
  • maxer's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 189
  • Karma: 1
  • Thank you received: 19
It will be interesting to see if all drivers behave the same, in that case it's not the drivers but something else, but we'll see.
I understand that it's important, for me it's just a few miles to my observatory so not a big deal but it must work every time anyway.
No problem, it's a interesting issue.

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

FIFO start script 1 week 20 hours ago #27311

  • Gonzothegreat
  • Gonzothegreat's Avatar Topic Author
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1205
  • Karma: 3
  • Thank you received: 89
Going to spend more time on this, really want to fully understand. Will report if/when I find it.

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

Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
HEQ5 pro / Atik titan / Atik 314L+

FIFO start script 6 days 21 hours ago #27350

  • Gonzothegreat
  • Gonzothegreat's Avatar Topic Author
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1205
  • Karma: 3
  • Thank you received: 89
I have tested it against the StarLight Express wheel driver and it's behaving as expected.
heidenrod@heidenrod-obs:~/obs_control$ echo "stop indi_sx_wheel" > /tmp/indiFIFO
heidenrod@heidenrod-obs:~/obs_control$ 
heidenrod@heidenrod-obs:~/obs_control$ 
heidenrod@heidenrod-obs:~/obs_control$ 
heidenrod@heidenrod-obs:~/obs_control$ echo "start indi_sx_wheel" > /tmp/indiFIFO
heidenrod@heidenrod-obs:~/obs_control$ echo "stop indi_sx_wheel" > /tmp/indiFIFO
heidenrod@heidenrod-obs:~/obs_control$ 
heidenrod@heidenrod-obs:~/obs_control$ 
heidenrod@heidenrod-obs:~/obs_control$ echo "start indi_sx_wheel" > /tmp/indiFIFO
heidenrod@heidenrod-obs:~/obs_control$


I guess there is something wrong with my driver. github.com/Trigger-broom-289/odroid-indi-roof
Any one kind enough to have a quick look over to see what I'm doing wrong?

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

Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
HEQ5 pro / Atik titan / Atik 314L+
Last Edit: by Gonzothegreat. Reason: issue is fixed

[SOLVED] FIFO start script 6 days 21 hours ago #27351

  • Gonzothegreat
  • Gonzothegreat's Avatar Topic Author
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1205
  • Karma: 3
  • Thank you received: 89
The issue is fixed, found the issue in my code.
github.com/Trigger-broom-289/odroid-indi...016791f8903305d715e8
heidenrod@heidenrod-obs:~/obs_control$ echo "start indi_roof_odroid" > /tmp/indiFIFO
heidenrod@heidenrod-obs:~/obs_control$ echo "stop indi_roof_odroid" > /tmp/indiFIFO
heidenrod@heidenrod-obs:~/obs_control$
heidenrod@heidenrod-obs:~/obs_control$ more test.sh 
#!/bin/bash
#indiserver -f /tmp/indiFIFO &
echo "start indi_roof_odroid" > /tmp/indiFIFO
echo "started"
heidenrod@heidenrod-obs:~/obs_control$ ./test.sh 
started
heidenrod@heidenrod-obs:~/obs_control$
heidenrod@heidenrod-obs:~/obs_control$ ps afx | grep -A1 "[i]ndiserver -f"
28101 ?        S      0:00 indiserver -f /tmp/indiFIFO
28967 ?        S      0:00  \_ indi_roof_odroid
heidenrod@heidenrod-obs:~/obs_control$

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

Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
HEQ5 pro / Atik titan / Atik 314L+
Last Edit: by Gonzothegreat.
Time to create page: 0.231 seconds

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!


Gallery

Replica

Why INDI

Replica