Plans for hal 0.5.x

Andrei Yurkevich urruru at
Tue Dec 14 08:03:03 PST 2004

Dan Williams wrote:

> On Tue, 2004-12-14 at 17:35 +0300, Andrei Yurkevich wrote:
>>Right, at least all PDAs I've seen (and that's been a lot of them) that 
>>connect via USB are built this way. They provide some USB device of 
>>their own that has got a USB-serial converter bound to that USB 
>>interface. However, in the discussion you've mentioned, the idea was to 
>>tag that USB device as a PDA. That's ok in case of USB, but when you 
>>connect a PDA via serial/IrDA or Bluetooth, you won't have that USB 
>>interface device. Instead, you will get a ttyS(n) in case of serial 
>>connection, rfcomm(n) for bluetooth and irtty(n) or ircomm(n) for IrDA, 
>>all of those being serial interfaces. Moreover, there is a way to 
>>distinguish the device connected via these serial interfaces as a PDA or 
>>something else, that could be done by HAL itself or a callout. Thus, we 
>>could simply tag these serial interfaces with some property like 
>>"pda.palm.serial_interface" or "pda.pocket_pc.serial_interface" just to 
>>let the interested applications know that these serial ports lead to a 
>>PDA device. Finally, some callout/daemon/whatever responsible for 
>>establishing a connection with a PDA could do what it needs to when it 
>>sees that there is a PDA available behind some serial interface.
> Well, since each connection method (USB, serial, bluetooth, etc) is
> actually a hardware device itself, why not show the PDA as a _child_ of
> that device?  We are working with parent/child relationships as a
> fundamental property of HAL already.  Therefore you wouldn't necessarily
> need a "pda.palm.serial_interface" property, you could just ask for the
> "device.interface" (or something) property of the parent of the PDA
> object.

I am absolutely agreed with you about having a PDA device as a child 
node of the serial interface, but still I think that creating that node 
and filling it with pda-specific information should be done outside of 
hal. For that reason, HAL could just query the serial interface about 
what's on the other side and if that is PDA it could simply tag the 
serial interface. Then some callout or daemon that knows how to deal 
with different kinds of PDAs (or at leas that kind of PDA connected 
there) could create the PDA node below the serial port and set the 
necessary properties there.

> It would seem like having that property on both the PDA _and_
> the actual device itself would be redundant.  (however, I can see it
> being useful on the PDA so I'm not really objecting to having it there).

In some cases, the fact that the serial port is there does not 
necessarily mean that PDA is available. For instance, when you plug in a 
Pocket PC PDA via USB, you will get a USB device and a USB-serial 
interface, but until you start the software that establishes a 
connection with your PDA you are not able to do anything useful with it.

hal mailing list
hal at

More information about the Hal mailing list