I'm getting distracted by the palmpilot side of things for now, but I wanted to share what I've done so far with Empire. Not too much is the short of it, but basically I have a forked server listening for OBEX objects coming over the IrDA port (I hog the port for now) and taking any control.empeg filename and outputting the contents to /proc/empeg_notify. I wrote a short palm app to send one of these objects with the contents of #4EE0! and it inserts a Dandy Warhols song into the current playlist. I've attached the latest source.

Todo: Figure out a way to send /proc/empeg_notify chunks of commands if they go over a limit. Example: I send a obex object with 100 song fid's in it to insert. I think there is a limit on the amount of text you can send to empeg_notify, so we would have to split this up.

I have to say that I'm not 100% on linux daemons, and the server seems to shut down when using EXEC_ONCE in hijack. I'm not sure if I'm fork()ing correctly or if there is something else I have to do to make it so it doesn't die on startup. If I start it from the command line it works fine. Another bug is sometimes you will get the error IrLAP: no activity on Link!! or Unknown frame ef recieved. I haven't had a lot of time to look into those errors, but reading some of the Linux IrDA mailing list posts, it seems like the irda stack in 2.2 is vastly inferior to 2.4, and there have been a bajillion patches since 2.2. We may have to try to manually patch our 2.2 kernel up to where the 2.4 IrDA code is at in order to get a stable IrDA stack. I don't know how easy this would be.

Now that I have this portion, I am working on the Palm application which will allow you to select a list of songs and upload them via IR to the Empeg. I've got a java class making the .pdb file for the palmpilot and it should be able to integrate in with Jemplode pretty easily, you'll be able to do a Tools->Crate .pdb file and then Hotsync that with your Palmpilot. Any suggestions on what to call the Palm application?

After the Palm app is done I will continue work on Empire. What I would like to do is take all the output from the IrDA port and redirect it to a socket, then multiple clients can hook up to this socket and interpret the data coming in. This would basically be the Empire server. I haven't had much success in figuring out exactly where to grab the packets from, but that is next on my list to learn right after the Palm app is in good shape. I think that I have a decent handle on socket programming now, but I will no doubt have some more questions before this is over . I don't think I mentioned this before but everything I write will be GPL'd.

I was inspired by a post on the IrDA mailing list of one person who had a really cool idea. He is hacking into the IrDA portion of the kernel to make a LED blink when an IrDA device is present in front of the reciever, and the LED turn solid when the two devices are sending information. What a great use for the LED on the front! We could make this an option in Empire if we do the low-level shipping of data to a socket.


Attachments
142413-empire.c (354 downloads)

_________________________
Mark Cushman