Pythonista-Issues icon indicating copy to clipboard operation
Pythonista-Issues copied to clipboard

Bluetooth write_characteristic_value fails

Open FireTime opened this issue 2 years ago • 18 comments

Bug in Core Bluetooth fails with PY_SSIZE_T_CLEAN macro must be defined for '#' formats whenever write_characteristic_value is called

FireTime avatar May 09 '23 01:05 FireTime

Running into the same issue.

PY_SSIZE_T_CLEAN indicates that @omz needs to update the cb module to account for an interface change introduced with python 3.10. The documentation seems to be https://docs.python.org/3/c-api/arg.html#strings-and-buffers .

firmum-main avatar Jun 01 '23 20:06 firmum-main

An update would be very much appreciated! At the current state, I cannot use my Bluetooth serial adapter with my iPad which I used to check the state on various devices..

sonnenwind avatar Jun 12 '23 08:06 sonnenwind

Same problem here. Please make an Update.

BR kami

kami83 avatar Sep 05 '23 15:09 kami83

@omz @zrzka @cclaus Please fix this; the hint provided in the comments before hopefully helps. In my experience it was also due to some iPadOS update, which broke my scripts that help my customers use BLE to operate/test devices; currently, my customers are instructed not to update iPadOS or Pythonista, but this is getting critical. If not addressed, I will stop using Pythonista and will need to provide my customers with some custom Apps to operate/test BLE devices instead.

Testing with Pythonista 3.4 on iPadOS 17.1 shows the PY_SSIZE_T_CLEAN macro must be defined for '#' formats system error message when my script tries to write to the BLE device; it does work on scanning for devices, it can connect and discover services; and it can read using BLE; it is on the write that the error occurs.

mdxs avatar Nov 04 '23 23:11 mdxs

The issue is the core Bluetooth library needs to be updated to be compatible with python 3.10. Relevant python docs here.

FireTime avatar Nov 06 '23 03:11 FireTime

Hi, anything new for this?

BR kami

kami83 avatar Jan 15 '24 10:01 kami83

Following this thread just in case this ever gets fixed. If CoreBluetooth write isn't fully implemented, it shouldn't really be listed as a feature of the app on the app store.

Cronocide avatar Jan 21 '24 08:01 Cronocide

Following this thread just in case this ever gets fixed. If CoreBluetooth write isn't fully implemented, it shouldn't really be listed as a feature of the app on the app store.

I am pretty sure it was working before the latest update. Probably a combination of module upgrades That's a useful but not very used feature, i can understand that some regressions can be missed when releasing an update, just be patient.

I am having the same problem, i will wait for an update :-)

alessaba avatar Jan 22 '24 18:01 alessaba

Hi, you are right, in the last version it was working. Is there any way to downgrade? I need this function really often. Because i have got a lot of script for Bluetooth recieve and send. BR kami

kami83 avatar Jan 23 '24 07:01 kami83

As far as I know, no update yet? Or am I mistaken

fakuoone avatar Mar 19 '24 19:03 fakuoone

Still not working.

FireTime avatar Mar 19 '24 19:03 FireTime

Also waiting.

kami83 avatar Mar 20 '24 08:03 kami83

🎂

1 year

FireTime avatar May 08 '24 08:05 FireTime

Happy Birthday :) Please fix it. BR kami

kami83 avatar May 08 '24 08:05 kami83

Please fix this or explain how to downgrade or use some other library - this is very frustrating as this was my main use of Pythonista

paulhamsh avatar Aug 25 '24 23:08 paulhamsh