irda on i.MX 6ULL

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

irda on i.MX 6ULL

742 Views
rust_caleb
Contributor II

Hello,

I am trying to get irda SIR to work on my i.mx6ull based SoM.  I would like to use the IRCOMM driver within linux to access devices using a UART, but the ircomm1 and ircomm2 devices hang the system when I write to them.

I have enabled the related settings in the kernel config file.

CONFIG_IRDA=y

CONFIG_IRCOMM=y

I also verified that the .dts file has the "fsl,irda-mode" string within the desired uart section.

&uart2 {

           pinctrl-names = "default";

           pinctrl-0 = <&pinctrl_uart2>;

           uart-has-rtscts;

           fsl,irda-mode;

           status = "okay";

};

After these steps I am able to see ircomm* devices in /dev/tty, so the kernel has been correctly modified. 

/dev/tty
  ircomm0
  ircomm1
  ircomm2

I also enabled raw writes on the device using stty.  (uart2 is mapped to ttymxc1 on this SoM)

stty -F /dev/ircomm1 raw -echo -echoe -echok
stty -F /dev/ircomm1 115200


Sadly the command to write to the ircomm port still hangs.

echo hello > /dev/ircomm1

In the past I have manually set the processor registers using imx-test/memtool, and this forces the standard ttymxc1 port to operate as an irda port.

/unit_tests/memtool CCM.CCGR0.CG14=1    #uart2 clock enable
/unit_tests/memtool UART2.UCR1.IREN=1   #uart2 irda enable

But I would like to avoid having to use imx-test->memtool because imx-test is difficult to incorporate using buildroot.  If I must use Yocto to get Irda to work then I will, but I'd rather not because the build times are substantial.

Do I need to enable hardware handling with irda-utils -> irattach?
Is there a different tool supported in buildroot which can adjust the processor memory?

Any suggestions are appreciated.

Labels (1)
0 Kudos
2 Replies

665 Views
rust_caleb
Contributor II

It looks like those resources are for Linux kernel versions 2.4.x and 2.6.x.  I am using Linux version 4.9.x

I will post on the Linux-IrDA project and see if someone can help.  The unfortunate lack of support for this technology is sad because IrDA still serves a niche set of wireless communication needs.  NFC and BTLE are both higher power than IrDA by a significant margin if you only need to communicate a short distance.

0 Kudos

665 Views
igorpadykov
NXP Employee
NXP Employee

Hi

one can look at "Common Pitfalls" described on

Linux-IrDA quick tutorial 

and post issue on irda mail list

The Linux-IrDA Project / Mailing Lists 

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

0 Kudos