Native USB Port

Hi

I want to use Native USB Port of the Arduino Due to transfer data to PC.

I read various threads and forums, but I am still not able to see the data in PC, i.e., "Hello" in the IDE Serial Monitor.

I tried:

1- Resetting the board after Upload.
2- Other USB cable.
3- Setting different baud rates (1200 to 2000000).
4- Using 3 different USB ports on my PC.
5- Upload using both Native USB and Programming ports. (When using Programming port, I disconnected the cable from that port after uploading done, and hooked the cable onto the Native port).

My code:

void setup() {

  pinMode(LED_BUILTIN,OUTPUT);
  SerialUSB.begin(115200);
//  while(!SerialUSB);
}

void loop() {
 
  SerialUSB.print("Hello");
  digitalWrite(LED_BUILTIN,HIGH);
  delay(10);
  digitalWrite(LED_BUILTIN,LOW);
  delay(100);
}

After uploading done(using Native port), the LED blinks, and when I open the Serial Monitor, the LED stops blinking.

When I uncomment the line:

// while(!SerialUSB);

the LED does not blink at all, and it seems that the state of SerialUSB object does not change to true.

Any comments and suggestion will be appreciated.

It works with my board.

Did you select Tools>board>Arduino DUE (Native USB Port) before uploading your skecth ?

Yes I did.

Works for me too.

Did you select Tools>port> COMx(Arduino DUE(Native USB Port)) ?

ard_newbie:
Did you select Tools>port> COMx(Arduino DUE(Native USB Port)) ?

Yes I selected that.
(The sketch uploaded successfully....)

Unless you have a faulty USB cable (although I doubt because you uploaded succesfully your sketch), I see no other explanation than a faulty board. Maybe the Native USB socket on the board is broken.

Just to be sure: the Programming port is the closest to the jack, the Native USB socket is the other one.

ard_newbie:
Unless you have a faulty USB cable (although I doubt because you uploaded succesfully your sketch), I see no other explanation than a faulty board. Maybe the Native USB socket on the board is broken.

Just to be sure: the Programming port is the closest to the jack, the Native USB socket is the other one.

Yes, I connect the cable to the Native USB connector (Closest to the Reset button).

I can't understand why this may be related to board? when the Serial Monitor is opened, the LED stops blinking. Does it necessarily means that the board is damaged?

Is there a simple way to see the USB data, somewhere out of the IDE?
A terminal, for example?

Thanks ard_newbie for your answers.

I guessed that maybe this is a software (driver) problem...

So, I updated the USB drivers on my computer (with Driver Booster), and restart the PC while the Due was connected to a USB port,
And after reboot, everything is OK!!

HelloHelloHello... is on my Serial Monitor!

Thank you very much ard_newbie and pert.