DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 16th February 2016
danboid danboid is offline
Port Guard
 
Join Date: Feb 2016
Posts: 12
Default Using infrared on ARM NetBSD

My Banana Pi has an integrated infrared receiver which is supported by NetBSD according to the wiki and dmesg although I have no idea how I might use it under NetBSD. I know the receiver and my remote work as I've had them working under (Arch) Linux.

Having searched the net, the only IR app I've found for NetBSD so far is lirc which is in pkgsrc but when I try to build it it says "lirc is not available for this platform".

All I want to do is to be able to trigger shell commands by pushing buttons on my remote control.

Hopefully someone here has some experience with IR under NetBSD, even if it isn't on an ARM platform?
Reply With Quote
  #2   (View Single Post)  
Old 16th February 2016
danboid danboid is offline
Port Guard
 
Join Date: Feb 2016
Posts: 12
Default

By searching for 'FreeBSD infrared' instead I discovered birda. I'm not sure it can do what I want yet but I'll try it tonight.
Reply With Quote
  #3   (View Single Post)  
Old 17th February 2016
danboid danboid is offline
Port Guard
 
Join Date: Feb 2016
Posts: 12
Default

birda from pkgsrc builds fine under NetBSD. It contains, amongst other tools, irs and ircomm but I've not figured out how to get them to work with the BPi receiver (/dev/cir0) yet.

It seems NetBSD includes a few IR related commands in a default install such as irdaattach and irframe but nothing wants to play nice with me yet:

# irdaattach cir0
irdaattach: tcsetattr: Invalid argument

# irs -c -d /dev/cir0
ioctl failed 660
Reply With Quote
  #4   (View Single Post)  
Old 17th February 2016
danboid danboid is offline
Port Guard
 
Join Date: Feb 2016
Posts: 12
Default

What isn't so encouraging is the man page for cir(4) which says:
Quote:
BUGS

This device is not yet functional
However the wiki states IR works and the same man page states the cir driver has been around since NetBSD 1.6 so that would be a hell of a beta period for a rather simplistic device.

I presume (hope) the man page just needs an update?
Reply With Quote
  #5   (View Single Post)  
Old 19th February 2016
rons's Avatar
rons rons is offline
Snoozing
 
Join Date: Oct 2015
Posts: 69
Default

Quote:
Originally Posted by danboid View Post
My Banana Pi has an integrated infrared receiver which is supported by NetBSD according to the wiki and dmesg although I have no idea how I might use it under NetBSD. I know the receiver and my remote work as I've had them working under (Arch) Linux.

Having searched the net, the only IR app I've found for NetBSD so far is lirc which is in pkgsrc but when I try to build it it says "lirc is not available for this platform".

All I want to do is to be able to trigger shell commands by pushing buttons on my remote control.

Hopefully someone here has some experience with IR under NetBSD, even if it isn't on an ARM platform?
IIRC, the LIRC app really just maps the codes for popular commercial remote controls like Sony, Phillips, etc. With those remotes, you do get the processor to key the codes for you, admittedly. I thought about all this myself, since one of my SoC based SBCs has an IR device onboard. I decided that it was easier for me to make a simple homemade IR remote, since then I could use all my own mappings on it.

All you need is a 38 KHz PWM generator board (~9$) feeding an IR transmitter board (also something like ~9$ on ebay, etc) and an arduino (there are canned programs for the latter). The boards are tiny, so the remote can be really small. even with the Arduino. In my case I was going to just use a SoC based computer on both ends. There's an article on ARM-Mbed that details a serial (8 data, 1 start, 1 stop, no handshake) type of IR link. With that - you don't need to worry about drivers (you have your own cross platform ready to go :-) ) Then, you can use the IR for quite a few more things, like an actual data link.

My SoC/SBC has an onboard IR driver for Linux. I'm not sure, but it could be closed source. So, on the receiving SoC/SBC end, I thought I'd use a separate IR RX board and a TTL/232 converter ($2 on ebay) to route it to serial. All of which defeats the purpose of your onboard IR, so disregard :-)

Last edited by rons; 19th February 2016 at 02:54 PM.
Reply With Quote
Reply

Tags
arm, banana pi, banana pi arm infrared ir remote control, infrared, infrared remote control

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:26 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick