Pages: [1] 2   Go Down
Author Topic: DUE and windows problems  (Read 3020 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-sad
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
Logged

Forum Administrator
Milano, Italy
Offline Offline
Sr. Member
*****
Karma: 23
Posts: 292
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

C.

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Forum Administrator
Milano, Italy
Offline Offline
Sr. Member
*****
Karma: 23
Posts: 292
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

C
Logged

C.

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i'm using exactly the example included in the IDE 1.5
Code:
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);
}
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

up smiley-sad
Logged

Grand Island, New York, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Austin, TX
Offline Offline
God Member
*****
Karma: 12
Posts: 524
carpe diem
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Venezuela
Offline Offline
God Member
*****
Karma: 17
Posts: 522
Ground, ground, always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

my desktop cannot recognise arduino as "BOSSAC" what's the problem? smiley-sad
Logged

Wahiawa, Hawaii
Online Online
God Member
*****
Karma: 32
Posts: 641
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Wahiawa, Hawaii
Online Online
God Member
*****
Karma: 32
Posts: 641
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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..
Logged

Wahiawa, Hawaii
Online Online
God Member
*****
Karma: 32
Posts: 641
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Logged

Pages: [1] 2   Go Up
Jump to: