|
 |
|
 |
|
Howto utilize the irda port on the Zaurus
1) Intro
On the left hand side of the Sharp Zaurus a IrDa port is located. The IrDa
port is not very powerfull and only can go a few feet at most. A repeater
can be used for more fun irda hacking (but that is a separate howto).
2) Basics
At this time applications can utilize the IrDa port if they are developed with Qt. (If someone know how to use it via java etc please send an e-mail to the address at the top.)
Using the irda port is as simple as creating an object and calling send.
Ir *testIr = new Ir(this, "TestIrObject");
testIr->send("/proc/uptime", "Uptime file", "text/plain");
You can send files or DocLnk files. See the documentation that came
with the qpe sdk for more detailed information.
3) Issues
When using the function:
void send( const QString & fn, const QString & description,
const QString & mimetype = QString::null )
You must set the mimetype if the file doesn't have an extension otherwise
the irda transfer will crash the other Zaurus and cause it to reboot.
The signal:
done( Ir * irda )
Is not implemented and shouldn't be used.
The static meathod:
bool Ir::supported()
at the time of this writing isn't supported and will always return true,
but the applications should still call this for a future binary that will have a working version of this function.
4) Example
Download example source and binary irda demo app in a tar.gz file
here.
Simply copy the "ir" executable over to the Zaurus and run it from the command
line.
The gui test program allows for either sending text or a file to another
Zaurus. The source is included in the tar.gz for further review and exploration.
|
|
 |
|
 |
    This page was last updated: May 21 2003 06:28:19.
|