BLE - I can connect to the HM-10 and send a string that is received by the Arduino.
But when I want to read the answer, I get this:
[7] FFE1 -> <B4IArray: 0x302681620>
}
b: <B4IArray: 0x302681620>
<B4IExceptionWrapper: Error Domain=caught_exception Code=0 "Error decoding data as string." UserInfo={NSLocalizedDescription=Error decoding data as string.}>
(empty string)
Service: FFE0
Characteristics: NSMapTable {
[7] FFE1 -> <B4IArray: 0x3026a6e80>
}
b: <B4IArray: 0x3026a6e80>
<B4IExceptionWrapper: Error Domain=caught_exception Code=0 "Error decoding data as string." UserInfo={NSLocalizedDescription=Error decoding data as string.}>
(empty string)
Error occurred on line: 135 (Main)
Error decoding data as string.
Stack Trace: (
CoreFoundation 76A3B198-3C09-323E-8359-0D4978E156F5 + 540460
libobjc.A.dylib objc_exception_throw + 60
CoreFoundation 76A3B198-3C09-323E-8359-0D4978E156F5 + 1582812
B4i Example -[B4ICommon BytesToString::::] + 256
CoreFoundation 76A3B198-3C09-323E-8359-0D4978E156F5 + 133140
CoreFoundation 76A3B198-3C09-323E-8359-0D4978E156F5 + 129120
B4i Example +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1296
B4i Example -[B4IShell runMethod:] + 420
B4i Example -[B4IShell raiseEventImpl:method:args::] + 1472
B4i Example -[B4IShellBI raiseEvent:eventarams:] + 1360
B4i Example +[B4IObjectWrapper raiseEvent:::] + 252
B4i Example -[BlePeripheralDel peripheral:didUpdateValueForCharacteristic:error:] + 1276
CoreBluetooth EB37030C-8025-357A-9956-6732E0E47DC2 + 305920
CoreBluetooth EB37030C-8025-357A-9956-6732E0E47DC2 + 306224
CoreBluetooth EB37030C-8025-357A-9956-6732E0E47DC2 + 292740
CoreBluetooth EB37030C-8025-357A-9956-6732E0E47DC2 + 26288
CoreBluetooth EB37030C-8025-357A-9956-6732E0E47DC2 + 26076
CoreBluetooth EB37030C-8025-357A-9956-6732E0E47DC2 + 25736
libdispatch.dylib 5F66CDB6-08A9-3615-8C6A-4E3B47005495 + 8508
libdispatch.dylib 5F66CDB6-08A9-3615-8C6A-4E3B47005495 + 15828
libdispatch.dylib 5F66CDB6-08A9-3615-8C6A-4E3B47005495 + 46080
libdispatch.dylib 5F66CDB6-08A9-3615-8C6A-4E3B47005495 + 48996
libdispatch.dylib 5F66CDB6-08A9-3615-8C6A-4E3B47005495 + 74932
libdispatch.dylib _dispatch_main_queue_callback_4CF + 44
CoreFoundation 76A3B198-3C09-323E-8359-0D4978E156F5 + 354064
CoreFoundation 76A3B198-3C09-323E-8359-0D4978E156F5 + 342292
CoreFoundation CFRunLoopRunSpecific + 608
GraphicsServices GSEventRunModal + 164
UIKitCore 9DA0D273-5506-3712-B73D-E0149D74C13C + 4238056
UIKitCore UIApplicationMain + 340
B4i Example main + 100
dyld 52039C94-4DA1-3638-BD52-020A0B5FA399 + 250196
)
Any suggestions, what am I doing wrong?
THKS for help!
But when I want to read the answer, I get this:
[7] FFE1 -> <B4IArray: 0x302681620>
}
b: <B4IArray: 0x302681620>
<B4IExceptionWrapper: Error Domain=caught_exception Code=0 "Error decoding data as string." UserInfo={NSLocalizedDescription=Error decoding data as string.}>
(empty string)
Service: FFE0
Characteristics: NSMapTable {
[7] FFE1 -> <B4IArray: 0x3026a6e80>
}
b: <B4IArray: 0x3026a6e80>
<B4IExceptionWrapper: Error Domain=caught_exception Code=0 "Error decoding data as string." UserInfo={NSLocalizedDescription=Error decoding data as string.}>
(empty string)
Error occurred on line: 135 (Main)
Error decoding data as string.
Stack Trace: (
CoreFoundation 76A3B198-3C09-323E-8359-0D4978E156F5 + 540460
libobjc.A.dylib objc_exception_throw + 60
CoreFoundation 76A3B198-3C09-323E-8359-0D4978E156F5 + 1582812
B4i Example -[B4ICommon BytesToString::::] + 256
CoreFoundation 76A3B198-3C09-323E-8359-0D4978E156F5 + 133140
CoreFoundation 76A3B198-3C09-323E-8359-0D4978E156F5 + 129120
B4i Example +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1296
B4i Example -[B4IShell runMethod:] + 420
B4i Example -[B4IShell raiseEventImpl:method:args::] + 1472
B4i Example -[B4IShellBI raiseEvent:eventarams:] + 1360
B4i Example +[B4IObjectWrapper raiseEvent:::] + 252
B4i Example -[BlePeripheralDel peripheral:didUpdateValueForCharacteristic:error:] + 1276
CoreBluetooth EB37030C-8025-357A-9956-6732E0E47DC2 + 305920
CoreBluetooth EB37030C-8025-357A-9956-6732E0E47DC2 + 306224
CoreBluetooth EB37030C-8025-357A-9956-6732E0E47DC2 + 292740
CoreBluetooth EB37030C-8025-357A-9956-6732E0E47DC2 + 26288
CoreBluetooth EB37030C-8025-357A-9956-6732E0E47DC2 + 26076
CoreBluetooth EB37030C-8025-357A-9956-6732E0E47DC2 + 25736
libdispatch.dylib 5F66CDB6-08A9-3615-8C6A-4E3B47005495 + 8508
libdispatch.dylib 5F66CDB6-08A9-3615-8C6A-4E3B47005495 + 15828
libdispatch.dylib 5F66CDB6-08A9-3615-8C6A-4E3B47005495 + 46080
libdispatch.dylib 5F66CDB6-08A9-3615-8C6A-4E3B47005495 + 48996
libdispatch.dylib 5F66CDB6-08A9-3615-8C6A-4E3B47005495 + 74932
libdispatch.dylib _dispatch_main_queue_callback_4CF + 44
CoreFoundation 76A3B198-3C09-323E-8359-0D4978E156F5 + 354064
CoreFoundation 76A3B198-3C09-323E-8359-0D4978E156F5 + 342292
CoreFoundation CFRunLoopRunSpecific + 608
GraphicsServices GSEventRunModal + 164
UIKitCore 9DA0D273-5506-3712-B73D-E0149D74C13C + 4238056
UIKitCore UIApplicationMain + 340
B4i Example main + 100
dyld 52039C94-4DA1-3638-BD52-020A0B5FA399 + 250196
)
Any suggestions, what am I doing wrong?
THKS for help!