4 Replies Latest reply on Feb 26, 2016 8:23 PM by Eduardo1742

    Intel Edison and BLE python library problems

    Eduardo1742

      Hi everyone,

       

      I'm trying to do an Health IoT aplication using an Bluetooth LE pulse Oximeter and the Intel Edison module.

       

      I did all the steps guided in "USING THE GENERIC ATTRIBUTE PROFILE (GATT) IN BLUETOOTH* LOW ENERGY WITH YOUR INTEL® EDISON BOARD" and I'm able to get a connection through gatttool comand line in perfect way as we can see in the picture bellow.

       

      imagem conexão bluetooh normal mode.png

       

      But, when Im trying to connect my Edison to the Pulse Oximeter using the python exemple for the TI sensor tag (I know that I need to change some line of codes but I think this is not the big problem), I'm getting an "permission denied" error and as I know, I have the permissions.

       

      imagem conexão bluetooh permissions.png

       

      If I type "root@edison:~/ble-sensor-pi-master/sensortag# python sensortag_test.py 84:EB:18:6B:01:A6", I get "ImportError: No module named pexpect"

       

      The way that is presented in the guide didn't worked well (I think the last command is wrong), so I did as explained before and also we can see in the picture bellow.

       

      imagem conexão bluetooh python exemple mode.png

       

      Someone can help me about what I'm doing wrong to get this errors?

       

      Another question is how I can do a simple python library to make this connection between Edison and the BLE Pulse Oximeter?

       

      Ps: I'm using the version 159.devkit

            I did all the steps above, even reflashing the board, a couple off times

       

       

      Best regards

      Eduardo.

        • 1. Re: Intel Edison and BLE python library problems
          Intel_Peter

          Hello Eduardo1742,

           

          Have you tried changing the file's permissions with chmod +x or chmod 777, does it make a difference or does it show the same message?

           

          Peter.

          1 of 1 people found this helpful
          • 2. Re: Intel Edison and BLE python library problems
            Eduardo1742

            Hi Intel_Peter

             

            I did your sujestion and know I'm getting the error "ImportError: No module named pexpect" in two ways: Typing python sensortag_test.py 84:EB:18:6B:01:A6 or typing ./sensortag_test.py 84:EB:18:6B:01:A6. The pictures bellow show this.

            Picture before to change the permissions:

            image before to change the permissions.png

            Picture after change the permissions:

            imagem after change the permissions.png

            Picture command line:

            image comands problems.png

             

            As I did all steps described in the tutorial mentioned before, I thought all archives were in the right directory, but I can see this is not true.

            There are some way to check if the pexpect is installed on my Edison?

             

            Ps. The python sensortag_test.py is on this link (just to check).

                  Sorry but I'm a bit new in embedded linux.

             

            Thanks.

            Eduardo.

            • 3. Re: Intel Edison and BLE python library problems
              Intel_Peter

              I doubt your Edison has pexpect installed since it does not come installed by default on Edison's standard image. So, the issue probably appears because you are missing it. Follow these steps to install it:

               

              echo src/gz all http://repo.opkg.net/edison/repo/all >  /etc/opkg/base-feeds.conf
              echo src/gz edison http://repo.opkg.net/edison/repo/edison >> /etc/opkg/base-feeds.conf
              echo src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32 >> /etc/opkg/base-feeds.conf
              opkg update
              opkg install python-pip
              pip install pexpect
              

               

              Let me know if any other issue appears after this.

               

              Peter.

              1 of 1 people found this helpful
              • 4. Re: Intel Edison and BLE python library problems
                Eduardo1742

                Hi Intel_Peter

                 

                I did your sujestions and everything is perfetc now. Thanks a lot for you help