Go Down

Topic: DUE and windows problems (Read 3358 times) previous topic - next topic

razer93

hi guys, i'm playing with mouse/keyboard emulation on the DUE board (native usb of course), i noticed that those sketches doens't work on my windows7 32bit machine :(
on mac all just works good, on windows it recognise me the device as "Arduino Due" with this id: USB\VID_2341&PID_003E&REV_0100

even installing drivers nothing changes... doesn't work!!
any clue?
thanks

cmaglie

I see that Windows is very slow to enumerate USB devices (it takes 3 or 4 seconds at least) while linux and mac are a snap.

Try to add a delay(5000) before Keyboard.begin().

C
C.

razer93

nothing to do... someone with windows? or same problem? other solutions?

cmaglie

May you post your sketch? I'll try on my PC, maybe I can reproduce the bug...

C
C.

razer93

i'm using exactly the example included in the IDE 1.5
Code: [Select]
const int upButton = 2;     
const int downButton = 3;       
const int leftButton = 4;
const int rightButton = 5;
const int mouseButton = 6;

int range = 5;              // output range of X or Y movement; affects movement speed
int responseDelay = 10;     // response delay of the mouse, in ms


void setup() {
  // initialize the buttons' inputs:
  pinMode(upButton, INPUT);       
  pinMode(downButton, INPUT);       
  pinMode(leftButton, INPUT);       
  pinMode(rightButton, INPUT);       
  pinMode(mouseButton, INPUT);
  // initialize mouse control:
  Mouse.begin();
}

void loop() {
  // read the buttons:
  int upState = digitalRead(upButton);
  int downState = digitalRead(downButton);
  int rightState = digitalRead(rightButton);
  int leftState = digitalRead(leftButton);
  int clickState = digitalRead(mouseButton);

  // calculate the movement distance based on the button states:
  int  xDistance = (leftState - rightState)*range;
  int  yDistance = (upState - downState)*range;

  // if X or Y is non-zero, move:
  if ((xDistance != 0) || (yDistance != 0)) {
    Mouse.move(xDistance, yDistance, 0);
  }

  // if the mouse button is pressed:
  if (clickState == HIGH) {
    // if the mouse is not pressed, press it:
    if (!Mouse.isPressed(MOUSE_LEFT)) {
      Mouse.press(MOUSE_LEFT);
    }
  }
  // else the mouse button is not pressed:
  else {
    // if the mouse is pressed, release it:
    if (Mouse.isPressed(MOUSE_LEFT)) {
      Mouse.release(MOUSE_LEFT);
    }
  }

  // a delay so the mouse doesn't move too fast:
  delay(responseDelay);
}


I installed Windows 8 on my desktop and then attempted to install the Arduino Due driver.

Windows 8 refuses to accept the Arduino USB driver because it is "unsigned". The message returned is: "The third party INF does not contain digital signature information".

Previous renditions of Windows allowed you to override the "unsigned" warning and continue, Windows 8 will not allow installation of a driver without the proper digital signature.

Looks like a show-stopper for Windows 8 users.

Cheers,
Jim Lynch

Louis Davis

Follow the steps at the following link:
http://arduino.cc/forum/index.php/topic,94651.msg727588.html#msg727588

Palliser

Hey razer93, you sketch works perfectly in my laptop but with Windows 7 x64 SP1. Like you, I am using the native USB port.
I wanted to share a couple of things that happened during the first time I connected DUE to my laptop:

1. Like lynchzilla, I got the red warning about the signature but Windows allowed me to override it.
2. Windows recognized an 'Arduino Due X' driver but I couldn't make anything work! So I re-booted my laptop and the driver was gone; then, I re-installed the driver making Windows browse the arduino-1.5-windows folder and a 'bossac' driver showed up. Finally (and automatically), after few minutes, the Arduino Due driver (ver. 5.1.2600.0) took over again.

razer93

my desktop cannot recognise arduino as "BOSSAC" what's the problem? :(

hiduino

It's not clearly stated, but it appears the BOSSA code only runs after you "erase" the flash.  You can try pressing the "ERASE" button then unplug-replug the Native USB port again.  It should be detected as a BOSSA programming port.


razer93

ok now i can detect as BOSSA programming port.. but keyboard and mouse emulation still doenst work...

hiduino

Did the "Arduino Due" driver install for the Native port in Windows?
If not check http://arduino.cc/forum/index.php/topic,131100.0.html


razer93

Yes, Arduino Due device is correctly installed, and it shows up when a sketch is uploaded or when i try to emulate mouse-keyboard... but doesn't work..

hiduino

Okay, I have confirmed your same issue on the my Due.  As a comparison I tried the KeyboardAndMouseControl on my Leonardo and it works fine.

One thing I noticed as I watched the Windows Device Manager when I plugged in my Leonardo it was detected on one COM17 port which is used for the programming, but then after about 5 seconds it re-detects on COM18 which is used for serial comm.   But in addition it also installed a USB Human Interface Device.

The Due does not do this.  Which leads me to believe the Arduino Due driver is not supporting this feature yet.
Anyone else knows if this is true or not?


Go Up