Palantir 0.90 and Empire 0.20

Posted by: cushman

Palantir 0.90 and Empire 0.20 - 29/06/2003 23:07

New versions of Palantir and Empire are now up for download on my website.

New features include:
* New About screen displays total number of tracks/artists and last update date
* Search functionality on the Artist screen - scrolls to artist as you type
* New format decreases music database size by about 15%
* Confirmation dialog when pressing Remove All on Playlist screen
* Now able to re-order tracks in the Playlist by dragging them to new positions
* Beam mode is selectable - Append/Replace/Enqueue songs on the Empeg

IMPORTANT: There are some changes in the Palantir database format, so people who are upgrading from an older version of Palantir must download and use the new Palantir PDB Creator (version 0.30) to re-create your .pdb file. After creating the new .pdb file, delete the Palantir application and data on your Palm device, and load both the new .pdb and the new palantir.prc file to your Palm.

You will also have to install the new version of Empire to use with the new Palantir version. The only file that needs to be changed is the empire binary itself, so you could re-ftp just the binary to your Empeg without any other changes.
Posted by: maurij

Palantir Help - 30/06/2003 13:01

First let me say, i really like the new palm interface. Where i need help in is installing empire. i moved all the files to the recommended folders, but i run into problems here:

Copy all the lib/* files from empire.zip to your /lib directory on the empeg. You will have to create a few symbolic links from the command line on the Empeg:

empeg:/lib# ln -s libopenobex-1.0.so.0.0.0 libopenobex.so
empeg:/lib# ln -s libopenobex-1.0.so.0.0.0 libopenobex-1.0.so.0

the files in the /lib directory should now look like this:


lrwxrwxrwx 1 root root 24 Feb 7 00:45 libopenobex-1.0.so.0 -> libopenobex-1.0.so.0.0.0
-rwxr-xr-x 1 root root 28796 Feb 7 00:45 libopenobex-1.0.so.0.0.0
-rw-r--r-- 1 root root 40328 Feb 7 00:45 libopenobex.a
-rwxr-xr-x 1 root root 744 Feb 7 00:45 libopenobex.la
lrwxrwxrwx 1 root root 24 Feb 7 00:45 libopenobex.so -> libopenobex-1.0.so.0.0.0

Make sure the permissions for the files are set up correctly. At the command line:


chmod 755 libopenobex*
should do fine for all the lib files (this will make all the permissions rwxr-xr-x).


I ran a command prompt and attempted to telnet into my empeg, but it refused it. i'm sure i'm missing something very simple and showing my ignorance at the same time, but any help you could give on entering a shell prompt on the empeg from an xp machine would be of great help.
Posted by: JBjorgen

Re: Palantir Help - 30/06/2003 13:52

Try using Hyperterminal to connect through the serial port and get a command prompt that way.
Posted by: cushman

Re: Palantir Help - 30/06/2003 15:24

Use Hyperterminal, or you could download telnetd for the Empeg from tman's website. You would have to connect via Hyperterminal to install it, though
Posted by: rowitech

Re: Palantir Help - 01/07/2003 04:33

Any chance for releasing Palantir for Pocket PCs?

Rolf
Posted by: cushman

Re: Palantir Help - 01/07/2003 05:36

Since I don't own a PocketPC it's hard to code for one

The code is open source, and the server part (Empire) will accept OBEX objects from ANY device. I've left it pretty open so other people could develop apps that talk to Empire. All you need to do is create a text file named either:

palantir_append.empeg
palantir_insert.empeg
palantir_enqueue.empeg

(we could change the names to make it more generic later)

and within the file list the fid's you wish to append/insert/enqueue, each 8 characters long with no line breaks or spaces. A list of 8 songs would then be a 64 character string. This file is then sent over IrDA via OBEX. Many devices including the PocketPC support OBEX and all that needs to be written for it is the song selecting interface.

I have said before that if someone were to donate a PocketPC I would code Palantir for that platform (probably in Java), but right now there is no reason for me to write a PocketPC port when I have no personal stake in the matter.
Posted by: jamville

Re: Palantir 0.90 and Empire 0.20 - 01/07/2003 10:34

Mark,

How does one change the 'Beam Mode'?
Beam mode is selectable - Append/Replace/Enqueue songs on the Empeg.
Posted by: cushman

Re: Palantir 0.90 and Empire 0.20 - 01/07/2003 10:47

In the playlist view, there is a drop down menu in the upper right hand corner.

Posted by: image

Re: Palantir 0.90 and Empire 0.20 - 01/07/2003 11:06

i'd like to discuss a tangent if you will... is there anything stopping us using empire and ptelnet for palm to give us a terminal shell? does there have to be a middle-man api for obex, or does empire take care of this already? i messed around witht the getty way, but it requires manual commands, which defeats the purpose. my treo300 would be perfect for this kind of thing. can't even imagine the possibilities this could mean with tcpdump. truly portable sniffer, and instead of telneting in thru tcp/ip, only need a palm to control it.
Posted by: cushman

Re: Palantir 0.90 and Empire 0.20 - 01/07/2003 11:26

There should be a way to run getty automatically when you want to connect to the Empeg with your Palm device. Empire would not be good for this because it is only listening for the OBEX protocol over IrDA, and IrCOMM is what you want to use for a terminal session. IrCOMM is not really practical in the car because of link integrity problems, and it is not supported very well (read: buggy) in this kernel release. Bluetooth would be a better option if you wanted to do this, or a direct serial link. Serial dongle BT adapters are available, and should be able to be used with a terminal app. rowitech has done some work in this area.
Posted by: TheAmigo

Re: Palantir 0.90 and Empire 0.20 - 01/07/2003 21:43

Where I get confused is: what happens if you run getting against the same /dev/ircomm0 that Empire is using? Can getty run IrCOMM at the same time as Empire is listening for IrOBEX on a single IrDA port? or does Empire have to release the Ir port for getty to work?
Posted by: rowitech

Re: Palantir Help - 02/07/2003 00:02

Ok, I'm not in the position throwing an iPAQ in your direction. Would be fine if I could do this without caring about the money :-). I've never programmed a Pocket PC but some other devices. Hmm, sounds like this shouldn't be as hard to code than I thought. I have to play a bit around with my iPAQ, maybe I get the first step..

Rolf
Posted by: maurij

Re: Palantir Help - 02/07/2003 02:36

Meatballman and Mark,
thanks for your help, i just got it working. very cool

Posted by: cushman

Re: Palantir 0.90 and Empire 0.20 - 02/07/2003 06:08

Yeah, I don't think that the two can co-exist. The way to do it would be to write a program that binds to the Hijack menu that would kill Empire if it was running, then start up getty.
Posted by: image

Re: Palantir 0.90 and Empire 0.20 - 02/07/2003 07:09

this is why i thought the logical thing to do is have an ircomm<->obex middleman (probably on the palm itself. i seem to recall that you can have loopback connections). i remember a while back back that all empire does is send comport commands to the empeg. so technically, cant you hit Q and it will stop the player and give you shell? or maybe the way to go is to port ptelnet to use the obex protocol.

i'm not worried about getting telnet and the player playing all at once. i want this as my linux-on-the-go box, with sniffing and other capabilities (has anyone treid to port nmap, sshcient, etc. yet?)
Posted by: cushman

Re: Palantir 0.90 and Empire 0.20 - 02/07/2003 07:36

IrCOMM and OBEX are both protocols that run on IrLAP and IrLAP runs on the SIR layer. OBEX and IrCOMM are functionally different, OBEX is much like HTTP (request/response) and IrCOMM emulates a serial port over IR. To write an IrCOMM-OBEX translator would be like writing a terminal application using HTTP. Think of Empire as a web server, not a terminal or telnet session. All it listens for is requests, and if the request has the right format (filename), then it accepts the data (fids) and performs an action with those fids. Look at the source code for Empire, it's really very simple.

In order to switch between the two protocols, you would need to tell Empire to stop listening for OBEX objects and now listen for an IrCOMM connection. You could do this by binding to Hijack, or writing Empire to listen for a "quit" OBEX object. Then you could start another program (or Empire could be enhanced with getty) that would start an IrCOMM connection on the IR port. Then, when your session ends, it would go back to listening for OBEX objects again.
Posted by: cushman

Palantir 0.91 released - 02/07/2003 07:40

Palantir 0.91 has been released. This release fixes a bug where the About screen would be kinda screwy on a PalmOS 5 device.
Posted by: Chimaera

Re: Palantir 0.90 and Empire 0.20 - 02/07/2003 08:13

I will start by saying that I don't know much about the IrDA stack in Linux, and Mark may know more of the fine points about that implementation that I do, but I am responsible for the IrDA code in quite a few million devices currently on the market.

The way our stack works is that we allow multiple applications to bind to a TinyTP port, and register a name that can be looked up to find the port that service is binded to. OBEX is one of those names that can be registered, IrComm is another, and if you have control of both sides of the link it is easy to add others, ethernet for example, and our products have a few non standard names in there for our own custom connections.

Anyway to get to the point, as TinyTP provides this port style interface it is possible that you can have both IrComm and OBEX data travelling across the link at the same time, TinyTP will take care of making sure only the correct data will get to the App/server it is addressed to. Of course to have both connections running at the same time, then both devices need to support it (you cannot do an OBEX connection from one device and a IrComm connection from another as you only have one physical link), but it may not be required for you to quit the OBEX listener when you want an IrComm connection, you will just bind to a differant port, and route the data somewhere else, to Empire it should just look like there is no connection there.
Posted by: cushman

Re: Palantir 0.90 and Empire 0.20 - 02/07/2003 08:32

You are right, you can bind to different ports using TinyTP. In my previous post, I simplified the actual layers of IrDA just to explain that IrCOMM and OBEX (actually IrOBEX) were different. The actual layers (as you've alluded to) are:

1. IrPHY (physical layer)
2. IrLAP (data link)
3. IrLMP (data link)
4. IrTTP (Tiny TP)
5. IrCOMM or IrOBEX

Yes, it would be possible to code Empire to handle both, and to code Palantir with a terminal app, but it would be a huge programming job to finish, and you are probably the only one on the board that has the expertise to tackle the job! I am using the OpenOBEX libraries to do all of my protocol work for me, and I would not attempt this feat. I was thinking that a simple solution would be to switch control over to another program, since we already know how to create an IrCOMM connection. The user would be using different Palm apps anyway, and the physical link would go down, since the user would have to switch apps to a terminal program on the Palm, and that would disconnect the session.
Posted by: Chimaera

Re: Palantir 0.90 and Empire 0.20 - 02/07/2003 08:42

Hi Mark,

does the Linux TinyTP layer only open one port, or can you bind multiple apps to differant ports? in which case you could could bind Empire to the OBEX one and leave IrComm alone, so anyone wanting to write a terminal program could just bind it to the IrComm port, and both would happily co-exist, without either needing to know about the other, and without needing to shut the other down (on the Empeg), this means that Empire can stay exactly as it is, and anyone wanting a terminal wouldn't have to choose between it and Empire?
Posted by: cushman

Re: Palantir 0.90 and Empire 0.20 - 02/07/2003 09:09

I'll have to research it. I haven't done much with the lower layer of the Linux IrDA stack, but I can look into it and see if it's possible. If it is, that's a great idea, and I will try to implement it!
Posted by: jamville

Re: Palantir 0.90 and Empire 0.20 - 02/07/2003 11:32

Thanks Mark.
Posted by: Chimaera

Re: Palantir 0.90 and Empire 0.20 - 02/07/2003 11:46

If you need some help let me know, and I will try and take a look at specifics, but I still have a couple of other things half finished that I also need to get on with.
Posted by: cushman

Re: Palantir 0.90 and Empire 0.20 - 02/07/2003 11:56

Thanks! Empire is at a more or less stable version as it is, and I'll probably be a while before I tackle making it prettier, but when I do I might give you a shout.
Posted by: Micman2b

Re: Palantir 0.90 and Empire 0.20 - 04/07/2003 07:09

Mark C,
Could this application be used to control the empeg as a type of remote also?

Just wondering...


Sean
Posted by: cushman

Re: Palantir 0.90 and Empire 0.20 - 04/07/2003 08:13

Consumer IR (remotes) is different than IrDA. I could write a remote application that integrates with Palantir, but I would either have to use the Omniremote api's (they cost money) or write my own consumer IR code. Nobody so far has written a free consumer ir library for the Palm, mostly because it is a big job.
Posted by: maurij

Re: Palantir 0.90 and Empire 0.20 - 06/07/2003 08:51

how much do the omni remote apis cost?
Posted by: cushman

Re: Palantir 0.90 and Empire 0.20 - 06/07/2003 09:20

The API's are free, but you have to have OmniRemote installed on your PDA to use them. The software costs $25, and everyone would have to have OmniRemote installed. I'm pretty sure it's possible to do this without OmniRemote, though.
Posted by: maurij

Re: Palantir 0.90 and Empire 0.20 - 06/07/2003 09:47

the reason i ask is that i'm using omniremote now. it gives me better range than the rio remote at home. if palantir can beam playlists using consumer ir, i think i'd be content for life.

Posted by: Micman2b

Re: Palantir 0.90 and Empire 0.20 - 06/07/2003 11:02

Yeah, I kind of had the feeling that the IrDA was a little different than the remote IR. Maybe in the future OmniRemote, or some other type of IR control, can be incorporated on the Palm then...

Thanks for the info...

Sean
Posted by: cushman

Re: Palantir 0.90 and Empire 0.20 - 06/07/2003 11:56

Consumer IR is an undefined standard and is really only suited for single commands, since many of the vendors only support a data length of 32 bits. It is also one-way, and although it could be hacked to provide better data integrity, it is not a good solution for data transfer. The way a remote works is to spam the reciever over and over again with the same ir signal, and the reciever ignores all subsequent signals if there is not a gap in the sequence of x microseconds. This is how consumer ir devices ensure that the signal arrived at the reciever. It would be a very bad hack to get it to transfer a playlist.
Posted by: cushman

Re: Palantir 0.90 and Empire 0.20 - 06/07/2003 12:07

It is a bit different, but there is an article that I have found about creating a consumer ir pulse on the Palm using the Palm devices IrDA transmitter. The only problem is that it is hardware dependant on the Dragonball processor, and would not work on PalmOS 5 devices (ARM chips) without some similar trick. I may get some time to try and work on a remote for the Empeg on the Palm later.

Here is the article about pulse shaping on the Palm: http://www.calsoft.co.in/techcenter/network/pulseshaping.html

I've attached some information about the Pioneer IR signal that comes from a Pioneer remote. All I would need to do is figure out how to create the signals, then I could send any command I wish. If anyone out there knows if the Empeg can recieve these signals, I would appreciate it. Here is some basic info, and more information is in the attached text file.

Code length: 32 bits
Frequency: 39.2kHz
Bit length: 550us

Does that look like it matches the ir reciever of the Empeg?
Posted by: Micman2b

Re: Palantir 0.90 and Empire 0.20 - 11/07/2003 16:47

MarkC,
This is an excellent application. I installed last eve with little trouble.

Thanks for the hard work.

Sean
Posted by: image

Re: Palantir 0.90 and Empire 0.20 - 14/07/2003 07:21

i just noticed a bug in the artist search. it doesn't recognize hyphens as part of the search at all. entering it or skipping it (ala empeg search) doesnt make a difference.
Posted by: cushman

Re: Palantir 0.90 and Empire 0.20 - 14/07/2003 07:46

Yup, you're right. I'll put that in the README for the next release, but I don't think I'll be fixing it (anytime soon anyway). The way the search works right now is good enough, it willl get you close enough to the artist as-is. The problem stems from the default collator in PalmOS sorting differently from the collator in Java (where I initially sort the database).