Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => iMX233 => Topic started by: nextstep on March 07, 2016, 06:59:46 PM

Title: imx 233 + lirc + irc out
Post by: nextstep on March 07, 2016, 06:59:46 PM
hello,

I search to connect my irc out to a imx233 maxi, but i am a noob, can you help me ?

best regards
Title: Re: imx 233 + lirc + irc out
Post by: lambda on March 08, 2016, 01:58:34 AM
Quote from: nextstep on March 07, 2016, 06:59:46 PM
I search to connect my irc out to a imx233 maxi, but i am a noob, can you help me ?

The answer to this question probably is not going to be useful to you.

Maybe one of those helps you:
https://www.olimex.com/Products/Modules/Interface/MOD-IRDA/open-source-hardware
https://www.olimex.com/Products/Modules/Interface/MOD-IRDA+/open-source-hardware

If not, maybe you can explain your problem in more detail.

Harald
Title: Re: imx 233 + lirc + irc out
Post by: nextstep on March 11, 2016, 11:50:31 PM
OK,

  I use imx233 maxi debian kernel 3.12.

  I can to use keyes KY-005 IR transmitter

  i install lirc, now i find a /dev/lircd but not a lirc0


Thank for you reply


Best regards
Title: Re: imx 233 + lirc + irc out
Post by: lambda on March 12, 2016, 02:07:54 PM
I guess you are missing the driver/kernel module?

(I have no idea which one you need. Also this depends on how you are wiring the transmitter to the board, of course.)

If you don't know it already:
http://www.lirc.org/html/configuration-guide.htm has a quite detailed description.

HTH,
Harald
Title: Re: imx 233 + lirc + irc out
Post by: nextstep on March 16, 2016, 07:58:20 PM
thanks,

  yes, i see the problem....  :)

[ ok ] Cleaning up temporary files... /tmp.
[info] Loading kernel module lirc_dev.
libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.12.0-rc7/modules.dep.bin'
[info] Loading kernel module lirc_rpi.
libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.12.0-rc7/modules.dep.bin'
[ ok ] Activating lvm and md swap...done.


   my idea is connect via gpio 3.3V + gnd + gpio 33


   Now, i must repair my module problem

Best regards
Title: Re: imx 233 + lirc + irc out
Post by: nextstep on March 16, 2016, 08:51:38 PM
hummm, not find  LIRC  in menukernel ?.!

LIRC module exist in 3.12.6 ?  or i must take a new kernel ?
Title: Re: imx 233 + lirc + irc out
Post by: lambda on March 17, 2016, 12:52:01 AM
Yes, 3.12 has some LIRC support. In the kernel tree it is somewhere below drivers/media/rc/ don't know about menuconfig, maybe you have to enable something else first, to make it available.

BTW, IIRC not all of LIRC has been merged into the mainline kernel. So maybe you need to get some bits from LIRC sources... (I never tried transmitting IR so I don't know much ...)

HTH,
Harald
Title: Re: imx 233 + lirc + irc out
Post by: nextstep on March 17, 2016, 10:20:01 PM
ok, i try linux 4.5, make kernel etc work fine, i use http://www.jann.cc/2012/08/23/building_a_kernel_3_x_for_the_olinuxino_from_sources.html for help

but..

HTLLCHTLLCHTLLCHTLLCLC

U-Boot 2013.04-dirty (Jun 26 2013 - 11:46:21)

CPU:   Freescale i.MX23 rev1.4 at 454 MHz
BOOT:  SSP SD/MMC #0
DRAM:  64 MiB
MMC:   MXS MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0
mmc0 is current device
SD/MMC found on device 0
628 bytes read in 88 ms (6.8 KiB/s)
Importing environment from mmc (uEnv.txt)...
6400168 bytes read in 1974 ms (3.1 MiB/s)
10068 bytes read in 108 ms (90.8 KiB/s)
Booting from mmc ...
## Flattened Device Tree blob at 41000000
   Booting using the fdt blob at 0x41000000
   Loading Device Tree to 43b67000, end 43b6c753 ... OK

Starting kernel ...


system freeze..... hard is the rock....

where i am bad...

root@debvm01:/SRC/linux-4.5# ls -laFh /mnt/DISK1/boot/
total 13M
drwxr-xr-x  2 root root 4,0K mars  16 21:05 ./
drwxr-xr-x 22 root root 4,0K nov.  11  2013 ../
-rw-r--r--  1 root root 9,9K mars  17 20:51 imx23-olinuxino.dtb
-rw-r--r--  1 root root 2,8K mars  17 20:51 imx23-olinuxino.dts
-rw-r--r--  1 root root  628 nov.  11  2013 uEnv.txt
-rwxr-xr-x  1 root root 6,2M mars  17 20:51 zImage*
-rw-r--r--  1 root root 6,2M mars  17 21:02 zImage_dtb


hummm, long is make.....


best regards

Title: Re: imx 233 + lirc + irc out
Post by: lambda on March 18, 2016, 02:00:37 AM
Presumably something goes wrong when jumping into the kernel - maybe wrong entry point? Or maybe your kernel wasn't loaded at all? (There is no message about it in your output.)
I never tried to load a zImage with u-boot. I'm always using uImage files. This is the metadata:

$ file uImage
uImage: u-boot legacy uImage, ARM OpenWrt Linux-4.1.13, Linux/ARM, OS Kernel Image (Not compressed), 1541248 bytes, Sun Dec 13 23:13:34 2015, Load Address: 0x40008000, Entry Point: 0x40008000, Header CRC: 0x2BED84E5, Data CRC: 0x8D0D4CB7


Maybe check your uEnv.txt against above parameters...

HTH,
Harald
Title: Re: imx 233 + lirc + irc out
Post by: nextstep on March 18, 2016, 08:20:22 PM
hello,

  i retry to compil kernel and :

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@debvm01:~# uname -a
Linux debvm01 4.5.0 #1 Fri Mar 18 19:05:54 CET 2016 armv5tejl GNU/Linux
root@debvm01:~# ls /dev
autofs           mem                 stdin   tty23  tty40  tty58     vcs5
block            memory_bandwidth    stdout  tty24  tty41  tty59     vcs6
bus              mmcblk0             tty     tty25  tty42  tty6      vcsa
cachefiles       mmcblk0p1           tty0    tty26  tty43  tty60     vcsa1
char             mmcblk0p2           tty1    tty27  tty44  tty61     vcsa2
console          mmcblk0p3           tty10   tty28  tty45  tty62     vcsa3
cpu_dma_latency  net                 tty11   tty29  tty46  tty63     vcsa4
disk             network_latency     tty12   tty3   tty47  tty7      vcsa5
fd               network_throughput  tty13   tty30  tty48  tty8      vcsa6
full             null                tty14   tty31  tty49  tty9      watchdog
i2c-0            ppp                 tty15   tty32  tty5   ttyAMA0   watchdog0
iio:device0      ptmx                tty16   tty33  tty50  ttyAPP0   watchdog1
input            pts                 tty17   tty34  tty51  ubi_ctrl  xconsole
kmsg             random              tty18   tty35  tty52  urandom   zero
lirc0            root                tty19   tty36  tty53  vcs
lircd            rtc0                tty2    tty37  tty54  vcs1
log              shm                 tty20   tty38  tty55  vcs2
loop0            snd                 tty21   tty39  tty56  vcs3
MAKEDEV          stderr              tty22   tty4   tty57  vcs4


good small imx233  :D

Now go to try the led emiter and a lot of capter i have ( nfc, gps, gsm, etc)

Thank a lot, lambda for you support !

When i am good with mi ir emiter, i be back with config.

Best regards
Title: Re: imx 233 + lirc + irc out
Post by: nextstep on March 20, 2016, 09:39:43 AM

I Search, i search.

But i see all exemple use GPIO, is gpio = 0 or gpio = 1

Gpio is the good way to send more complex code over IR ?

Or i must search over I2c or spi or another ?


Best regards
Title: Re: imx 233 + lirc + irc out
Post by: lambda on March 21, 2016, 09:35:55 PM
I'm sorry, I don't entirely understand your question (grammatically).

Which bus to use depends on what your HW supports. I think i2c and spi are rather uncommon for IR, so probably not. Maybe using the uart interface of your imx233 board is a good way to go. There is a lirc_serial module in staging, that could work. (Haven't looked at the data sheet for your transmitter, so I might be wrong.)

Using GPIOs might work too, but as this is entirely controlled by software, getting the timing right might be a bit tricky...

HTH,
Harald
Title: Re: imx 233 + lirc + irc out
Post by: nextstep on March 21, 2016, 10:43:02 PM
Thank for you re reply,


   ok, i must work with uart and understand this.

   Easy on arduino, but a long way on imx linux.

   You think uart and a C program ?

Best regards
   

   
Title: Re: imx 233 + lirc + irc out
Post by: lambda on March 22, 2016, 10:24:17 PM
Actually, if you know how to do it on arduino, it should be quite easy on linux too?

I don't think you need a C program. The lirc_serial module I mentioned previously should be fine. (If it lacks some feature you need rather fix it (and submit mainline) than write your own.)

And talking to lirc is high level stuff - so should be doable in any programming langauge, I guess.

HTH,
Harald
Title: Re: imx 233 + lirc + irc out
Post by: nextstep on April 01, 2016, 08:31:43 PM
thk lambda, you are here

   Yes, i try 4.5 kernel now i must go to mainline

   arduino is more easy, take lib, and take exemple, modif this and is run.

   i now try, imx233 and my new cherry trail, lot of time with arduino .....

   search for mha or v outup on gpio on imx2333 versus arduino ?  because my daugther wanna a led ruban with olinuxino + ir ...


    where find the time for all this search, thats the question  :D


Best regards
Title: Re: imx 233 + lirc + irc out
Post by: lambda on April 04, 2016, 10:41:36 AM
I pretty much can't parse your questions (grammatically).
Title: Re: imx 233 + lirc + irc out
Post by: nextstep on April 04, 2016, 10:29:37 PM
HI,

if arduino can output 40 Ma per pin ( http://playground.arduino.cc/Main/ArduinoPinCurrentLimitations )

How olinuxino maxi with 12v 1.5 A can outup per pin ( gpio per exemple )

I think is more than a arduino ?

Its for ( http://www.mon-club-elec.fr/pmwiki_mon_club_elec/pmwiki.php?n=MAIN.ArduinoInitiationLedsDiversTestRubanRVB )

Yes my english is very poor :), no problem for read but speak and write....


Best Regards
Title: Re: imx 233 + lirc + irc out
Post by: JohnS on April 04, 2016, 11:15:29 PM
The amount a uC pin can source or sink is in the uC datasheet with total limit etc.

(The Arduino data you linked to is the equivalent from an Atmel data sheet.)

So, just refer to the iMX233 data sheet.

John
Title: Re: imx 233 + lirc + irc out
Post by: lambda on April 05, 2016, 12:19:05 AM
imx233 pins can be configured in software (linux pinctrl driver) to use a drive strength of 4mA, 8mA or 12mA.

HTH,
Harald
Title: Re: imx 233 + lirc + irc out
Post by: nextstep on April 05, 2016, 12:36:27 AM
Hi,

   Yes i read the 1612 pages of imx233 data sheet. 8)  Thk JohnS, good is to know some data sheet.

   Lambda you are ok, 4mA, 8mA or 12mA 
   
   less of arduino. ( no good for led ruban, use mosfet too )

   thk for all you re reply

   I return to my ir emiter problem

Best Regards

   
Title: Re: imx 233 + lirc + irc out
Post by: nextstep on April 06, 2016, 01:37:08 AM
Have you some link for  uart (olinuxino) how to program ? ( c, bash ?)

Best Regards


----------------------->   https://www.olimex.com/forum/index.php?topic=3397.0

Title: Re: imx 233 + lirc + irc out
Post by: nextstep on April 06, 2016, 08:15:57 PM
hi,

  simple question :   How i can send data over the TXD pin on UEXT of imx233 maxi

  i see /dev/ttyAPP0 but cat "booooooooo" > /dev/ttyAPP0 no work with my ir emiter...  :-X


Best Regards
Title: Re: imx 233 + lirc + irc out
Post by: lambda on April 06, 2016, 11:02:57 PM
IIRC when I tried to output some data via echo to /dev/ttyAPP0 I had to setup the tty with some tool like stty or setserial. I don't remember the details: usually I use microcom or busybox-microcom these days.

HTH,
Harald