Department of Electronic Engineering NUIG

Download Report

Transcript Department of Electronic Engineering NUIG

Department of Electronic Engineering NUIG
A Bluetooth and Ethernet
Control System for Home
Entertainment Devices
By: Shane Long
Supervisor: Mr. Frank Callaly
Apr 2007
Overview
• System Specification
• Hardware Design
– Design Issues
• LIRC Package
– Installation of LIRC
– LIRC Programs
• Ethernet Interface
– Server Application
– Client Application
– Sharp Zaurus
• Bluetooth Interface
– Server Application
– Client Application
• Other Usage modes for
the System
• Review
• References
System Specification
Bluetooth Rx
Bluetooth
Mobile
Phone
USB
Linux
Workstation
Ethernet
Sharp
Zaurus
PDA
Serial Tx
IR-Tx/Rx
Hardware Design
• Hardware must have following capabilities
– transmit IR signal at least 5m
– receive IR signal at 38kHZ
– serial interface (4 wires)
– voltage control (serial port is power supply)
Hardware Design Issues
• Low power output from serial port
– range in miliWatts
• Extra power required to transmit IR signal
sufficient distance
– battery method???
– capacitor method???
LIRC Package
• Linux Infra-Red Control
– decoding and sending of IR signals
– reads remote control config file and sends
signal out through serial port
– Large no. of config files available
• Sony, Philips, LG, Hauppauge, Hitachi etc.
Sample Configuration File
•
begin remote
•
•
•
•
•
name SONY_RM-830
bits
11
flags SPACE_ENC
eps
25
aeps
100
•
•
•
•
•
•
header
one
zero
ptrail
gap
toggle_bit
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
2478 500
1272 500
673 500
673
26940
0
begin codes
Mute
Power
TV
Teletext
Input
Output
1
2
3
4
5
6
7
8
9
0
0x148
0x548
0x0E8
0x7E8
0x528
0x338
0x008
0x408
0x208
0x608
0x108
0x508
0x308
0x708
0x088
0x488
LIRC Daemon
• Centre component of the LIRC package
– receives parameters from IR Txing application
– converts parameters to IR commands
– sends IR commands to serial port
LIRC Tx/Rx Control Programs
• irsend
– txing program
• xmode2
– rxing waveform
• mode2
– rxing pulse width
• irpty
– control over s/ware
•
Mouse
movement config
LIRCMD
Save config file
IRRECORD
IR COMMAND
IR COMMAND
IREXEC
Arbitrary
command
IR COMMAND
IR COMMAND
IRPTY
Control
Application
IR COMMAND
IRXEVENT
Control
Application
IR COMMAND
IRCAT
Display config
strings
IR COMMAND
IRW
Display lircd O/P
SEND_ONCE
LIRCD
Command Line
Arguments
SEND_START
IRSEND
SEND_STOP
LIST Response
LIST
LIRC Installation Issues
• To install LIRC serial driver the RS-232
driver first must be removed/overwritten
– RPMs
• LIRC-0.8.0 many RPM dependencies not available
– Removal of RS-232 driver and recompilation
• time consuming
Installation of LIRC
Remove RS232 driver
from kernel
Recompile
kernel
Compile &
install LIRC
package
Start LIRC
daemon lircd
Place RC
config files in
home directory
Install serial
port driver as
module
Ethernet Interface
• Using workstation as remote control
– cumbersome
– not hand held
• Ethernet interface provides mechanism to
– control IR Tx with handheld device
– control IR Tx from truly remote location
Webpage VS Client/Server App
Pass parameter
Pass parameters
lircd
Ethernet server
application
HTTP
Web browser
HTTP
lircd
Internet
HTTP
webpage
Client Server
Application
Webpage Application
• Advantages
– Truly Generic
• Webpage would work
on every browser
– Truly Remote
• WWW works anywhere
in the world
– Browser Existence
• No need to develop
client application
• Disadvantages
– Response Times
• Possibly too slow for
application
Client Server Application
• Advantages
– Standard
• Client-server
architecture standard
practice
– Response Times
• Extremely fast response
times
– Control over lircd
• Parameters can be
passed to lircd easily
• Disadvantages
– Client-Server
Development
• Two applications must
be developed
Ethernet Server Application (1)
• Application written in the Python
• Task of Application
– To connect to UNIX socket to control lircd
• lircd –l opens socket at port 8765 for connection
• Three parameters are required for IR Tx
– SEND_ONCE
– CONFIG_NAME
– BUTTON_NAME
• Implemented using Python sockets
Ethernet Server Application (2)
• Task of Application (contd)
– To receive connection from client program and pass
control of lircd
• Implemented using Python XML-RPC libraries
– Set of standard protocols that automate encoding and
transport of messages
• Three parameters to be sent across network link as integers
Client
Application
Network
Server
Application
Linux Workstation
lircd
Ethernet Client Application(1)
• Task of Application
– to connect to server application
• Using Python XML-RPC libraries
– Pass arguments to server application and hence to
lircd to control the IR Tx
• Arguments passed as integers
• Client Application as a GUI
– Remote control look and feel
Developed using PyQt, a GUI design toolkit for Python
Ethernet Client Application(2)
• Sharp Zaurus PDA
– Qtopia Application Builder
• Compatible with PyQt
– Wireless ethernet card
• Wireless handheld device
– Linux Variant OS
• Kernel: 2.4.78-rmk7-pxa3embedix
Bluetooth Interface
• Wireless capabilities
– Remote device
• Mobile Phone
• Bluetooth enabled
Linux Workstation
running
Server Application
workstation
– Local device
• USB Bluetooth dongle
Client Application
running on some
device
Bluetooth Server Application
• Task of Application
– To connect to UNIX socket to control lircd
– To receive connection from client application and
pass control of lircd to client
Client
Application
Bluetooth
Bluetooth
Rx
USB
Server
Application
Linux Workstation
LIRC
Bluetooth Client Application
• Task of Application
– to connect to server application
– gain control of lircd through server
• To be developed for a mobile phone
– J2ME
– written on workstation and uploaded to wireless
server
– downloaded to mobile phone using WAP
Other usage modes for System
• Control over MP3/CD player with RC using
IR Rx and irpty
• Network Application to control Tx/Rx over
the internet
• Possible usage of a Linux core
microcontroller instead of workstation
Review
Bluetooth Rx
Bluetooth
Mobile
Phone
USB
Linux
Workstation
Ethernet
Sharp
Zaurus
PDA
Serial Tx
IR-Tx/Rx
Questions???