Community
cancel
Showing results for 
Search instead for 
Did you mean: 
EAvel
Novice
1,036 Views

Intel Edison and BLE python library problems

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 "https://software.intel.com/en-us/articles/using-the-generic-attribute-profile-gatt-in-bluetooth-low-... 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.

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.

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.

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.

Tags (1)
4 Replies
Pedro_M_Intel
Employee
119 Views

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.

EAvel
Novice
119 Views

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:

Picture after change the permissions:

Picture command line:

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 thishttps://github.com/msaunby/ble-sensor-pi/blob/master/sensortag/sensortag_test.py link (just to check).

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

Thanks.

Eduardo.

Pedro_M_Intel
Employee
119 Views

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 http://repo.opkg.net/edison/repo/all > /etc/opkg/base-feeds.conf

echo src/gz edison http://repo.opkg.net/edison/repo/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 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.

EAvel
Novice
119 Views

Hi Intel_Peter

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

Reply