omz / Pythonista-Issues

Issue tracker for Pythonista (iOS)
169 stars 14 forks source link

Bluetooth write_characteristic_value fails #699

Open FireTime opened 1 year ago

FireTime commented 1 year ago

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

firmum-main commented 1 year ago

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 .

sonnenwind commented 1 year ago

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..

kami83 commented 1 year ago

Same problem here. Please make an Update.

BR kami

mdxs commented 1 year ago

@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.

FireTime commented 1 year ago

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

kami83 commented 10 months ago

Hi, anything new for this?

BR kami

Cronocide commented 10 months ago

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.

alessaba commented 10 months ago

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 :-)

kami83 commented 10 months ago

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

fakuoone commented 8 months ago

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

FireTime commented 8 months ago

Still not working.

kami83 commented 8 months ago

Also waiting.

FireTime commented 6 months ago

🎂

1 year

kami83 commented 6 months ago

Happy Birthday :) Please fix it. BR kami

paulhamsh commented 3 months ago

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

jhershbe commented 1 month ago

How is this still broken? Is pythonista not maintained anymore? Maybe the project is dead.

I assume there are no work-arounds given this thread.

brunobeat commented 3 weeks ago

PY_SSIZE_T_CLEAN Please fix this or is there any solution possible to define macro ? Thanks in advance

FireTime commented 3 weeks ago

No work arounds are available. Issue can only be fixed by @omz .