![]() |
Re: [Announce] gpscon gps position cli shell console
Quote:
I think some how the default variable value will be used and this means last known value and endless loop. If it is not your script (I still need to try) I could change the default values (options and variable) for gpscon or better writing a own argument parser which will work with this situation. Never tried cron-scripts with gpscon now it is time to do so.:) Quote:
To safe power is priority number one. |
Re: [Announce] gpscon gps position cli shell console
@pichlo Thank you very much for reporting this issue.
I found the bug, it is the console reader in gpscon which was causing the cron problem. You can stick to the gpscon-0.0.4-1.armv7hl.rpm version to solve the problem or wait for a new version. The latest version on openrepos gpscon-0.0.8-1.armv7hl.rpm will not fix the problem it was a test version about the argument parser, but the next version will correct the console reader for sure. |
Re: [Announce] gpscon gps position cli shell console
Important update to gpscon!
For using gpscon in cron, python or any script it is recommended to use the additional otpion "--script" otherwise it could hang. This feature is there since version 0.0.8. Type gpscon --help to check version. All other version between 0.0.4 and 0.0.8 have a bug which cause the application hang when used with scripts and if there is no stdin. For now this is the easiest and safest solution. I will see if it could be detected and automatically switched. |
Re: [Announce] gpscon gps position cli shell console
Hey Halftux, thanks a million for looking into this and sorry for the late feedback. Weekends are the busiest time. During the week I can (sometimes) steal some time from my employer but stealing it from the family is a bit more difficult ;)
Unfortunately, neither a downgrade to 0.0.4 nor an upgrade to 0.0.8 and adding the --script option has made any difference. The script still freezes when launched from cron. After a while, ps shows a number of instances of my script and gpscon runs=3 running. Killing them all makes the stuck scripts move forward all at once. Having read the above post about no stdin, I also tried adding a redirection from a file (gpscon runs=3 < somefile, with or without --script) but that has not made any difference either. The only thing that does not freeze is runs=1, but that produces wrong coordinates as described earlier. So I am thinking about changing the paradigm completely and repeating my question from a few posts back. @juiceme, how did you do it? |
Re: [Announce] gpscon gps position cli shell console
Quote:
Quote:
This could solve your issue. |
Re: [Announce] gpscon gps position cli shell console
I have recognized when using gpscon run=1 posm=onlysat --script
will run for ever until satellites are in view. I will add in the future a timeout for this case (run=1 posm=onlysat). When the timeout is reached it closes the app or will fall back to an other positioning method which is not so exact. I will see. |
Re: [Announce] gpscon gps position cli shell console
Quote:
Sadly, no :( Code:
[nemo@Dinghy ~]$ ps ax | grep gps For a reference, I have made only a minimal change to the script. Adding --script and replacing curl with echo: Code:
#!/bin/sh Code:
#!/bin/sh Code:
[nemo@Dinghy ~]$ ps ax | grep gps |
Re: [Announce] gpscon gps position cli shell console
Quote:
Here a link to start with another shell. What shell does sailfish use? Quote:
Here is my scenario with N900. In alarmed I write as command: Code:
sh /opt/gps.sh Code:
#!/bin/sh Code:
#!/bin/sh Code:
14554 user 2084 S /bin/ash -c sh /opt/gps.sh When in the location settings the location supl. server is deactivated or when using posm=onlysat is set, there will be no output unless you have enough satellites in view. |
Re: [Announce] gpscon gps position cli shell console
Maybe it has nothing to do with cron. I am working now on a debug version and try to avoid a qt event loop. It could be that there is spawning another instance?
I had with another application going from qt4 to qt5 problems with event loops. Stay tuned. |
Re: [Announce] gpscon gps position cli shell console
Good point, I will try launching another Qt app from cron and see what happens.
The curious bit is that it runs normally with runs=1, only gives incorrect results. What is the difference between runs=1 and runs=3 that may cause the hang? |
All times are GMT. The time now is 09:08. |
vBulletin® Version 3.8.8