user80484: String abc ="0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff";

const unsigned char displaydata={reinterpret_cast<const unsigned char*>(abc.c_str())};

display.drawBitmap(displaydata, startX, startY, bmpWidth, bmpHeight, GxEPD_WHITE);

Get error: invalid conversion from 'const unsigned char' to 'unsigned char' [-fpermissive]*
When I write like this
String abc ="0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff";

display.drawBitmap(reinterpret_cast<const unsigned char*>(abc.c_str()), startX, startY, bmpWidth, bmpHeight, GxEPD_WHITE);

No error but black screen no display image
When I write like this
const unsigned char displaydata[]={ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};

display.drawBitmap(displaydata, startX, startY, bmpWidth, bmpHeight, GxEPD_WHITE);

It is working
The string data coming from the server is returning to me as stirng, I am trying to reflect it on the screen. I want to convert a string data to const unsigned char with code
So I'm trying to convert

user68729: That string is literally the characters 0xff ... while the array is the bytes 0xff...
Where the string contains 4 bytes to say 0,x,f,f (followed by comma and space) the array will have 1 byte the 255 (and no need for a comma or space to delimit).
If you are looking to convert the text hex string to bytes, look at a combination of How to convert an hex string to an array of bytes? and looping through the string.

80484: <pre><code>String abc =&quot;0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff&quot;;

const unsigned char displaydata={reinterpret_cast&lt;const unsigned char*&gt;(abc.c_str())};

display.drawBitmap(displaydata, startX, startY, bmpWidth, bmpHeight, GxEPD_WHITE);
</code></pre>
<p><strong>Get error: invalid conversion from 'const unsigned char' to 'unsigned char' [-fpermissive]</strong>*</p>
<p><strong>When I write like this</strong></p>
<pre><code>String abc =&quot;0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff&quot;;

display.drawBitmap(reinterpret_cast&lt;const unsigned char*&gt;(abc.c_str()), startX, startY, bmpWidth, bmpHeight, GxEPD_WHITE);
</code></pre>
<p><strong>No error but black screen no display image</strong></p>
<p><strong>When I write like this</strong></p>
<pre><code>const unsigned char displaydata[]={ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};

display.drawBitmap(displaydata, startX, startY, bmpWidth, bmpHeight, GxEPD_WHITE);
</code></pre>
<p><strong>It is working</strong></p>
<p>The string data coming from the server is returning to me as stirng, I am trying to reflect it on the screen. I want to convert a string data to const unsigned char with code</p>
<p>So I'm trying to convert</p>
 68729: <p>That string is literally the characters 0xff ... while the array is the bytes 0xff...</p>
<p>Where the string contains 4 bytes to say 0,x,f,f (followed by comma and space) the array will have 1 byte the 255 (and no need for a comma or space to delimit).</p>
<p>If you are looking to convert the text hex string to bytes, look at a combination of <a href="https://arduino.stackexchange.com/questions/39861/how-to-convert-an-hex-string-to-an-array-of-bytes">How to convert an hex string to an array of bytes?</a> and looping through the string.</p>
