Data formatting for write
See original GitHub issueI’m trying to write, and getting this error:
BleError: Characteristic * write failed for device * and service *
I believe it’s an issue with the formatting of the write data. The bluetooth device is expecting a data array, specifically something like this:
[ 0, 0, 173, 0, 129, 164, 116, 121, 112, 101, 170, 100, 105, 97, 103, 110, 111, 115, 116, 105 ]
It seems the lib wants the above to converted to a string. When I convert it to a base64 string, the bluetooth device fails to write. Anyone know how to write a data array?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Read and write formatted data - 4Js
write () Writes a list of data delimited by a separator to the channel. methods ... follow the same formatting rules as the...
Read more >Data Formatting In Excel: A Complete Guide - Simplilearn
Formatting in Excel is a simple process of modifying or manipulating data in spreadsheets from one form to another. Formatting can be done ......
Read more >Data and File Formatting — documentation
Data Formats¶ · Containers: TAR, GZIP, ZIP · Databases: CSV, XML · Tabular data: CSV · Geospatial vector data: SHP, GeoJSON, KML, DBF,...
Read more >Format numbers as dates or times - Microsoft Support
In the Category list, click Date or Time. Format Cells dialog box. In the Type list, click the date or time format that...
Read more >Writing Data to Files
Data is written to a file using the PRINTF statement. The statement may include the FORMAT keyword to control the specific structure of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@heatherSnepenger my hardware is also initially expecting a byte array, and I haven’t had any issues with my example below. Here is how i’m doing mine (keep in mind this could be specific to my device):
for
readSingleWifiShortHex
, index 0 = the command, 1 = length, 2 = payload.does that help?
@ayberkgerey I am creating my own
transactionId
that way I can use it to read later on in my code/file.