iOS Question Ble Write data issue with Tinysine Module

billchapp

Member
Licensed User
Longtime User
Having an issue trying to write data to a Tinysine BLE module.
I read successfully but every attempt to write results in this log error.
"Error writing value for characteristic: FFE1"

Here's the code I'm using to write with.

Dim tx As String = "Test"
Dim dt() As Byte
dt = tx.GetBytes("UTF8")
manager.WriteData(ConnectedServices.Get(0),"FFE1",dt)

Thanks in Advance
Bill
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've uploaded a new binary of iBLE. It should now include the error message in the logs. If you are using the hosted builder just press on Ctrl + P to clean the project and run it again.

If you are using a local builder then you need to download the attached file and copy libiBLE.a to the Libs folder.
 

Attachments

  • iBLE.zip
    47.9 KB · Views: 348
Upvote 0

billchapp

Member
Licensed User
Longtime User
Erel,

Thanks That helped ...
I see the complete error now,
Error writing value for characteristic: FFE1, error: Error Domain=CBATTErrorDomain Code=3
"Writing is not permitted." UserInfo={NSLocalizedDescription=Writing is not permitted.}

Just have to figure out what I need to do to make writing permitted with this device, I know other BLE programs I've tried can write to the TinySine.

is there a way to change the UserInfo ?

Again, thank you!
 
Last edited:
Upvote 0
D

Deleted member 103

Guest
I also have the same problem now. :(

B4X:
Error writing value for characteristic: FFE1

I think it has yet worked before.o_O
 
Upvote 0

billchapp

Member
Licensed User
Longtime User
looks like the issue maybe in setting attribute for "Type:CBCharacteristicWriteWithoutResponse"

Though I'm not versed enough in b4i to know where to start to make the change.
Erel, has made a change to iBLE 1.25 that passes more error information.

I know this module can read and write using several other apps written in iOS
so I'm hopeful this will be able to be resolved.


Filippo , Is it possible that this worked in 1.20 and not in 1.25 ?
-Bill
 
Upvote 0

Turbo3

Active Member
Licensed User
Longtime User
My app seems to require the original setting as I expect a response from my writes. After this change my app no longer works. I would have preferred you made a new version of WriteData with a new name rather than just change the original WriteData and risk breaking current working apps. But now that you have done it I need the original back for my app to work. So I guess the only option is to put the original back and call it WriteData2.

This is very unfortunate as I had released my app on TestFight and had it fully tested by my users but now that you have made this change new compiles with this updated iBLE library now fail. So all my testing needs to be redone. I now suspect the released version I uploaded to iTunes for review is defective as it was done on Saturday. I was hoping to beat the Dec 22 deadline for release this year but that is now in doubt.
 
Upvote 0

billchapp

Member
Licensed User
Longtime User
Turbo3, Erel ;

Sorry about the issue with your app, hopefully Erel can roll it back so you can publish your app without re-test.
Then release a new version with the change. To accommodate both options.

Possibly add "CBCharacteristicWriteWithoutResponse" or "CBCharacteristicWriteWithResponse"
As an option, It might end any confusion going forward.
 
Upvote 0
Top