# Not able to install BLE Library in Pycharm

**URL:** <https://forum.robotframework.org/t/not-able-to-install-ble-library-in-pycharm/6681>\
**Category:** PyCharm\
**Created:** [19 January 2024 09:06 UTC](https://forum.robotframework.org/t/not-able-to-install-ble-library-in-pycharm/6681 "2024-01-19T09:06:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soma](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Soma](https://forum.robotframework.org/u/Soma)\
**Post date:** [19 January 2024 09:06 UTC](https://forum.robotframework.org/t/not-able-to-install-ble-library-in-pycharm/6681/1 "2024-01-19T09:06:22Z")

</div>

Hi all,  
Please help me to create BLE related tests as Im new to Robot framework. Tried installing BLE Library from Pycharm plugins, not able to find and also tried installing using below command  
udo pip3 install robotframework-blelibrary  
ERROR: Could not find a version that satisfies the requirement robotframework-blelibrary (from versions: none)  
ERROR: No matching distribution found for robotframework-blelibrary  
**Robot framework version 7.0 and python 3.10.12**  
Could someone help me on this?

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [19 January 2024 09:33 UTC](https://forum.robotframework.org/t/not-able-to-install-ble-library-in-pycharm/6681/2 "2024-01-19T09:33:13Z")

</div>

Hi @Soma,

Can you provide a link to this BLE Library?

I did a quick google search, and couldn’t find it.

Also there is nothing on [pypi.org](http://pypi.org) with that name which would explain the error your getting, as pip gets it’s packages from [pypi.org](http://pypi.org).

Dave.

---

<div class="post-metadata">

**Author:** ![Soma](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Soma](https://forum.robotframework.org/u/Soma)\
**Post date:** [19 January 2024 10:09 UTC](https://forum.robotframework.org/t/not-able-to-install-ble-library-in-pycharm/6681/3 "2024-01-19T10:09:50Z")

</div>

Hi @damies13 , Thanks for the replt .I got to know that , there is no builtin Library for Bluetooth . Trying to create lib python file for bluetooth in robot framework and trying to call that in robot file with the path.

---

<div class="post-metadata">

**Author:** ![Soma](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Soma](https://forum.robotframework.org/u/Soma)\
**Post date:** [19 January 2024 10:17 UTC](https://forum.robotframework.org/t/not-able-to-install-ble-library-in-pycharm/6681/4 "2024-01-19T10:17:57Z")

</div>

But Im seeing this error ,while executing my bluetooth robot test. **“SystemError: PY\_SSIZE\_T\_CLEAN macro must be defined for ‘#’ formats”**. Used Robot framework 7.0 and Python 3.10 versions

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [19 January 2024 10:40 UTC](https://forum.robotframework.org/t/not-able-to-install-ble-library-in-pycharm/6681/5 "2024-01-19T10:40:44Z")

</div>

> [@Soma](#):
>
> Trying to create lib python file for bluetooth in robot framework

I’ll wish you good luck with that, from my quick searching bluetooth modules in python don’t look that well supported, here’s what I found, hope it helps

- [pybluez](https://github.com/pybluez/pybluez) looks like a dead project
- [pycom module](https://docs.pycom.io/tutorials/networks/ble/) looked promising until I saw it’s only supported on MicroPython for embedded systems
- [bleak](https://github.com/hbldh/bleak) looks like your best bet but it looks like it’ll only work with newer systems

I can help point you to the robot framework documentation for building Libraries in python if you haven’t found it already.

Also down the track when you’ve got a working library, I and others here can help with publishing to pypi if you need.

I’ve not done any programming with bluetooth devices so I won’t be able to help much there.

Dave.

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [19 January 2024 10:42 UTC](https://forum.robotframework.org/t/not-able-to-install-ble-library-in-pycharm/6681/6 "2024-01-19T10:42:24Z")

</div>

> [@Soma](#):
>
> **“SystemError: PY\_SSIZE\_T\_CLEAN macro must be defined for ‘#’ formats”**

This might help with that error:

> <https://stackoverflow.com/questions/70705404/systemerror-py-ssize-t-clean-macro-must-be-defined-for-formats>

Dave.

---

<div class="post-metadata">

**Author:** ![Soma](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Soma](https://forum.robotframework.org/u/Soma)\
**Post date:** [22 January 2024 09:44 UTC](https://forum.robotframework.org/t/not-able-to-install-ble-library-in-pycharm/6681/7 "2024-01-22T09:44:58Z")

</div>

Thanks @damies13 . I tried out with pybluez for getting connection error. I will try with bleak as suggested by you and update it.

---

<div class="post-metadata">

**Author:** ![Soma](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Soma](https://forum.robotframework.org/u/Soma)\
**Post date:** [22 January 2024 11:32 UTC](https://forum.robotframework.org/t/not-able-to-install-ble-library-in-pycharm/6681/8 "2024-01-22T11:32:29Z")

</div>

@damies13 One more query , do we require any hardware device or mobile device is fine to connect and validate the tests.?

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [22 January 2024 11:47 UTC](https://forum.robotframework.org/t/not-able-to-install-ble-library-in-pycharm/6681/9 "2024-01-22T11:47:23Z")

</div>

Hi Soma,

As I mentioned, I’ve not done anything like this, so I’m not sure, I guess you’ll have to try and find out? But I expect you’d need Bluetooth hardware in the machine running the tests?

Dave.

---

<div class="post-metadata">

**Author:** ![Soma](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Soma](https://forum.robotframework.org/u/Soma)\
**Post date:** [22 January 2024 12:04 UTC](https://forum.robotframework.org/t/not-able-to-install-ble-library-in-pycharm/6681/10 "2024-01-22T12:04:13Z")

</div>

Thanks @Dave. Tried out using mobile device alone with bleak python standalone script (not trying it with robot framework) to connect and pairing mobile device but seeing error asyncio.exceptions.CancelledError . Im suspecting there has to be seperate bluetooth hardware device as you said. Will try to explore on this.
