In the way I do you create a function in the same format of TRACE macro, and the string you recieve you send it as a AT response. In this way you can send “traces” in target mode in both situations, Debug and Release. If you don’t want the “traces” to be sent enclose the code inside the function that substitute TRACE with:
Awneil, of course, as you have already said, each time the modem resets, you must reconnect with the USB.
The advantage is simple, TRACES doesn’t work over USB on rblode_new case, so it’s a way to get similar information TRACE gives without using it.
Have you ever tried TRACES on USB? I tried to use UART2 for debbuging two years ago and I desperate. Maybe because of the firmware used, I don’t know.
If you have real experience on using TRACE on USB, please share your knowledge with us and give us an step-by-step guidance in order to succeed.
I tried this : adl_atSendResponse ( ADL_AT_INT, “\r\nOK\r\n” ); and adl_atSendResponse (ADL_AT_PORT_TYPE(ADL_PORT_USB ,ADL_AT_UNS),“Test Trace Envoi USB\r\n” ); but it work only when i choose UART1 for connection hardware , so i want to replace UART 1 by USB .
I have already give it in my post of 07 May 2009, 12:02 - but here it is again:
Wait for the device to restart, and wait for Windows to (re-)enumerate the USB.
(at this point, you should be able to send AT commands to the module, and receive the responses, using Hypoterminal on the USB connection)
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…
Yes , i open the port and it work well in release mode and in debug if i choose UART1 like hardware interface but when i choose USB comme hrdware connection no,
My procedure :
1- I open Target Monitoring and in Prefernces -->Settings → Com , i select my virtual port for Usb , i click open then Auto detect .
2- I start Remot Task Monitor in Eclipse
3- In select i choose Hardware commmunication “USB”
4- I click Start.
If there is a problem in my procedure thank you for correcting me .
There are a lot of devices responding to AT commands on a computer: modems, some bluetooth adapters, some net-boards… I will check that the device is the correct.
Anyway, after you start the application with AP+WOPEN=1 you must “Disconnect”, and after “Connect” again the Hyperterminal, I’m not sure you are doing it at the correct moment:
This behavior occurs on applications running on the PC which do not detect the switching OFF of the Wireless CPU. An example of such application is HyperTerminal.
To understand the cause of this behavior, it would be gud to see how Windows manages USB devices.
When a USB device is connected to the Microsoft Windows PC, internally a Device Handle is assigned to it and stored in the registry.
When the USB device is removed, that Device Handle is also removed from the registry.Now, when HperTerminal is connected to the COM corresponding to the USB port of the PC, and the USB device (Wireless CPU) is turned off, HyperTerminal does not detect that the device has been turned off and keep on locked on the COM corresponding to the USB.However, Windows has detected that the USB device (Wireless CPU) has switched OFF, so it removes the Device Handle. When the USB Device (Wireless CPU) is turned on again, Windows assigns another Device Handle to the USB device, but HyperTerminal still uses the previous one which has now become invalid. Due to this, if the Wireless CPU is reset when HyperTerminal is connected to the USB port(in AT mode or Data mode), HyperTerminal will not detect the Wireless CPU.
Hence, this problem is specific to the external application being used. Intelligent applications (like TMT/TE/Selima) monitors the status of the USB device, and if you reset the Wireless CPU when the USB connection is used for connecting TMT/TE/Selima with the Wireless CPU, then you will see, that although the connection is closed, you can connect again by clicking on the “Connect” button in TMT. Hence, this problem is specific to the tool being used, and is not a problem in the Wavecom Wireless CPU.I would recommend to use the USB port using TMT and then reset the Wireless CPU. When the Wireless CPU is reset, the TMT will detect it, and the connection will be closed. The customer can then again connect the TMT using the “CONNECT” button and there will not be any problem communicating again.
Otherwise obtaining traces on USB is not that difficult or impossible.