Changes to support Vodafone K4606
Fork of USBHostWANDongle by
Diff: USB3GModule/WANDongle.cpp
- Revision:
- 1:49df46e3295c
- Parent:
- 0:ae46a0638b2c
- Child:
- 2:a8b2d0cd9bbd
diff -r ae46a0638b2c -r 49df46e3295c USB3GModule/WANDongle.cpp --- a/USB3GModule/WANDongle.cpp Thu May 24 16:39:35 2012 +0000 +++ b/USB3GModule/WANDongle.cpp Fri May 25 09:31:41 2012 +0000 @@ -70,7 +70,7 @@ //Vodafone K3770 if ((dev->getVid() == 0x12D1) && (dev->getPid() == 0x14D1)) { - DBG("Vodafone K3370 dongle detected!!!"); + DBG("Vodafone K3370 dongle detected in MSD mode"); for (int j = 0; j < dev->getNbInterface(); j++) { @@ -78,17 +78,17 @@ if ( (bulk_out = dev->getEndpoint(j, BULK_ENDPOINT, OUT)) != NULL ) { - DBG("MSD FOUND on device %p, intf %d, WILL NOW SWITCH MODE!!!", (void *)dev, j); + DBG("MSD descriptor found on device %p, intf %d, will now try to switch into serial mode", (void *)dev, j); host->bulkWrite(dev, (Endpoint *)bulk_out, vodafone_k3770_switch_packet, 31); - DBG("SWITCH PACKET SENT"); + DBG("Switch packet sent"); host->unlock(); Thread::wait(500); //Not in a thread - // now wait for the new device connected......... :( + //Not wait for the dongle to reconnect while (1) { if (found) { @@ -104,10 +104,12 @@ if ((dev = host->getDevice(i)) != NULL) { host->resetDevice(dev); host->enumerate(dev); + + DBG("Found one device with vid: %04x pid: %04x", dev->getVid(), dev->getPid()); //Vodafone K3770 if ((dev->getVid() == 0x12D1) && (dev->getPid() == 0x14C9)) { - DBG("SWITCH MODE OK!!!!!!!!!!\r\n"); + DBG("Switched successfully"); found = true; break; }