Hi together!
Ist it possible to send a CR (Carriage Return) over the programmable UART Buttons? When yes, what is the Syntax for?
For example, i need to send such a string: 58796541[CR]
Thank you very much and best Regards Michael from Germany
Hi together!
Ist it possible to send a CR (Carriage Return) over the programmable UART Buttons? When yes, what is the Syntax for?
For example, i need to send such a string: 58796541[CR]
Thank you very much and best Regards Michael from Germany
Hi,
Unfortunately there is no easy way to do this. At least it wasn't on my Android phone. There is no [CR] button on the keyboard, but I was told that I could try to make a .bin file with the characters I needed e.g. linefeed and carriage return. So I downloaded a Hex Editor and a File editor app and manually created a hex file with the values 0x0A (new line) and 0x0D (carriage return). Then I opened the file in a text editor and copy pasted the string into the Nordic UART app. The strange thing is that it seemed to work with new line, but not carriage return. I don't know why. It might be something on the terminal side (I used Tera Term), or maybe an Android vs Windows semantics issue. It is worth investigating some more.
A different workaround is to add app_uart_put('\r') in the function printing the string to UART on the application side. Then you would get a CR on every transfer though. You might also try to implement your own mechanism. You can e.g. use app_uart_put('\r') whenever you receive a string containing "\CR" or something like that.
Hi,
Unfortunately there is no easy way to do this. At least it wasn't on my Android phone. There is no [CR] button on the keyboard, but I was told that I could try to make a .bin file with the characters I needed e.g. linefeed and carriage return. So I downloaded a Hex Editor and a File editor app and manually created a hex file with the values 0x0A (new line) and 0x0D (carriage return). Then I opened the file in a text editor and copy pasted the string into the Nordic UART app. The strange thing is that it seemed to work with new line, but not carriage return. I don't know why. It might be something on the terminal side (I used Tera Term), or maybe an Android vs Windows semantics issue. It is worth investigating some more.
A different workaround is to add app_uart_put('\r') in the function printing the string to UART on the application side. Then you would get a CR on every transfer though. You might also try to implement your own mechanism. You can e.g. use app_uart_put('\r') whenever you receive a string containing "\CR" or something like that.
Since 1.16.4 this is no longer required. You may select the EOL type when you configure the button. Remember to add a new line to your command at the end of the line.