Regarding OSGI Device Access?

Hello All,

I need help.

Let us say, I have a PrinterBundle, which creates a "PrinterDevice" (OSGI Device service).. and I have another bundle "A", which has ADriver (interested in "PrinterDevice" for match) and it registers an OSGI Service "PrinterImpl" on its attach method.

When Bundle A is installed/started in the framework, it registers the ADriver (OSGI Driver service).

PrinterBundle gets started and creates a "PrinterDevice" , as soon as a new "Printer" is added to the network.

Now, when a "Printer" is connected to the network, a "PrinterDevice" is created, which lets the OSGI DeviceManager look for all "Drivers" and call its match method.

My ADriver.match() is successful for the "PrinterDevice" and so ADriver.attach() is called, which does its own thing..

Question 1: If my Driver is registered before my Device is created, then all this works fine. However, If I register a Driver , after a "PrinterDevice" (meaning a Device was already created and DeviceManager at that time , had no Drivers to call upon), then it misses the Device (meaning, the Device is there idle, not attached to anyone).

How to solve this problem.?

Question 2: Also a Note: When I read the spec, I came across this description for "Driver Registration"...

When a new driver is registered, algorithm 5.1 (discovery) must be applied to each idle device. This gives the new driver a chance to compete with other drivers for attaching to the idle devices.

Is this true?...

Generally, If I have a Driver registered after the Device are created, will the Device Manager, recognize the new Drivers and pick up the Devices and go thru a discovery cycle?

I guess, there might be a simple way to ask this question..? Anyway, If you can make out my questions, please provide me with you answer.?

I appreciate your anwer.

Thanks

Kumaran

[1937 byte] By [kumaranm] at [2007-9-26 15:42:50]
# 1
Yes to question 2, which solves question 1. These are added to OSGi Device Access R2, I believe.- Kirk
kirkc at 2007-7-2 18:40:17 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2

hey,

I really want to develop a device controll using JES, but I am confused with driver stuffs. Can you guide me how can i develope or get driver for particular device ? Is it possible for you to explain me, how this device get connected and how my set-top box can communicate with them ? I would appreciate.

Thanks

vaibhavsevale at 2007-7-2 18:40:17 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 3

hey,

I really want to develop a device controll using JES, but I am confused with driver stuffs. Can you guide me how can i develope or get driver for particular device ? Is it possible for you to explain me, how this device get connected and how my set-top box can communicate with them ? I would appreciate.

Thanks

vaibhavsevale at 2007-7-2 18:40:17 > top of Java-index,Java Mobility Forums,Consumer and Commerce...