How to configure UART (J17)

Hello every one:

UART (J17) can not work...

Nothing appeared on the termianl after pluged the USB-cable (fdti) in to my Pc and connected with TX1.
Then I write a little test file in C,to  transmit and receive,still failed by:
int fd = open (/dev/ttyS0,O_RDWR|0_NOCTTY|O_NDELAY);
set_term(fd,0,8,1,'N');
write(fd,"hello world");

nothing happedned!

or try like this:
echo hello > /dev/ttyS0

nothing happedned!

why???
can you help me
thanks

UART (J17) created the device :
/dev/ttyS0
/dev/ttyS1 permission denied
/dev/ttyS2 permission denied
/dev/ttyS3 permission denied

Hi

Do loop test on host first, connect TX and RX on cable,
then open up a terminal on host and send some data,
if you see response (echo) then your physical connection is fine

hello edwardlu,

FYI, the J17 UART was default disabled, i’ve share a patch here [url]https://devtalk.nvidia.com/default/topic/1001264/jetson-tx2/tx2-uarts/post/5125115/#5125115[/url] to enables UARTC instance in SW.
please take a try, thanks

Additional note: Once you have the patch your user may need permissions. Users “ubuntu” and “nvidia” are members of group “dialout”, so they do not not need anything extra beyond the device existing. If you use a different user then you may need to add them to group “dialout”.

i think the hardware works ok.but the software is not designed to take this part(J17 UART) into outputting mode.
so i tried connecting the USB cable and echo hhhhhhhhh > /dev/ttyHTS2 ,it works OK.
PS the barud rate is something lower than 1152000.

Can you please give detailed instruction on how to apply this patch.
I am anyway rebuilding kernel to enable some of the driver modules.
I am following steps from http://www.jetsonhacks.com/2017/03/25/build-kernel-and-modules-nvidia-jetson-tx2/
to build the kernel.
Thanks in advance.

If you are using R28.1 you probably don’t need this patch. “/dev/ttyTHS2” would be the target, and you can talk to this with any 3.3V TTL level UART (I’ve tested at 115200 8N1). Which L4T version are you using (“head -n 1 /etc/nv_tegra_release”)? Are you using any of the onboard camera functionality (the camera also routes to this UART)? What speed were you testing at? Was there no response, or was it just garbage?

Thanks for the quick response.
I am using R27.1.0.
I am not using any camera functionality, so it will be good if you can instruct me to remove the camera module.
Right now, /dev/ttyTHS2 is not getting listed in the available list of ports. So as of now I have not tested it. But initially I am just putting the jumper on Pin 4 and 5 of J17 connector so that at least I can verify whether its actually enabled and ready to use.

The camera just has two screws and then it pulls straight up. Make sure power is disconnected and the capacitors discharged (hold the power button down a few seconds).

R27.x was not all that reliable, it added some new features. R28.1 is a much more reliable release, you should probably flash R28.1 unless you have a good reason to stick with R27.x.

FYI, if “/dev/ttyTHS2” exists, then the driver is there. Most serial port programs demand using only certain standard names and will not list valid ports. Is the file missing, or is the program just not showing it? If the program is not showing it, then you will have to copy and paste the file path rather than selecting through any kind of GUI list…or edit some sort of start-up config file.