• Popular
  • Users
  • Login
Flic Home

Community

  • Login
  • Search
  • Popular
  • Users

Raspberry pi button does not work on reboot

Developers
3
7
1.6k
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 27 Mar 2020, 09:54

    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 28 Mar 2020, 00:40 Reply Quote 0
    • laurence.schenk
      laurence.schenk last edited by 2 Apr 2020, 12:39

      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 31 Mar 2020, 18:57

        @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 31 Mar 2020, 16:25

          @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 31 Mar 2020, 18:57 Reply Quote 0
          • Emil
            Emil FlicTeam @schenkl last edited by 29 Mar 2020, 17:47

            @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 28 Mar 2020, 00:40

              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 29 Mar 2020, 17:47 Reply Quote 0
              • Emil
                Emil FlicTeam last edited by 27 Mar 2020, 10:31

                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 31 Mar 2020, 16:25 Reply Quote 0
                1 out of 7
                • First post
                  1/7
                  Last post