# How using Q2686 / 87 USB Port for debugging application

**URL:** <https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589>\
**Category:** General wireless topics\
**Created:** [September 7, 2007, 2:48pm UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589 "2007-09-07T14:48:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![afaurep](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@afaurep](https://forum.sierrawireless.com/u/afaurep)\
**Post date:** [September 7, 2007, 2:48pm UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/1 "2007-09-07T14:48:26Z")

</div>

Hi everybody,

My application use both UART 1 & 2 in data mode and a specific interface is linked to each UART.  
So, i would like to use USB link to debug with Visual C++ / Terminal Emulator / Target Monitoring Tools my application.

So, i have openned USB link (AT+WMFM=0,1,3), and settings the “RemoteTask monitor” (when starting debug mode) for using USB link .

But, nothing happened under TMT and TE ! So, how configuring Target Monitoring Tools and Terminal Emulator for seiing TRACE coming from USB link ?

Thanks in advance for your help.

Regards

---

<div class="post-metadata">

**Author:** ![terry.biberdorf](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@terry.biberdorf](https://forum.sierrawireless.com/u/terry.biberdorf)\
**Post date:** [December 31, 2007, 8:18pm UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/2 "2007-12-31T20:18:12Z")

</div>

There is an issue with how your PC communicates to the Wavecom module via the USB port.

First close the USB interface: at+wmfm=0,0,1  
then reopen it: at+wmfm=0,1,3

Then go to your computers device driver window. Under Modems, you will find “Wavecom USB Wireless CPU”.  
Select it, and then look at it’s properties. Under the Modem tab, you will find what vertual COM port the wavecom module is using. You can then open a hyperterminal to that COM port and issue most AT commands.

I would suggest that if your going to be doing this, that you first create a menu of options with your own AT commands, also I would suggest that you issue the USB activate command within your Open AT application so you will not have to continue to open/close the port:  
ie: adl\_atCmdCreate(“AT+WMFM=0,1,3”,FALSE,NULL,NULL);

Another note: every time you re-start your wavecom module the vertual COM port will also be reset and your PC will loose the USB connection. So to continue debug operations via the USB port, you must close your terminal connection before restart the Wavecom module.

---

<div class="post-metadata">

**Author:** ![rblode\_new](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@rblode\_new](https://forum.sierrawireless.com/u/rblode_new)\
**Post date:** [May 6, 2009, 3:55pm UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/3 "2009-05-06T15:55:54Z")

</div>

Hello ,

I want to use the USB for debug ( send trace ) but no thing hapen when i start a debug .

Thank you for you help

Regards

---

<div class="post-metadata">

**Author:** ![fer.caballero](https://avatars.discourse-cdn.com/v4/letter/f/ba9def/32.png) [@fer.caballero](https://forum.sierrawireless.com/u/fer.caballero)\
**Post date:** [May 7, 2009, 5:28am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/4 "2009-05-07T05:28:11Z")

</div>

You must “create” your owm traces, for example using adl\_atSendResponse on USB. You would recieve the information as text on a hyperterminal or similar.

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [May 7, 2009, 5:41am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/5 "2009-05-07T05:41:43Z")

</div>

> [@fer.caballero](#):
>
> You must “create” your owm traces, for example using adl\_atSendResponse on USB.

No, that’s not true.

The TRACE macro (and DUMP, ETC) are not tied to a particular interface - they are enabled at runtime by whichever interface (UART1, UART2, USB, whatever) is connected to the TMT (or M2MStudio).

---

<div class="post-metadata">

**Author:** ![fer.caballero](https://avatars.discourse-cdn.com/v4/letter/f/ba9def/32.png) [@fer.caballero](https://forum.sierrawireless.com/u/fer.caballero)\
**Post date:** [May 7, 2009, 5:51am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/6 "2009-05-07T05:51:18Z")

</div>

Hi awneil,  
How do you for the TRACES over the USB? Do you generate the code as Target-Debug or as Remote-Debug? I hope that Remote-Debug doesn’t work over USB but I’ve never tried it.

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [May 7, 2009, 6:43am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/7 "2009-05-07T06:43:51Z")

</div>

> [@fer.caballero](#):
>
> How do you for the TRACES over the USB?

As I said, the TRACE macro is not tied to any particular interface - so USB is irrelevant here!

---

<div class="post-metadata">

**Author:** ![rblode\_new](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@rblode\_new](https://forum.sierrawireless.com/u/rblode_new)\
**Post date:** [May 7, 2009, 8:42am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/8 "2009-05-07T08:42:27Z")

</div>

Hello ,

but i tried with usb interface and i have no trace in debug mode .  
how i do this ( i want TRACE with USB interface ) .

Regards

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [May 7, 2009, 9:43am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/9 "2009-05-07T09:43:38Z")

</div>

> [@rblode\_new](#):
>
> but i tried with usb interface

What, exactly, did you try?

Describe the complete, step-by-step, procedure that you used.

> [@](#):
>
> and i have no trace in debug mode

Can you get TRACE on UART1 or UART2 ❓

---

<div class="post-metadata">

**Author:** ![rblode\_new](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@rblode\_new](https://forum.sierrawireless.com/u/rblode_new)\
**Post date:** [May 7, 2009, 9:50am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/10 "2009-05-07T09:50:04Z")

</div>

ok , in my application i want to use UART1 and UART2 to communicate with 2 devices , and use USB for debug ( send TRACE )it this possible , if Yes how i can do this ( Send TRACE with USB interface ).

Thank you !

Regards

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [May 7, 2009, 9:52am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/11 "2009-05-07T09:52:19Z")

</div>

> [@rblode\_new](#):
>
> ok , in my application i want to use UART1 and UART2 to communicate with 2 devices ,

Yes, but you need to do first things first!

If you can’t even get trace on UART1, then you have a fundamental problem that is nothing to do with USB!

So, start with a simple test app to verify that you can get trace on UART1.

Then try it on USB…

---

<div class="post-metadata">

**Author:** ![fer.caballero](https://avatars.discourse-cdn.com/v4/letter/f/ba9def/32.png) [@fer.caballero](https://forum.sierrawireless.com/u/fer.caballero)\
**Post date:** [May 7, 2009, 9:56am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/12 "2009-05-07T09:56:19Z")

</div>

First, try to read TRACES over UART1 on Remote-Debug mode. Does it works? If not, the problem should be in TRACES reading on tools. If it works, I hope awneil will explain us how to read the traces on USB. 😃

---

<div class="post-metadata">

**Author:** ![rblode\_new](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@rblode\_new](https://forum.sierrawireless.com/u/rblode_new)\
**Post date:** [May 7, 2009, 9:58am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/13 "2009-05-07T09:58:30Z")

</div>

Yes , I get TRACE from UART1 and UART2 but not USB.  
Procedure to get TRACE from USB :  
1- I open the Virtual port for USB ( COM11 for me) .  
2- when i run debug , in setting , i select in Hard communication Type: USB and COM11 for COM Number for USB and i click START .  
I think that the PC lose the commnication with the USB interface when i start the debug !!! .

Thank you !

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [May 7, 2009, 10:06am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/14 "2009-05-07T10:06:00Z")

</div>

> [@rblode\_new](#):
>
> I think that the PC lose the commnication with the USB interface when i start the debug !!! .!

The PC loses the USB connection whenever the module restarts:  
[viewtopic.php?f=5&t=3077&p=11348&hilit=usb+debugging#p11348](http://www.wavecom.com/modules/movie/scenes/forums/viewtopic.php?f=5&t=3077&p=11348&hilit=usb+debugging#p11348)  
[viewtopic.php?f=5&t=2978&p=10909&hilit=usb+restart#p10909](http://www.wavecom.com/modules/movie/scenes/forums/viewtopic.php?f=5&t=2978&p=10909&hilit=usb+restart#p10909)

---

<div class="post-metadata">

**Author:** ![rblode\_new](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@rblode\_new](https://forum.sierrawireless.com/u/rblode_new)\
**Post date:** [May 7, 2009, 10:13am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/15 "2009-05-07T10:13:11Z")

</div>

So , it’s imposible to send TRACE with USB Interface !?

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [May 7, 2009, 10:26am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/16 "2009-05-07T10:26:00Z")

</div>

Not impossible - but inconvenient.

Have you tried looping the debug through the PC?

---

<div class="post-metadata">

**Author:** ![rblode\_new](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@rblode\_new](https://forum.sierrawireless.com/u/rblode_new)\
**Post date:** [May 7, 2009, 10:45am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/17 "2009-05-07T10:45:06Z")

</div>

> [@awneil](#):
>
> Not impossible - but inconvenient.
> 
> Have you tried looping the debug through the PC?

I tried to close and open the USB port but i have no TRACE too .  
You can explain to me how i get TRACE from USB ( the procedure please ) .

Thank you !

---

<div class="post-metadata">

**Author:** ![rblode\_new](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@rblode\_new](https://forum.sierrawireless.com/u/rblode_new)\
**Post date:** [May 7, 2009, 10:53am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/18 "2009-05-07T10:53:13Z")

</div>

> [@fer.caballero](#):
>
> You must “create” your owm traces, for example using adl\_atSendResponse on USB. You would recieve the information as text on a hyperterminal or similar.

For your solution , i must use the release Mode , but the debug mode .

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [May 7, 2009, 11:02am UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/19 "2009-05-07T11:02:18Z")

</div>

> [@rblode\_new](#):
>
> You can explain to me how i get TRACE from USB ( the procedure please ) .

You would have to wait for the device to restart, and wait for Windows to re-enumerate the USB.

Once the USB is connected & working again in Windows, open TMT.

You should now be able to get traces over USB in the same way that you get traces over the UARTs…

---

<div class="post-metadata">

**Author:** ![rblode\_new](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@rblode\_new](https://forum.sierrawireless.com/u/rblode_new)\
**Post date:** [May 7, 2009, 12:31pm UTC](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589/20 "2009-05-07T12:31:53Z")

</div>

> [@awneil](#):
>
> > [@rblode\_new](#):
> >
> > You can explain to me how i get TRACE from USB ( the procedure please ) .
> 
> You would have to wait for the device to restart, and wait for Windows to re-enumerate the USB.
> 
> Once the USB is connected & working again in Windows, open TMT.
> 
> You should now be able to get traces over USB in the same way that you get traces over the UARTs…

I do not know how you do it but for me not work always . ☹

[Next page](https://forum.sierrawireless.com/t/how-using-q2686-87-usb-port-for-debugging-application/1589.md?page=2)
