Flic Home

    Community

    • Login
    • Search
    • Popular
    • Users

    Raspberry pi button does not work on reboot

    Developers
    3
    7
    1010
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • schenkl
      schenkl last edited by

      Greetings all:
      I love the SDK! It is working well with my raspberry pi zero, however I have one problem. I can pair a button, but when I reboot, I have to manually repair the button. I have started flicd with -v -d and that is running OK. Since I'm running the raspberry pi headless, is difficult to pair the button manually each time the system reboots. Any suggestions are appreciated.

      Thanks!

      schenkl 1 Reply Last reply Reply Quote 0
      • laurence.schenk
        laurence.schenk last edited by

        I have figured it out. When I started flicd through /etc/rc.local it was running as root with no environmental variables, and the data of the buttons was stored in the root directory. When I ran the exact same command as user pi, the environmental variables were set, PATH, USER etc. The fix was simple: use full path names for the data base file.
        My apologies for wasting your time when the error was mine.

        1 Reply Last reply Reply Quote 0
        • Emil
          Emil FlicTeam @schenkl last edited by

          @schenkl Where did you read about the -v option? There is no such thing. See the official readme at https://github.com/50ButtonsEach/fliclib-linux-hci/blob/master/README.md#usage-of-flicd. You could also give an absolute path for the db file to avoid it ending up at a wrong place.

          1 Reply Last reply Reply Quote 0
          • schenkl
            schenkl @Emil last edited by

            @Emil
            I start flicd with /etc/rc.local command
            "/home/pi/flic/fliclib-linux-hci/bin/armv6l/flicd -f sqlite_db_file.db -v -d"

            I use the -v flag as i had read that keeps the buttons registered. But for some reason, flicd is not running after boot. If I manually run "sudo /etc/rc.local" I see an error,
            "invalid option -- 'v'". flicd is running ok, but no buttons show up. I can re-register them with simpleclient, but I need to re-register them every time I boot. So maybe I am erasing the sqlite_db_file.db file? How do I make sure that I save it?
            Thanks for your help!

            Emil 1 Reply Last reply Reply Quote 0
            • Emil
              Emil FlicTeam @schenkl last edited by

              @schenkl I still don't follow. Flicd never initiates connections if you don't ask it to. You need to create a connection channel for a specific button in order to connect to it. Do you do this?

              1 Reply Last reply Reply Quote 0
              • schenkl
                schenkl @schenkl last edited by

                Update: after further testing, the issue is that if flicd is restarted then it does not connect with the button; but with a boot then flicd works as expected.....
                sorry for the incorrect information...

                Emil 1 Reply Last reply Reply Quote 0
                • Emil
                  Emil FlicTeam last edited by

                  Do you erase the database file on every reboot?
                  How have you written your code? Do you extract the paired buttons when you connect to the flicd?

                  Some more info would be good.

                  schenkl 1 Reply Last reply Reply Quote 0
                  • First post
                    Last post