Tuesday, April 28, 2009

Cairo - draw like you draw on paper

GDK really sucks man! Cairo is the best. I'm not yet sure whether they can be compared, in the sense that they may be considered in the same category. But anyway cairo is the best drawing library that I have ever seen. They are as simple as Python programming and, as is Python, you can do wonders with simple code. More on cairo also soon.. And mind you: ITS C AND NOT CPP. I had a bit confusion. Thinking that its CPP I had initially neglected Cairo which I regret now.

Compat wireless - Jay Ho!

It was a great day for me. Compat wireless was a name I had heard few days back. Its a project that aims at bringing in all the wireless drivers together. It brings in a great CLI concept, wl, that allows you to communicate with driver directly. Its a cool thing that overtakes iwspy. It has better and more meaningful commands as well as better output. I will post more about it soon.

Saturday, April 25, 2009

JMF - A great thing indeed

Though I do not like Java, I found JMF an interesting thing. It does a lot of things by itself. Basically it has a MediaLocator, that helps in assigning either source or destination of the media. Then a processor that processes the media, determines its format, frame rate, conversion to target format, etc. Then what I know is about the transmitter. It helps in transmitting the data, for eg, using RTP. There are also media players that help to control the media flow. Now all these reduses the effort we would have to put in otherwise.

Streaming video, capturing video from a camera, play back of the same are all some of the applications of this framework. The framework even gives you the power to control tracks..

Wednesday, April 22, 2009

Communication API, JAVA

Java provides communication API for the programs to communicate via Serial and Parallel ports. The funny part is that there are drivers required for the whole thing to work. RXTX works for providing the drivers. Though the steps described in some pages are quite outdated, they can be helpful. Some links are provided below:

java.sun.com/products/javacomm/

www.agaveblue.org/howtos/Comm_How-To.shtml --> Be careful!!

There may be better docs available though. I'm in a hurry.. :)

UPDATED (20-05-2009)
--------------------------------------

It seems that whatever I land up on is a troublesome thing. The javacomm API doesnt work properly in GNU/Linux. They have stopped caring about CommAPI it seems, as many blogs/reviews suggest. The drivers required are mainly for serial port. And that too doesnt seem to work for me!

Well I had RXTX drivers for my rescue. They are the backend support for the CommAPI. It was the one that finally worked for me.

www.rxtx.org

They have a good documentation and a wiki. The thing I was stuck was with the javax.comm.properties that must be added to the JRE folder.

Serial port support is ample, though many baudrates are not available. But that is the limitation from CommAPI. Sun provides a program blackbox for both serial as well as parallel port. It can be used as reference as well as test programs.

Support of parallel port is limitted. You can do the most basic things using the SPP mode. Various modes are there, I dont know how they are useful. They say that these things are required for Printer support. Ah! If you are using Parallel port for you Robot and if you are planning to use Java, make sure you ground all the pins from 18 through 25. Some more connections are required that tells the driver that the printer has no error, its not out-of-paper, it is online, its not busy etc. These are looked into by the driver.

That was the biggest realisation for me. My program was not sending any data through parallel port. Then I saw in some web page about the above mentioned connections. That made me realise that Java API also look into all these. Conformation was got when I tried isBusy() (or something similar) API that said that it is actually busy! While the great thing Python, it simply sets data in the parallel port register and we have it in the pins 2 to 9. No worry about out-of-paper or busy!!

Though I was warned that parallel port must be handled with care and that it can harm the mother board, care was taken that it didnt suck much current.

Dataone can be used via USB

I found it interesting to know that ADSL modem can be used via USB in GNU/Linux. I was told that its tough. Yes, indeed its tough. But its possible. For eg, my Siemens modem use GlobeSpan chipset. The USB driver for the same for GNU/Linux is available for download and appriciable work is being done in this direction. The configuration seemed a bit too geeky, but a small effort can help a user to setup the modem and use it via USB.

Well anyway, its always better to use modem via LAN card!!

Monday, April 20, 2009

Working with drawing..

It was fun and a bit troublesome to work with GDK and GTK. The Computer Graphics and Multimedia paper in our syllabus is quite a good guide indeed. The irony is, I still have not drawn anything :)

The tutorials are kind of much more focused. Not yet found the right "Beginners tutorial". Search terms are really important indeed.