Replies: 16 comments 9 replies
-
Hi @kevincar could you have a look into this please? Thanks for you support |
Beta Was this translation helpful? Give feedback.
-
Since this doesn't appear to be an issue just yet, let's move this to a discussion |
Beta Was this translation helpful? Give feedback.
-
Hi @kevincar thanks for response. I cannot judge whether this is an issue or not I'd be glad to know what to do that myServiceName is seen as the FTMS DeviceName. |
Beta Was this translation helpful? Give feedback.
-
For your main question for how to set those characteristics using a generic attribute profile tree, you can do something like the following: # Instantiate the server
gatt: Dict = {
"<YOUR SERVICE UUID>": {
"00002a00-0000-1000-8000-00805f9b34fb": { # <-- Characteristic IDs are the Key names
"Properties": (GATTCharacteristicProperties.read |
GATTCharacteristicProperties.indicate),
"Permissions": (GATTAttributePermissions.readable),
"Value": "My Device Name"
},
"00002a01-0000-1000-8000-00805f9b34fb": {
"Properties": (GATTCharacteristicProperties.read |
GATTCharacteristicProperties.indicate),
"Permissions": (GATTAttributePermissions.readable),
"Value": "My Appearance UUID"
}
}
}
my_service_name = "Test Service"
server = BlessServer(name=my_service_name, loop=loop)
await server.add_gatt(gatt)
await server.start() |
Beta Was this translation helpful? Give feedback.
-
Thanks, will try asap. |
Beta Was this translation helpful? Give feedback.
-
Hi @kevincar I have tried a series of experiments, as explained below. Behaviour on Windows and Raspberry is different:
I have the impression that the underlaying libraries need a call to create the General Access Profile, but I have no knowledge at that level.
|
Beta Was this translation helpful? Give feedback.
-
Hi @kevin, thanks for being with me.
I hope this helps in understanding my issue. |
Beta Was this translation helpful? Give feedback.
-
Hi @kevincar #77 contains the code to reproduce the issue; I hope you find time to give it a glance. |
Beta Was this translation helpful? Give feedback.
-
I use version= "0.2.3" I also downloaded (As in bleak: |
Beta Was this translation helpful? Give feedback.
-
Below two FTMSserver.py instances, one running on Windows (LT-T430) and the other on raspberry. I have upgraded the raspberry with command |
Beta Was this translation helpful? Give feedback.
-
I'm getting closer, but not there yet. When the DeviceId should be different from the hostname, this article helps. But still, on raspberry the ADDRESS is shown in the list of devices and not the PRETTY_HOSTNAME. The ennoying thiung is that, when using NodeJS, the correct name is displayed AND it even remains present when switching to bless. So it seems some system- or (session-) level setting. Will keep you posted.
Could you please suggest HOW to change the Generic Access Profile characteristics through bless, I have tried multiple ways but no success yet. |
Beta Was this translation helpful? Give feedback.
-
My results for today: This article provides usefull information to change the DeviceID on raspberry and that works. But there is also something like the "Local Name" which is not the same as the DeviceID, see below screenshots. "Unnamed" is not very elegant and it seems something is left uninitialized. On raspberry, there is no local device name although the DeviceID is available: On windows, the local device name is also filled with the hostname (LT-T430): |
Beta Was this translation helpful? Give feedback.
-
Good news, I will test Monday evening👍👍 |
Beta Was this translation helpful? Give feedback.
-
Sorry for taking so long. With modified access rights, I can test. If this is what is possible, please let me know - I can live with it and the users of FortiusAnt also can. |
Beta Was this translation helpful? Give feedback.
-
Description
BlessServer(name=myServiceName, loop=self.loop)
creates the BlessServer;application services are added with
self.BlessServer.add_gatt(myGattDefinition)
What is already working
The service is created and can be inspected (using bleak) and the Generic Access Profile is present (it's not in the myGattDefinition) so it appears to be created implicitly:
rpiServer is the HOSTNAME of the computer, not the name provided to the BlessServer-creation,
What is NOT yet working --- QUESTION:
How to set the two characteristics:
?
Beta Was this translation helpful? Give feedback.
All reactions