Pages: [1]   Go Down
Author Topic: Due USB Host Port Problem  (Read 909 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear Gurus,

I'm trying to connect an external USB Device, that internally uses the FTDI USB/Com Port bridge chip, to the Due Usb Host Port using the SerialUSB object.
But the status of SerialUSB remains "0".
Any ideas what I'm doing wrong?


Code:
char dataout[256];
char datain[256];
 
void setup()
{
  SerialUSB.begin(38400);
  SerialUSB.setTimeout(500);
  Serial.begin(115200);
  delay(500);
  //while(!SerialUSB); //here it waits forever if uncommented
}
void loop()
{
  Serial.print("SerialUSB: ");
  Serial.println(SerialUSB); // it says "0"
  strcpy(dataout,"ATI");
    Serial.print("Out: ");
    Serial.println(dataout);
    SerialUSB.print(dataout);
    SerialUSB.print("\r ");
    delay(200);
    Serial.print("SerialUSB bytes available: ");
    Serial.println(SerialUSB.available());
    //SerialUSB.readBytesUntil(13,datain,16);
    Serial.print("In:  ");
    Serial.println(datain);
    delay(1000);
}

When I run the the Native USB Port Descriptor code http://forum.arduino.cc/index.php?PHPSESSID=ttpp845u9t0ld93dj9adhgt0n6&topic=199608.0
I get plausible results:
String Descriptors:
Manufacturer: FTDI
Product:   USB <-> Serial Cable
Serial: FTWRT2L8

Device Descriptor:
Descriptor Length: 22
Descriptor type: 1
USB version: 200
...
Logged

Pages: [1]   Go Up
Jump to: