imx6: Sending files over RS-485

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6: Sending files over RS-485

1,524 Views
williewiholm
Contributor II

Hello,

I'm very inexperienced with the RS-485(Half-duplex) and in Yocto/Linux and could use some guidance.

The board I'm using is :https://www.avalue.com.tw/Product/RISC-Platform/Single-Board-Computer/SBC/ACP-IMX6POS_2201

By using the supplier specific files, with small modifications in the .dtb files(just to add rs485 at boot for uart). I can successfuly send simple data with echo from another computer which supports RS-485 natively by echoing into that serial interface and with : cat /dev/ttymxc2 on my board. I cannot send data from my board.

However, why I try to send a file from my other computer with zmodem a few unreadble bits appear and then it crashes.

Before we get to techical I would like to ask a few simple questions.

1. Is it possible, or rather feasible to send files over RS-485 without any further protocol? (If not, how should it be done?).

2. My board only has support for kernel 3.14.28 which by reading on different forums doest not support RS-485. Yet I'm able to read RS-485 data. Why is that?

3. Do i need to manually upgrade the kernel to 4.1x before trying to implement further solutions?

Would be really thankful for help!

/W

Labels (1)
Tags (1)
4 Replies

1,359 Views
igorpadykov
NXP Employee
NXP Employee

Hi willie

yes it is necessary to use some protocol for sending big data (with crc check,

retransmissions).

Regarding support and upgrading, yes preferably to migrate to latest kernel versions

as they integrated many improvements. Kernel 3.14.28 may not support RS-485

but can have some preliminary codes which make it working.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,359 Views
williewiholm
Contributor II

Hello Igor,

Thank you for your help!

1. The idea is to send files in the size range (1-5kb). What RS-485 protocols could be used in a scenario like this? The only thing I found while looking around is modbus which does not seem to be suited for this, and not to easy to implement. In this stage I just want to make sure that it is possible to send files over RS-485, does not have to be flawless.

2/3. Do you mean preliminary code in the kernel/dts? I have used the suppliers zImage and dts but the filesystem is built with Yocto by me.

Best Regards,

Willie

0 Kudos

1,359 Views
williewiholm
Contributor II

Update!

I'm now able to send simple data on the RS-485 interface between my computers \0/. But i have to manually change a GPIO for rx/tx. My first question is now my only question, how would you recommend me going forward with sending files over this interface?

Best Regards,

Willie

0 Kudos

1,359 Views
igorpadykov
NXP Employee
NXP Employee

one can look on

serial port - Data Error Checking - Stack Overflow 

Best regards
igor

0 Kudos