FORUMS

[NDK App and Java App] Working on a new VNC Server V1.86

337 posts
Thanks Meter: 81
 
By knoxbrder, Senior Member on 2nd February 2012, 07:02 AM
Post Reply Email Thread
12th April 2012, 07:10 PM |#241  
Senior Member
Flag Los Angeles
Thanks Meter: 54
 
More
Quote:
Originally Posted by knoxbrder

There is probably some way to get it to appear on at least some other devices, but I have no idea how to do it.

I know that if I connect a Bluetooth mouse to the Archos G9, I get a mouse pointer on the screen. I actually tried using /dev/input/event5, but no change. I also tried the following input devices:
  • /dev/input/event0...6 (all 7 devices)
  • /dev/input/mice
  • /dev/input/mouse0

Don't know if that will help you narrow your search, but as we all know, knowing is half the battle.

- Dave
12th April 2012, 08:19 PM |#242  
OP Senior Member
Thanks Meter: 81
 
More
To identify the mouse device do the following:
- connect real mouse and verify cursor moves on screen
- from adb or a terminal run "od -x /dev/input/eventX" (where X is one of the existing devices)
- move the mouse and see if data comes from the od command
- repeat with all X until you find the device

To start using the mouse event device:
- vncx -k input -t /dev/input/eventX (where you identified X above)

Maybe the mouse will work thru vnc :)

If it doesn't work then run the od command again and barely move the real mouse and send me the output. Try to move the mouse as little as possible. The run another od command and try to click the real mouse without moving it.

All this should work and works on my transformer. But it is not the "right" way to activate a mouse pointer in general for all devices. I just don't know how to do that (yet).

Cheers.
13th April 2012, 12:29 AM |#243  
Senior Member
Flag Los Angeles
Thanks Meter: 54
 
More
SO, I ran the "od -x /dev/input/..." command and a few other tests and came up with some interesting findings.
  • First, devices event6 and mouse0 only appear when the Bluetooth mouse is connected; they're not present at other times. This may mean that it would require some sort of device emulation to work (this is pure speculation; I'm know kernel dev).
  • No matter which device I tried in /dev/input, I never got a cursor. I tried using it when the Bluetooth mouse was on and off.
  • vncs doesn't recognize /dev/input/mice or /dev/input/mousex. I get the following output:

    Code:
    /data/local # ./vncs -k input -t /dev/input/mice 
    ./vncs Version 1.65
    need init
    Initializing framebuffer device /dev/graphics/fb0...
    --Initializing gingerbread access method--
    screenshot info: 32 1024 768 3145728
    xres=1024, yres=768, xresv=1024, yresv=768, xoffs=0, yoffs=0, bpp=32
    bInitializing VNC server:
            scale:  1
            width:  1024
            height: 768
            bpp:    32
            port:   5901
    Initializing keyboard device input ...
    Initializing touch device /dev/input/mice ...
    cannot get ABS_X info, Not a typewriter
  • Based on the amount of output, I'm certain that the Bluetooth mouse (in this case an Apple Magic Trackpad) is generating and using /dev/input/event6
Here's the output from "od -x /dev/input/event6":
Code:
/data/local # od -x /dev/input/event6 
0000000 5325 0000 745d 0008 0003 0039 0006 0000
0000020 5325 0000 745d 0008 0003 0030 00a4 0000
0000040 5325 0000 745d 0008 0003 0031 0110 0000
0000060 5325 0000 745d 0008 0003 0034 0000 0000
0000100 5325 0000 745d 0008 0003 0035 0449 0000
0000120 5325 0000 747b 0008 0003 0036 004b 0000
0000140 5325 0000 747b 0008 0000 0002 0000 0000
0000160 5325 0000 747b 0008 0001 014a 0001 0000
0000200 5325 0000 747b 0008 0001 0145 0001 0000
0000220 5325 0000 747b 0008 0003 0000 0449 0000
0000240 5325 0000 747b 0008 0003 0001 004b 0000
0000260 5325 0000 747b 0008 0000 0000 0000 0000
0000300 5325 0000 74b8 0008 0003 0039 0006 0000
0000320 5325 0000 74b8 0008 0003 0030 00b8 0000
0000340 5325 0000 74b8 0008 0003 0031 00fc 0000
0000360 5325 0000 74b8 0008 0003 0034 0000 0000
0000400 5325 0000 74b8 0008 0003 0035 044e 0000
0000420 5325 0000 74b8 0008 0003 0036 004a 0000
0000440 5325 0000 74d7 0008 0000 0002 0000 0000
0000460 5325 0000 74d7 0008 0003 0000 044b 0000
0000500 5325 0000 74d7 0008 0000 0000 0000 0000
0000520 5325 0000 9d22 0008 0003 0039 0006 0000
0000540 5325 0000 9d40 0008 0003 0030 00d4 0000
0000560 5325 0000 9d40 0008 0003 0031 00f4 0000
0000600 5325 0000 9d40 0008 0003 0034 0020 0000
0000620 5325 0000 9d40 0008 0003 0035 0451 0000
0000640 5325 0000 9d40 0008 0003 0036 0048 0000
0000660 5325 0000 9d40 0008 0000 0002 0000 0000
0000700 5325 0000 9d5f 0008 0003 0000 044e 0000
0000720 5325 0000 9d5f 0008 0003 0001 004a 0000
0000740 5325 0000 9d5f 0008 0000 0000 0000 0000
0000760 5325 0000 9dd9 0008 0003 0039 0006 0000
0001000 5325 0000 9dd9 0008 0003 0030 00cc 0000
0001020 5325 0000 9dd9 0008 0003 0031 00e4 0000
0001040 5325 0000 9dd9 0008 0003 0034 0000 0000
0001060 5325 0000 9df7 0008 0003 0035 0450 0000
0001100 5325 0000 9df7 0008 0003 0036 004a 0000
0001120 5325 0000 9df7 0008 0000 0002 0000 0000
0001140 5325 0000 9df7 0008 0000 0000 0000 0000
0001160 5325 0000 c8a5 0008 0003 0039 0006 0000
0001200 5325 0000 c8a5 0008 0003 0030 00bc 0000
0001220 5325 0000 c8a5 0008 0003 0031 00f0 0000
0001240 5325 0000 c8c3 0008 0003 0034 0000 0000
0001260 5325 0000 c8c3 0008 0003 0035 044f 0000
0001300 5325 0000 c8c3 0008 0003 0036 004c 0000
0001320 5325 0000 c8c3 0008 0000 0002 0000 0000
0001340 5325 0000 c8c3 0008 0000 0000 0000 0000
0001360 5325 0000 f4a2 0008 0003 0039 0006 0000
0001400 5325 0000 f4a2 0008 0003 0030 0088 0000
0001420 5325 0000 f4a2 0008 0003 0031 00b0 0000
0001440 5325 0000 f4a2 0008 0003 0034 0000 0000
0001460 5325 0000 f4c0 0008 0003 0035 0452 0000
0001500 5325 0000 f4c0 0008 0003 0036 004c 0000
0001520 5325 0000 f4c0 0008 0000 0002 0000 0000
0001540 5325 0000 f4c0 0008 0003 0000 0450 0000
0001560 5325 0000 f4c0 0008 0000 0000 0000 0000
0001600 5325 0000 2080 0009 0003 0039 0006 0000
0001620 5325 0000 2080 0009 0003 0030 0000 0000
0001640 5325 0000 2080 0009 0003 0031 0000 0000
0001660 5325 0000 2080 0009 0003 0034 0000 0000
0001700 5325 0000 2080 0009 0003 0035 0452 0000
0001720 5325 0000 209f 0009 0003 0036 004c 0000
0001740 5325 0000 209f 0009 0000 0002 0000 0000
0001760 5325 0000 209f 0009 0000 0000 0000 0000
0002000 5325 0000 4dae 0009 0001 014a 0000 0000
0002020 5325 0000 4dae 0009 0001 0145 0000 0000
0002040 5325 0000 4dae 0009 0000 0000 0000 0000
Sorry, that's as short a burst as I could get.

Thanks for taking a look!
- Dave
13th April 2012, 02:28 AM |#244  
OP Senior Member
Thanks Meter: 81
 
More
event6 definitely looks like a mouse from the data.

So, with the mouse plugged in:
"vncs -k input -t /dev/input/event6" should show the mouse cursor and it "might" allow movements via vncviewer.

But, most likely, the event stream I send will not be right for your phone and I will have to tweak the code for just that device.

I'm hoping to figure out a way to get the cursor to appear without using these "real" devices. But I haven't had time to look yet.
The Following User Says Thank You to knoxbrder For This Useful Post: [ View ] Gift knoxbrder Ad-Free
13th April 2012, 07:53 PM |#245  
Senior Member
Flag Los Angeles
Thanks Meter: 54
 
More
Quote:
Originally Posted by knoxbrder

event6 definitely looks like a mouse from the data.

So, with the mouse plugged in:
"vncs -k input -t /dev/input/event6" should show the mouse cursor and it "might" allow movements via vncviewer.

But, most likely, the event stream I send will not be right for your phone and I will have to tweak the code for just that device.

I'm hoping to figure out a way to get the cursor to appear without using these "real" devices. But I haven't had time to look yet.

Sadly, shadowing event6 does not show the cursor movement via vncviewer. (I had attempted that same command during my initial tests.) I'm still more than happy to have a solid VNC server for my small tablet. Many thanks, and I look forward to testing future revisions!

- Dave
13th April 2012, 09:30 PM |#246  
Junior Member
Thanks Meter: 0
 
More
Newbidy Noob thinks he knows how to run this.
Hello.

I've read this entire thread and I think I know how to install and get this running but before I journey into the unknown I was hoping to get some tips.

1. I downloaded the two files and put them on my Nexxus S 4G ... on the SDCard

2. I installed the vnclauncher.apk

3. My phone is unlocked and Rooted. Superuser seems to be working.

4. I'm on 4.0.4.

5. I installed and fired up ConnectBot

6. If I'm reading this right.... I use the VNC Preferences bit to setup some prefs. Then I open my local connection with ConnectBot, navigate to the directory with VNCS in it and launch it with the command line using the appropriate switches.

Question 1: For the Nexxus S 4G this looks right? Or are the prefs are really set in the VNC Launcher app?

vncs -t /dev/input/event1 -s -n

Question 2: Do I need to move vncs into /data/local. ? or can I just fire it off where it is? That's just the "data" folder off home right? I'm looking at it with OI File Manager...

Thanks for any tips!
14th April 2012, 02:58 AM |#247  
simonbove's Avatar
Member
Flag Svendborg
Thanks Meter: 14
 
Donate to Me
More
Hiii..
I have installed this on my galaxy nexus with 4.0.4 and it works perfect..
The screen lags on the computer, but that is how it works with screenshots..

I have also installed it on my Kindle Fire, and works lovely, except for the mouse, its wrong... When i push at the back button in the left bottom side, it pushed in the right bottom side on the Kindle Fire... Didnt find any in this thread with this issue, but i may have missed it...

And i can't see any settings to change the input from the computer...

Any ideas?
14th April 2012, 11:05 AM |#248  
Junior Member
Thanks Meter: 1
 
More
Garbled screen on Galaxy Tab with 1.65
Quote:
Originally Posted by knoxbrder

...
Neralun:
- I will add an option to set the pointer rotation offset from the screen rotation offset.
- the auto-size detection in 1.65 still needs more work obviously. I will add an override if necessary. Can you post the output of the server starting?

Command-line:
Code:
./vncs -d 300000 -P 5901 -k uinput -t /dev/input/event2 -s
Output:
Code:
./vncs Version 1.65
need init
Initializing framebuffer device /dev/graphics/fb0...
--Initializing gingerbread access method--
screenshot info: 32 1024 600 2457600
xres=1024, yres=600, xresv=1024, yresv=1200, xoffs=0, yoffs=600, bpp=32
bInitializing VNC server:
        scale:  1
        width:  1024
        height: 600
        bpp:    32
        port:   5901
Initializing keyboard device uinput ...
init keyboard device as uinput
---Initializing uinput...---
---Initializing uinput...---
Not using TOUCH_DEVICE because of uinput
Initializing server...
rfbGetScreen bpp: 32
14/04/2012 11:47:14  Listening for VNC connections on TCP port 5901
14/04/2012 11:47:14  ListenOnTCPPort: Address already in use
16 8 8 8 0 8
For comparison, here the output of 1.63:
Code:
./vncs Version 1.63
need init
Initializing framebuffer device /dev/graphics/fb0...
xres=1024, yres=600, xresv=1024, yresv=1200, xoffs=0, yoffs=0, bpp=32
--Initializing gingerbread access method--
screenshot info: 32 1024 600 2457600
bInitializing VNC server:
        scale:  1
        width:  1024
        height: 600
        bpp:    32
        port:   5901
Initializing keyboard device uinput ...
init keyboard device as uinput
---Initializing uinput...---
---Initializing uinput...---
Not using TOUCH_DEVICE because of uinput
Initializing server...
rfbGetScreen bpp: 32
14/04/2012 11:59:37  Listening for VNC connections on TCP port 5901
16 8 8 8 0 8
The only difference seems to be the value of yoffs...

The unrotated screen of the Tab has 600x1024 resolution, I use a custom Gingerbread ROM based on CM7.

An option for rotating the mouse independent of the screen would indeed be helpful; 1.63 would work great with that.
14th April 2012, 03:52 PM |#249  
OP Senior Member
Thanks Meter: 81
 
More
stealthdave:
- glad it mostly works; maybe we can figure out the mouse pointer in the future

bass-o-matic:
- if you install the apk like a normal android app you don't need vncs or connectbot or a shell; just set your choices in the gui and press menu and start server; the gui has vncs included
- the standalone vncs you can optionally download is for people that don't want to use the gui; you can give it the options on the command line; I suggest you use the gui and don't install the standalone vncs at all
- in the gui, you might need the swap colors option, set the keyboard to uinput and that is probably enough

simonbove:
- it sounds like you have the same rotated coordinates another user reported in this thread a page or so ago; I will be adding an option to rotate the coordinates shortly

neralun:
- the output from 1.65 says it could not bind to the port; do you have another copy of my server running or another vnc server? If the server can't bind then you are looking at the output from a different server and the options for this instance won't have any effect. When using -k uinput the -t option is ignored; you can just leave it off.
The Following User Says Thank You to knoxbrder For This Useful Post: [ View ] Gift knoxbrder Ad-Free
15th April 2012, 01:09 AM |#250  
simonbove's Avatar
Member
Flag Svendborg
Thanks Meter: 14
 
Donate to Me
More
Thanks a lot Will look back later then
But everything else works perfectly on my devices

Thanks for a great job
15th April 2012, 04:11 AM |#251  
OP Senior Member
Thanks Meter: 81
 
More
1.70 rotation offset for pointer and widget
vncs:
Command line -T for specifying rotation offset of pointer for those devices that need it.

gui:
Specify rotation offset of pointer.
Add a widget to the desktop; it updates at the same frequency as the notification.
Enlarge the 1x1 widget to see status and time of update (like notification)

Test away! I am sure there are some issues; who can find them? :)
Attached Files
File Type: apk vnclauncher.apk - [Click for QR Code] (240.3 KB, 25 views)
File Type: zip vncs.zip - [Click for QR Code] (189.4 KB, 27 views)
Post Reply Subscribe to Thread

Tags
galaxy s2, nexus one, prime, vnc server

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes