@cvp ok, I think I am starting to grab the idea. Thank you for your help. I’ll try my best for a couple of days and come back again with the/any(?) results.
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Latest posts made by gsot96
-
RE: Broadening of cb module with implementation of more methods from CoreBluetooth?
-
RE: Broadening of cb module with implementation of more methods from CoreBluetooth?
@cvp I tried using:
from objc_util import *
load_framework('CoreBluetooth')as you suggested. The question is (and don’t forget that I am very new in programming), how should I continue? The original CoreBluetooth framework is written in ObjC and in Swift. Hence, documentation is available for these two languages only.
How can I see the the classes and functions (in python language) that become available when using the “load_framework(‘CoreBluetooth’) line you suggested?
“print(dir(CoreBluetooth))” results in
NameError: name 'CoreBluetooth' is not defined -
RE: Broadening of cb module with implementation of more methods from CoreBluetooth?
Thank you for you replies!
Indeed, Pyto has access to the CoreBluetooth module but, for the time being, it cannot utilise the iPad’s (or iPhone’s) bluetooth functionality.However, I modified a script for a BLE device scanner that I found on GitHub, in the Pyto environment, with a view to merely test if it is possible to write code and access the CoreBluetooth library (I knew that eventually, I wouldn’t be able to utilize my device’s BlueTooth functionality from within Pyto). But I am getting the error “CBCentralManager is not defined”, even though you can see from
print(dir(CoreBluetooth))
that ‘CBCentralManager’ is actually a part of the CoreBluetooth library that I just imported.
screenshot on link -
Broadening of cb module with implementation of more methods from CoreBluetooth?
I am a beginner in programming. Started with python. I want to use Pythonista to write code for an iOS/iPadOs app that uses RSSI of a BLE device. However readRSSI is not contained in the cb module in Pythonista. It would be great if this module was expanded to include more methods, functions, classes etc from the official Apple CoreBluetooth library. Does anyone have an alternative way that I can achieve reading the RSSI by using only Pythonista programming environment?