How using Q2686 / 87 USB Port for debugging application

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

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.

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

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.

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

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.

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

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

What, exactly, did you try?

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

Can you get TRACE on UART1 or UART2 :question:

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

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…

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. :smiley:

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 !

The PC loses the USB connection whenever the module restarts:
viewtopic.php?f=5&t=3077&p=11348&hilit=usb+debugging#p11348
viewtopic.php?f=5&t=2978&p=10909&hilit=usb+restart#p10909

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

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 !

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

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 . :frowning: