Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
serial on Infra red
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 522

PostPosted: Fri Jan 22, 2010 7:47 pm    Post subject: serial on Infra red Reply with quote

hi
i have an arm pxa270 device which has 3 serial port
/dev/ttyS0
/dev/ttyS1
/dev/ttyS2

an IrDA-SIR (chip) device is attached to /dev/ttyS1. and this uart should be used as "the Infra red port"
ok. in kernel tree i find a proper kernel module drivers/net/irda/pxaficp_ir.c
which works well if you want to use all the IRDA stack, in order to have an Infra red net device
(ifconfig -l report irda0, but you also need irattach in order to bridge the dev with the IrDA stack
i tested it, and i was able to infra red telent 2 machines ... )

ok, this is pretty, but ...

... i do not want an IrDA device, i just want a serial over Ir, pretty handles as i handle /dev/ttyS0: directly !

the question is: how to do that ? i am a bit confused about ircomm & his "strange" friends

any help ?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9824
Location: almost Mile High in the USA

PostPosted: Sat Jan 23, 2010 10:32 pm    Post subject: Reply with quote

The irda software instructs a particular IR port to understand irda protocol to automatically detect clients, etc.
If you have a standard serial port hooked up to the ir port, you should be able to just use some serial terminal software on /dev/ttySX -- most SIR serial IR should be able to do that... just make sure the irda protocol is disabled (in a module and unloaded, etc.)
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 522

PostPosted: Sat Jan 23, 2010 11:42 pm    Post subject: Reply with quote

eccerr0r wrote:
just make sure the irda protocol is disabled (in a module and unloaded, etc.)


that is the problem: how to disable the irda protocol
i think i will have to hack the kernel module, there is something strange i have not understood

the hardware i am talking about has

pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 22) is a FFUART
pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 21) is a BTUART
pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 20) is a STUART

ttyS1 is attached to a SIR chip, which is attached to IR led and IR photo transistor (both packed into a SHARP package)
ok

so the problem is:
if i setserial ttyS1 (be mapped at 0x40200000, be using irq = 21), and then i invoke minicom ... well, i get nothing out of the ttyS1 port, and nothing in the ttyS1 ... it seems the port is not working at all
sorry man =(

if i modprobe the kernel module of the IRDA-SIR (pxaficp_ir) ... than i see lsmod
* IRDA module has been loaded
* pxaficp_ir module has been loaded


if i toy with irattach irda0 wow i see something going out the ttyS1 port (i can see the hostame chars, for example, so the ir tx is working)

i can't remove the IRDA kernel module: it has been in use (the pxaficp_ir is using it)

if i remove the pxaficp_ir ... well everything stops to work


so ... may be any kernel hacking is required =P ?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9824
Location: almost Mile High in the USA

PostPosted: Mon Jan 25, 2010 7:57 am    Post subject: Reply with quote

Supposedly ircomm is an overlay to make a remote device look like a serial port, not the actual IR link.

I couldn't find anything about unbinding an irattached serial port... Not sure if this is even possible after it's bound at this point.

Oh well, so much for weird hardware... need more ram on my sl-5600 :-(
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum