E
E
eegmak2021-03-28 13:52:43
bash
eegmak, 2021-03-28 13:52:43

How to send a character to uart by its code?

How to use bash to send characters to uart by their codes?
Are there any differences between character representations in uart/linux/bash/stm32 ?
what determines how many bits / bytes the function of reading one character by uart will receive?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2021-03-28
@jcmvbkbc

How to use bash to send characters to uart by their codes?

export hexcode=41 #'A'
printf "\x$hexcode" > /dev/ttyS0

Есть ли различия между представлениями символа в uart/linux/bash/stm32 ?

man ascii , man charsets
what determines how many bits / bytes the function of reading one character by uart will receive?

The number of bits in a character depends on the UART settings, see man stty , parameter cs. Normally the UART read APIs operate on bytes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question