Jump to content

Brian Van Den Beuken

Members
  • Content Count

    12
  • Joined

  • Last visited

Posts posted by Brian Van Den Beuken


  1. oops, I feel a bit silly, while my basic fix is correct I was actually doing in on a different machine connected to my kvm.. which was using ubuntu, sorry 😄 (I thought it was the TB2 it was in fact a Jetson) 

     

    It seems Debian doesn't have /dev/input/mice and instead I need to check which event is controlling the mouse.... sigh. I kinda hate these small variations 😄

     

    But you have put me on the right track, I wasn't  accessing the mice config file (cos there isn't one) and on machines which had it it was indeed a permissions issue, so I need to review how I access my config files for keyboard and mouse.

     


  2. ok I managed to fix it, it was an access permission issue, the mice file was not allowing access so I had to use sudo chod a+r+w to make it usable. I know this isn't something linux users like to do, is there an elegant way to allow access to a file in C++?

     


  3. Hi, 

    Im not sure what your asking me to check with that command, my dev path is correct isnt it? Its listed there

    const char* devpath = "/dev/input/mice";

    and the mice file is there in place

    and I open the mice file ok, it just refuses to switch mode?


  4. on the current spec page there's a claim that it reaches 797 

    Tinkerboard 2 specs

    thats far from the results I get of 233/234 and the orginal TB board would manage around 400 again far below what you report,    so it seems the TB2 isnt' really fully using its potential.

     

    What versions of GLMark2-es2 were you using, I am building the current 2021-2 version, X11-glesv2 flavour

     

    How can I unlock this addtional GPU power you report?


  5. got my TB2 today, and pleased to say it works pretty much out of the box. But I do have one small issue, my project needs me to get access to the mouse scroll wheel, directly, and normally I do this by putting the mouse into ImPS/2 mode

    using this code... however it gives me the the cannot switch error... Is there any known reason for this?

    static const size_t        mousedev_seq_len = 6;
    static const unsigned char mousedev_imps_seq[] = { 0xf3, 200, 0xf3, 100, 0xf3, 80 };
    	unsigned char buffer[4];
    	ssize_t       len;
    	const char* devpath = "/dev/input/mice";
    	
    	int           wasleft, wasmiddle, wasright;
    
    	devfd = open(devpath, O_RDWR | O_NOCTTY);
    
    	/* Switch the mouse to ImPS/2 protocol. */
    	if (write(devfd, mousedev_imps_seq, mousedev_seq_len) != (ssize_t)mousedev_seq_len) 
    	{
    		fprintf(stderr, "Cannot switch to ImPS/2 protocol.\n");
    		close(devfd);
    		return (void*)&devfd;; // this is rubbish to give a retun value
    	}
    	if (read(devfd, buffer, sizeof buffer) != 1 || buffer[0] != 0xFA) {
    		fprintf(stderr, "Failed to switch to ImPS/2 protocol.\n");
    		close(devfd);
    		return (void*)&devfd;
    	}

     

×
×
  • Create New...