Not able to install BLE Library in Pycharm

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?

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 with that name which would explain the error your getting, as pip gets it’s packages from pypi.org.

Dave.

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.

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

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 looks like a dead project
  • pycom module looked promising until I saw it’s only supported on MicroPython for embedded systems
  • 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.

1 Like

This might help with that error:

Dave.

1 Like

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

1 Like

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

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.

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.