# Write\_tx with non-ascii characters

**URL:** <https://forum.qoitech.com/t/write-tx-with-non-ascii-characters/478>\
**Category:** Support\
**Created:** [October 5, 2023, 5:33pm UTC](https://forum.qoitech.com/t/write-tx-with-non-ascii-characters/478 "2023-10-05T17:33:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![emooney](https://avatars.discourse-cdn.com/v4/letter/e/ba8739/32.png) [@emooney](https://forum.qoitech.com/u/emooney)\
**Post date:** [October 5, 2023, 5:33pm UTC](https://forum.qoitech.com/t/write-tx-with-non-ascii-characters/478/1 "2023-10-05T17:33:07Z")

</div>

Hi! I had a quick question about the write\_tx(“”) function.

I need to write non-ascii characters through the UART, but when I try it with write\_tx, it sends 2 bytes of data instead of 1 (all ascii characters just sent their single byte value, I was looking at the output of the tx pin using a logic analyzer).

I need it to just write the singular byte of data, because the syntax of what I am writing to requires 1 byte of address, then 1 byte of data, then 1 byte of address, and so on. I need it to write 0x02 as the address, then 0xAA as the data.

which would look like:  
write\_tx(“\x02”)  
write\_tx(“\xAA”)

Currently however, when I do write\_tx(“\xAA”) it sends 2 bytes, 0xC2 then 0xAA.

I tried to write it as a byte instead (b”\xAA”) but then I got the error “Object of type bytes is not JSON serializable”.

Is there any way I can get the tx pin to just output 0xAA(10101010) in 1 byte?

---

<div class="post-metadata">

**Author:** ![bjorn.rosqvist](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.qoitech.com/bjorn.rosqvist/32/238_2.png) [@bjorn.rosqvist](https://forum.qoitech.com/u/bjorn.rosqvist)\
**Post date:** [October 6, 2023, 1:26pm UTC](https://forum.qoitech.com/t/write-tx-with-non-ascii-characters/478/2 "2023-10-06T13:26:12Z")

</div>

Hi and welcome to the forum,

Today, we do not support non-ascii characters, sorry for this.

Best regards,  
Björn

---

<div class="post-metadata">

**Author:** ![emooney](https://avatars.discourse-cdn.com/v4/letter/e/ba8739/32.png) [@emooney](https://forum.qoitech.com/u/emooney)\
**Post date:** [October 9, 2023, 12:11pm UTC](https://forum.qoitech.com/t/write-tx-with-non-ascii-characters/478/3 "2023-10-09T12:11:55Z")

</div>

Hi, thank you for letting me know! would the best approach in this situation then be to try to connect to the UART another way(through a com/serial port or something)? And if so, do you have any advice about the best way to do so?

---

<div class="post-metadata">

**Author:** ![bjorn.rosqvist](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.qoitech.com/bjorn.rosqvist/32/238_2.png) [@bjorn.rosqvist](https://forum.qoitech.com/u/bjorn.rosqvist)\
**Post date:** [October 11, 2023, 1:20pm UTC](https://forum.qoitech.com/t/write-tx-with-non-ascii-characters/478/4 "2023-10-11T13:20:11Z")

</div>

You are welcome.

Yes, best approach, with current implementation, is to connect via external UART, not via the UART on Arc/Ace if you need to send non-ascii data.

Best regards,  
Björn
