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.
This might help with that error:
Dave.
Thanks @damies13 . I tried out with pybluez for getting connection error. I will try with bleak as suggested by you and update it.
@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.