Page 56 of 71 FirstFirst ... 646545556575866 ... LastLast
Results 551 to 560 of 707

Thread: Linux feeder software for Flightradar24 (Old software)

  1. #551
    Passenger koro's Avatar
    Join Date
    Jul 2014
    Location
    EBAW
    Posts
    30
    Hi Serge,


    I installed supervisor...
    But when i try to make a file in the conf.d$ folder i get "Permission denied"

    The same when i try to make a folder in opt.



    Quote Originally Posted by sergsero View Post
    Hi Ken,

    All right, if you run programs in the console, then each of them requires its own. Open now another console and run there program fr24 sender. And everything will work.

    Your screenshot shows that modesmixer2 successfully connected to SBS-3, receives RAW data, decodes them to MSG and output them to network through port 30003. All is well!

    Also in another console, you can run the program nc 127.0.0.1 30003 and will see already decoded messages in MSG format that will be sent from you to the site flightradar24.com.



    How to automatically run programs in Linux, each finds his way.

    In the simplest case, to start some program in the background without quiting or holding anything up from the console where it is running, you need to add the & at the end of the line. Thus to demonize her. It is recommended to add in command line of modesmixer2 the option: --log-noconsole.

    I prefer to use the supervisor from the raspbian wheezy packages. Supervisor is a system for controlling and maintaining process state, similar to what init does. It will manage individual processes or groups of processes that need to be started and stopped in order, and it is possible to control individual process state via an rpc mechanism, thus allowing ordinary users to restart processes.

    So the command sudo apt-get install supervisor will install it to system. Then in /etc you will find a directory supervisor/conf.d with configuration files. Place custom configuration files for supervisor here. They will be read after the main configuration file in /etc/supervisor/supervisord.conf.

    The number of custom configuration files according to the number of running programs. For example, two in the our case: fr24-ebaw.conf and mm-ebaw.conf:



    If your executable program files fr24feed and modesmixer2 are located in the /opt directory in the same name subdirectory:


    then the content can be made in such:

    /etc/supervisor/conf.d$ cat mm-ebaw.conf
    Code:
    [program:mm-ebaw]
    directory=/opt/modesmixer2
    command=/opt/modesmixer2/modesmixer2 --inConnect 192.168.1.170:10001 --outServer msg:30003
    user=nobody
    umask=022
    autostart=True
    autorestart=True
    redirect_stderr=True
    and

    /etc/supervisor/conf.d$ cat fr24-ebaw.conf
    Code:
    [program:fr24-ebaw]
    directory=/opt/fr24feed
    command=/opt/fr24feed/fr24feed --fr24key=xxxxxxxxx --bs-ip=127.0.0.1 --bs-port=30003
    user=nobody
    umask=022
    autostart=True
    autorestart=True
    redirect_stderr=True

    Reboot the system and and both programs start automatically. To check their condition, you can run the command: sudo supervisorctl status.

    Or run a command to reload the settings of supervisor: sudo supervisorctl reload.

    A list of other available commands management and monitoring:
    sudo supervisorctl help
    Code:
    default commands (type help <topic>):
    =====================================
    add    clear  fg        open  quit    remove  restart   start   stop  update
    avail  exit   maintail  pid   reload  reread  shutdown  status  tail  version
    Thanks,
    sergsero
    Ken
    Near EBAW

  2. #552
    Passenger sergsero's Avatar
    Join Date
    Sep 2012
    Location
    UNNT
    Posts
    38
    Hi Ken,

    The owner of the directory /conf.d, as well as /opt is root. "Root" is the user name or account that by default has access to all commands and files on a Linux or other Unix-like operating system. It is also referred to as the root account, root user and the superuser.
    The permissions system in Unix-like operating systems is set by default to prevent access by ordinary users to critical parts of the system and to files and directories belonging to other users. That is, rather than routinely logging into the system as root, administrators should log in with their ordinary user accounts and then use command, such as sudo, that provide them with root privileges only as needed and without requiring a new login.

    So you, as normal users do not have sufficient access rights on the changes there.

    Use the sudo command together with your actions to get once-only administrator (root) rights. For example: sudo mkdir ... and so on.

    Or obtain root privileges on the entire session by typing: sudo -s. It will ask you to enter your password to confirm that it really is you. Enter your password. Then you will be able to perform any desired action without restriction.

    Thanks,
    sergsero
    Last edited by sergsero; 2014-07-27 at 14:37.

  3. #553
    Passenger koro's Avatar
    Join Date
    Jul 2014
    Location
    EBAW
    Posts
    30
    Hi Serge,

    I did all as you told me...

    Ater reboot i heve to give UN ans password like pi and raspberry...

    After that nothing happened... when i use sudo supervisorctl status i see something like...

    FATAL can't find command '/opt/fr24/fr24feed\xc2\xa0--fr24key............



    Quote Originally Posted by sergsero View Post
    Hi Ken,

    The owner of the directory /conf.d, as well as /opt is root. "Root" is the user name or account that by default has access to all commands and files on a Linux or other Unix-like operating system. It is also referred to as the root account, root user and the superuser.
    The permissions system in Unix-like operating systems is set by default to prevent access by ordinary users to critical parts of the system and to files and directories belonging to other users. That is, rather than routinely logging into the system as root, administrators should log in with their ordinary user accounts and then use command, such as sudo, that provide them with root privileges only as needed and without requiring a new login.

    So you, as normal users do not have sufficient access rights on the changes there.

    Use the sudo command together with your actions to get once-only administrator (root) rights. For example: sudo mkdir ... and so on.

    Or obtain root privileges on the entire session by typing: sudo -s. It will ask you to enter your password to confirm that it really is you. Enter your password. Then you will be able to perform any desired action without restriction.

    Thanks,
    sergsero
    Ken
    Near EBAW

  4. #554
    Passenger sergsero's Avatar
    Join Date
    Sep 2012
    Location
    UNNT
    Posts
    38
    Hi Ken,

    This message says that the supervisor does not find an executable program in this directory.
    Do you put it there beforehand?
    Or does not match the name of the file: we have configured fr24feed, but in reality his name fr24feed_arm-le_225s.

    In fr24-ebaw.conf in the string: command=/opt/fr24feed/fr24feed --fr24key=xxxxxxxxx --bs-ip=127.0.0.1 --bs-port=30003 its components must be separated by a space.
    At feedback message, which you give exemplify, this string contain unknown characters instead of a space:

    111.png



    If this does not resolve the problem, then let we once again will check all the stages of supervisor installation. Most likely all of the infrastructure you already have. Therefore, re-create it is not necessary. Just check it the step by step.
    All the actions described below are performed in the console (terminal window).

    1. Temporarily are take the root privileges for himself. For this execute the command: sudo -s.

    2. Create two new subdirectories in the directory /opt. We have agreed that their names will be the same as the programs themselves. For this execute the command: mkdir /opt/fr24feed and mkdir /opt/modesmixer2

    3. Copied executable program files, each into her corresponding directory: file fr24feed -> /opt/fr24feed/ and file modesmixer2 -> /opt/modesmixer2/. Check that all things are done right: the programs now really are in their place and have the necessary attributes to run.
    Check the attributes of the file: ls -l /opt/fr24feed/ and ls -l /opt/modesmixer2/. The results of these commands must be like:

    -rwxr-xr-x 1 root root 1687012 apr. 12 18:14 modesmixer2
    -rwxr-xr-x 1 root root 176272 apr. 23 15:19 fr24feed

    Notice, the date of the files and their sizes in your case will be other.


    At this stage with the executable files we have finished.

    4. Now go to the configuration directory. For this execute the command:
    cd /etc/supervisor/conf.d/

    5. Using any editor like nano, create two configuration mm-ebaw.conf and fr24-ebaw.conf files with the contents as shown above.

    6. Execute the command: supervisorctl stop all.

    7. Execute the command: supervisorctl reload all.

    8. Execute the command: supervisorctl status.

    9. Also, run the command: ps -ax and bring its results accurately here, please. The part of it where strings that contain: fr24feed and modesmixer2.

    10. Lower your rights in the system from root to a normal user - execute command: exit

    Thanks,
    sergsero
    Last edited by sergsero; 2014-07-29 at 07:14.

  5. #555
    Passenger koro's Avatar
    Join Date
    Jul 2014
    Location
    EBAW
    Posts
    30
    Hi Serge,

    Here some output... it seems that FR24 is running after i removed the --bs-ip and --bs-port....

    root@raspberrypi:/opt/modesmixer2# supervisorctl status
    fr24-ebaw RUNNING pid 2066, uptime 1:01:24
    mm-ebaw FATAL can't find command '/opt/modesmixer2/modesmixer2\xc2\xa0--inConnect\xc2\xa0192.168.1.170:10001\xc2\xa0--outServer\xc2\xa0msg:30003'
    root@raspberrypi:/opt/modesmixer2# ls
    modesmixer2 modesmixer2.readme
    root@raspberrypi:/opt/modesmixer2# modesmixer2 --inConnect 192.168.1.170:10001 --outServer msg:3003
    bash: modesmixer2: opdracht niet gevonden (NOT FOUND)
    root@raspberrypi:/opt/modesmixer2# ls -l /opt/modesmixer2/
    totaal 1448
    -rwxr-xr-x 1 root root 1474408 jun 16 20:01 modesmixer2
    -rwxr-xr-x 1 root root 5388 jun 16 19:59 modesmixer2.readme


    Quote Originally Posted by sergsero View Post
    Hi Ken,

    This message says that the supervisor does not find an executable program in this directory.
    Do you put it there beforehand?
    Or does not match the name of the file: we have configured fr24feed, but in reality his name fr24feed_arm-le_225s.

    In fr24-ebaw.conf in the string: command=/opt/fr24feed/fr24feed --fr24key=xxxxxxxxx --bs-ip=127.0.0.1 --bs-port=30003 its components must be separated by a space.
    At feedback message, which you give exemplify, this string contain unknown characters instead of a space:

    111.png



    If this does not resolve the problem, then let we once again will check all the stages of supervisor installation. Most likely all of the infrastructure you already have. Therefore, re-create it is not necessary. Just check it the step by step.
    All the actions described below are performed in the console (terminal window).

    1. Temporarily are take the root privileges for himself. For this execute the command: sudo -s.

    2. Create two new subdirectories in the directory /opt. We have agreed that their names will be the same as the programs themselves. For this execute the command: mkdir /opt/fr24feed and mkdir /opt/modesmixer2

    3. Copied executable program files, each into her corresponding directory: file fr24feed -> /opt/fr24feed/ and file modesmixer2 -> /opt/modesmixer2/. Check that all things are done right: the programs now really are in their place and have the necessary attributes to run.
    Check the attributes of the file: ls -l /opt/fr24feed/ and ls -l /opt/modesmixer2/. The results of these commands must be like:

    -rwxr-xr-x 1 root root 1687012 apr. 12 18:14 modesmixer2
    -rwxr-xr-x 1 root root 176272 apr. 23 15:19 fr24feed

    Notice, the date of the files and their sizes in your case will be other.


    At this stage with the executable files we have finished.

    4. Now go to the configuration directory. For this execute the command:
    cd /etc/supervisor/conf.d/

    5. Using any editor like nano, create two configuration mm-ebaw.conf and fr24-ebaw.conf files with the contents as shown above.

    6. Execute the command: supervisorctl stop all.

    7. Execute the command: supervisorctl reload all.

    8. Execute the command: supervisorctl status.

    9. Also, run the command: ps -ax and bring its results accurately here, please. The part of it where strings that contain: fr24feed and modesmixer2.

    10. Lower your rights in the system from root to a normal user - execute command: exit

    Thanks,
    sergsero
    Ken
    Near EBAW

  6. #556
    Passenger sergsero's Avatar
    Join Date
    Sep 2012
    Location
    UNNT
    Posts
    38
    Hi Ken,

    Yes, fr24feed now works. And modesmixer2 not.
    Why do you get these characters in a string? They are not there should be. They block the start of the program.

    bash: modesmixer2: opdracht niet gevonden (NOT FOUND) because when you start the program in the same directory where it is located, must used before the name yet ./. That is so:
    root@raspberrypi:/opt/modesmixer2#./modesmixer2 --inConnect 192.168.1.170:10001 --outServer msg:3003

    But this is irrelevant. You have instead of a space are unknown to me the characters that should not be. They are in line inside the configuration file /etc/supervisor/conf.d/mm-ebaw.conf: command=/opt/modesmixer2/modesmixer2 --inConnect 192.168.1.170:10001 --outServer msg:30003

    mm-ebaw FATAL can't find command '/opt/modesmixer2/modesmixer2\xc2\xa0--inConnect\xc2\xa0192.168.1.170:10001\xc2\xa0--outServer\xc2\xa0msg:30003'

    Remove them. And everything will work.



    May be re-type this line in the file mm-ebaw.conf: command=/opt/modesmixer2/modesmixer2 --inConnect 192.168.1.170:10001 --outServer msg:30003 in the manual. And divide its components by pressing on the keyboard the spacebar.

    [program:mm-ebaw]
    directory=/opt/modesmixer2
    command=/opt/modesmixer2/modesmixer2 --inConnect 192.168.1.170:10001 --outServer msg:30003
    user=nobody
    umask=022
    autostart=True
    autorestart=True
    redirect_stderr=True


    Here is the file with the correct spaces: mm-ebaw.conf. Download it for yourself and unzip to folder /etc/supervisor/conf.d/

    (by root with sudo -s)

    sergsero
    Last edited by sergsero; 2014-07-29 at 16:13.

  7. #557
    Passenger koro's Avatar
    Join Date
    Jul 2014
    Location
    EBAW
    Posts
    30
    Hi Sergsero,

    Seems to be working fine now... tnx for the effort...

    I added also --outServer SBS10001:10001 to see on another pc if i receive something, but i cannot connect via Basestation.

    Is there also a way to boot th pi without filling a password and username?
    So i can unconnect my keyboard, mouse and screen...

    Quote Originally Posted by sergsero View Post
    Hi Ken,

    Yes, fr24feed now works. And modesmixer2 not.
    Why do you get these characters in a string? They are not there should be. They block the start of the program.

    bash: modesmixer2: opdracht niet gevonden (NOT FOUND) because when you start the program in the same directory where it is located, must used before the name yet ./. That is so:
    root@raspberrypi:/opt/modesmixer2#./modesmixer2 --inConnect 192.168.1.170:10001 --outServer msg:3003

    But this is irrelevant. You have instead of a space are unknown to me the characters that should not be. They are in line inside the configuration file /etc/supervisor/conf.d/mm-ebaw.conf: command=/opt/modesmixer2/modesmixer2 --inConnect 192.168.1.170:10001 --outServer msg:30003

    mm-ebaw FATAL can't find command '/opt/modesmixer2/modesmixer2\xc2\xa0--inConnect\xc2\xa0192.168.1.170:10001\xc2\xa0--outServer\xc2\xa0msg:30003'

    Remove them. And everything will work.



    May be re-type this line in the file mm-ebaw.conf: command=/opt/modesmixer2/modesmixer2 --inConnect 192.168.1.170:10001 --outServer msg:30003 in the manual. And divide its components by pressing on the keyboard the spacebar.

    [program:mm-ebaw]
    directory=/opt/modesmixer2
    command=/opt/modesmixer2/modesmixer2 --inConnect 192.168.1.170:10001 --outServer msg:30003
    user=nobody
    umask=022
    autostart=True
    autorestart=True
    redirect_stderr=True


    Here is the file with the correct spaces: mm-ebaw.conf. Download it for yourself and unzip to folder /etc/supervisor/conf.d/

    (by root with sudo -s)

    sergsero
    Ken
    Near EBAW

  8. #558
    Passenger sergsero's Avatar
    Join Date
    Sep 2012
    Location
    UNNT
    Posts
    38
    Hi Ken,

    Quote Originally Posted by koro View Post
    Seems to be working fine now... tnx for the effort...

    I added also --outServer SBS10001:10001 to see on another pc if i receive something, but i cannot connect via Basestation.

    Is there also a way to boot th pi without filling a password and username?
    So i can unconnect my keyboard, mouse and screen...

    I think that we need to lower case for sbs in options: --outServer sbs10001:10001

    Then, in the settings BaseStation.exe, to specify the connection to the IP-address of Raspberry Pi and port 10001.


    If everything is configured correctly, RPi will started after power on via microUSB port. The supervisor will automatically start both programs: modesmixer2 and fr24feed with the desired options. Any of your participation will not be required.
    What you login to the system via the GUI interface, only adds additional work to the computer and not required for system.

    Thanks,
    sergsero
    Last edited by sergsero; 2014-07-30 at 15:37.

  9. #559
    Passenger koro's Avatar
    Join Date
    Jul 2014
    Location
    EBAW
    Posts
    30
    Hi Sergero,

    Thank you very much for all the help...
    Wheezy was complete new for me... and i didn't know how to start...
    I learned a lot...

    Hope to meet you some day...

    Quote Originally Posted by sergsero View Post
    Hi Ken,




    I think that we need to lower case for sbs in options: --outServer sbs10001:10001

    Then, in the settings BaseStation.exe, to specify the connection to the IP-address of Raspberry Pi and port 10001.


    If everything is configured correctly, RPi will started after power on via microUSB port. The supervisor will automatically start both programs: modesmixer2 and fr24feed with the desired options. Any of your participation will not be required.
    What you login to the system via the GUI interface, only adds additional work to the computer and not required for system.

    Thanks,
    sergsero
    Ken
    Near EBAW

  10. #560
    Captain
    Join Date
    Jan 2012
    Location
    Dudley area, UK
    Posts
    1,410
    I read this and wonder whay a simple shell scrip wasn't used with a cron @reboot job to start it - all the stuff setting up services is fairly complex for someone new to Linux - and it spreads the startup configuration int more places than may be needed.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •