This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB Mouse interface with DM355



Hello,

I want to include USB mouse (HID) as cursor window in DM355. Cursor window should move with mouse movement.

How I can configure the mouse and cursor window. Plz help me.

Bala...

  • You would have to use Xwindows utility such as "startx" to accomplish the same.

     

    regards

    swami

  • Thanks for your fast replay.

    Can you explain brief, I am new to DM355 and linux. How can I make it. Plz.

    Bala...

  • From DM355 console prompt issue "startx" command.  Connect the video out from DM355 to TV.  You should be able to see Xwindows environment on TV.  If you connect USB mouse to DM355 (ensure that you have enabled HID support in the kernel ) you can use the USB Mouse in the Xwin environment.

     

    regards

    swami

  • Bala said:
    Cursor window should move with mouse movement.

    Just to note, running X draws the mouse cursor in the frame buffer, I do not believe it actually uses the cursor window, if you really wanted to use the cursor window you would probably have to go and modify X.

  • Thanks to all for your fast replay.

    I got the screen with mouse interface. Actually I want to make the cursor window over the all video and OSD windows.

    How can I make all those things.

    bala...

  • The cursor window and the mouse capability are two seperate drivers, so if you wanted them to work together you would need to combine them in an application, or another driver layer (there is nothing out of the box for this). The cursor window itself would be controlled through the FBIO_SET_CURSOR IOCTL in the FBDev display driver, so you would need to develop an application that takes input from the Linux standard mouse input and modifies the cursor window accordingly.

  • Hello,

    In this command "ioctl(fd, FBIO_SET_CURSOR, &cursor);" what I want to use for these arguments

    • Arg1 int fd
    • Arg3 struct fb_cursor * argp. How I can get fd value.

    And also how to get the USB mouse data. I seen USB HID driver is included with LSP 1.10 (MV 4.0.1 Kernel 2.6.10). How can I get those data.

    Is any example available for cursor window and mouse interface. Plz help us.

    Bala....

  • fd is a handle returned as a result of opening a frame buffer device (e.g. open(/dev/fb/2)); you will see examples of this in the demos.  The "Interface" demo even uses the cursor window.

  • Hello,

    To open cursor window which device entry can be use. The /dev/fb/2 is for OSD window1, like that what is the device entry for cursor window.

    How can I open cursor window.

    Which struct want to use for Arg3 in ioctl -- FBIO_SET_CURSOR, with which header it’s included.

    Can you give the exact path for that examples, which uses the cursor window. I am using "dvsdk_1_30_00_40".

    Bala...

  • I apologize for the bad example I gave as cursor is not actually a frame buffer type device (dev/fb/x); I cannot recall to device type and cannot readily look it up (I am on vacation...), but if you look at the interface example, you should be able to find the device type (e/g/ /dev/xxx) in the source code by looking for the open() function call to get the handle.  Hope this points you in the right direction.

  • Thanks for your information.

    Now I can enable the cursor window.

    Now I want to move this cursor with USB HID mouse data.

    I checked with LSP1.20 (sprs496a.pdf) data manual, under chapter 2.4 USB Driver, I didn’t get any ioctl support for HID.

    How to open and enable this USB HID mouse, and how to get those mouse data. Plz help me

    Regards,

    Bala...

  • USB Keyboard/Mouse are compliant with the HID device class under Linux.  Much like the normal keyboard or mouse.  Pl. refer to the event interface information or the procedure to be followed to access a normal keyboard or mouse.

    In the USB config enable support for event interface and the USB keyboard, Mouse will have a device node created as "/dev/event[0,1,2]" etc. 

    also refer to evtest application for further help.  Search for evtest in google.  You would get hold of this app.

    regards

    swami

  • Do you have any example program with USB mouse interface...

    Bala...

  • Hello,

    In terminal I issue this command "cat /dev/input/mice". I got some number and symbols in terminal window while moving mouse.

    How I can use those data in my program.

    Plz help me....

     

    Bala...

     

  • Hello,

    In terminal I issue this command "cat /dev/input/mice". I got some number and symbols in terminal window while moving mouse.

    How I can use those data in my program.

    Plz help me....

    Now I can able to open the device, just I gave "open ("/dev/input/mice",0)" in my program. But I don’t know how to get the mouse data. Any idea…

     

    Bala...