question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error writing value

See original GitHub issue

I am trying to write value so that I could turn on my led using HM-10 module.

I did the following steps: import { stringToBytes } from 'convert-string'; const data = stringToBytes('on');

writeValue(){
  BleManager.write('831827FC-8553-9E32-9DB0-BCCE941AC99F', 'FFE1', data)
  .then(() => {
    // Success code
    console.log('Write: ' + data);
  })
  .catch((error) => {
    // Failure code
    console.log(error);
  });
}

When I call this method, I get an error saying JSON value'(111,110)' of type NSMutableArray cannot be converted to NSString

What I am trying to do is pass on as a data to the ble module. Could anyone help?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
marcosinigagliacommented, Jan 25, 2019

Hi @kirhim , please check the documentation, you are missing a parameter.

0reactions
ankushdec1993commented, Feb 25, 2020

Hi Marco,

Can you send me the format of data that i should be sending like an example(not the complete code only the data that we send)?

On Tue, Feb 25, 2020 at 4:53 PM Ankush Shetty ankush@codewave.com wrote:

But its still not working

On Tue, Feb 25, 2020 at 4:50 PM Ankush Shetty ankush@codewave.com wrote:

Im sending the data like that shred in the image below

On Tue, Feb 25, 2020 at 4:48 PM Marco Sinigaglia < notifications@github.com> wrote:

https://github.com/innoveit/react-native-ble-manager#writeperipheralid-serviceuuid-characteristicuuid-data-maxbytesize

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/innoveit/react-native-ble-manager/issues/455?email_source=notifications&email_token=AI5C6HQ2SRYR2IGAHRPKD3TRET5BDA5CNFSM4GSJAWC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM3SRJA#issuecomment-590817444, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI5C6HTVCUUQ4HVEWBJDWRTRET5BDANCNFSM4GSJAWCQ .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error writing the value's new contents Windows 10 registry [FIX]
If you are getting an error writing the value's new contents in Registry Editor, it might be because you don't have the required...
Read more >
How to Gain Full Permissions to Edit Protected Registry Keys
In Registry Editor, right-click the key that you can't edit (or the key that contains the value you can't edit) and then choose...
Read more >
Error Writing the values New contents in Registry - How to Fix ...
Error Writing the values New contents in Registry - How to Fix on Windows [Tutorial] · 1) Press Windows + R Keys ·...
Read more >
Regedit in Windows 10: error writing the value's new contents
Regedit in Windows 10: error writing the value's new contents · 1. Select the registry item in Registry Editor and right-click it and...
Read more >
Cannot create value: Error writing to the registry - Super User
Some programs (Anti-malware packages for example) actively disallow editing of their own, and often some system, services.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found