[Q2686] loading configuration file by the USB port


I’m looking to try to load a configuration file [some adress and number where to send data by email/gprs… (mostly string and int or double)] in the Q2686 by the USB port with using something like Labview to build the user interface on the computer (when I plug the dev board to my computer, I can see COM3).
Must I have to write my own AT commands or something else?

If someone have an idea to start, that can be cool :slight_smile:

NB: Can we use classical COM1 (RS232) and the USB port in same time on the Q2686 devboard??



You can create your own AT commands, or you could use the Flow Control Manager (FCM), and create your own custom protocol.

If you create your own AT commands, they could be used on any port - not just USB.

I don’t know if there are any specific restrictions on the particular devboard that you have, but the Q2686 itself is perfectly capable of using both USB and UART simultaneously.


Ok, thks.

I try the sdk sample, I can send AT command trough the USB port, but I receive echo on the RS232 com port (UART1) :mrgreen: !!!
So, how to specify that the response port is to be the USB port ??


What SDK sample?

The SDK has many different samples, illustrating many different things!


It was the UART_access sample …



Check out section 3.3 in the ADL user guide on how to write AT style commands that can listen to and send responses to various ports on the Q2686.

Don’t forget that you have to explicitly enable the USB port before you can transfer data across it.

ciao, Dave


Note that “transfer data across it” includes accepting AT commands - both standard AT commands, and your own custom commands.

UART1 is the only port that is enabled by default - UART2 and USB both have to be specifically enabled before use.

The USB won’t even enumerate to the PC if it’s not enabled.


And is that supposed to echo on UART1?


Hello, I already enable USB port, and by “echo” I mean, I receive something (what I must receive :slight_smile: ) but on COM1, not on USB com :confused:


And is that what the sample is supposed to do?


Yes, I send my own at command trought usb port and i receive return on com1… but I want receive it on USB.


You still haven’t answered the question: is that the correct behaviour for the sample?

If the sample is behaving correctly, but you want a different behaviour, then you will have to modify the sample in accordance with your requirements!


My bad, no is not the behavior of the sample, and I now I have to modify the sample (what I’m doing since yesterday…).
At this time, I can send my own AT command from my PC to the Q2686 through the USB port, BUT it send answer on the UART1 (RS232 port com) and I would like it send it through the USB… Now I’m looking for help to make this.

I try this:


but I got this error:

Description	Resource	Path	Location	Type
incompatible type for argument 2 of 'adl_atSendStdResponse'	appli.c	cmd_at_perso_pour_sendreceive_pc_par_USB/src	144	C/C++ Problem

So I don’t now how doing this.


Read the message literally:

It’s telling you that you have used an incompatible type in the 2nd argument that you have supplied in your call to ‘adl_atSendStdResponse’

So, look-up the documentation of ‘adl_atSendStdResponse’ - and see what is the correct type for the 2nd argument…

This is the standard process for handling compiler error messages - it has nothing specifically to do with Open-AT!


Already done, this is the adl_atSendStdResponse descpirtion:

  @brief Additional Port parameter to adl_atSendStdResponse() API
  @par Description:
  Additional Port parameter definition for response sending function adl_atSendStdResponse()
#define adl_atSendStdResponsePort(_t,_p,_r) adl_atSendStdResponse(ADL_AT_PORT_TYPE(_p,_t),_r)

That refering to ADL_AT_PORT_TYPE macro, so:

  @brief Macro to specify Response destination port and type
  @par Description:
  The _port argument has to be a defined value of the adl_port_e type, and this required port has to be available (cf. the AT/FCM port Service) ; sending a response on an Open AT® the GSM or GPRS based port will have no effects).

  - With the ADL_AT_UNS type value, if the ADL_AT_PORT_TYPE macro is not used, the unsolicited response will be broadcasted on all currently opened ports.
  - If the ADL_AT_PORT_TYPE macro is not used with the ADL_AT_RSP & ADL_AT_INT types, responses will be by default sent on the UART 1 port. If this port is not opened, responses will not be displayed.
#define ADL_AT_PORT_TYPE(_port_,_type_) ( u16 ) ( _port_ << 8 | _type_ )

Where finaly, adl_port_e type is evoked, and, in adl_port.h:

/* Ports identifiers */
typedef enum



    ADL_PORT_UART1_VIRTUAL_BASE       = 0x10, // Base for UART1 virtual ports
    ADL_PORT_UART2_VIRTUAL_BASE       = 0x20, // Base for UART2 virtual ports
    ADL_PORT_USB_VIRTUAL_BASE         = 0x30, // Base for USB virtual ports
    ADL_PORT_BLUETOOTH_VIRTUAL_BASE   = 0x40, // Base for BlueTooth virtual ports
    ADL_PORT_GSM_BASE                 = 0x50, // GSM CSD call data port
    ADL_PORT_GPRS_BASE                = 0x60, // GPRS session port
    ADL_PORT_RDMS_VIRTUAL_BASE        = 0x70, // Base for RDMS virtual port (internal messages)    
    ADL_PORT_RDMS_SERVER_VIRTUAL_BASE,        // Base for RDMS virtual port (messages with server)
    ADL_PORT_OPEN_AT_VIRTUAL_BASE     = 0x80  // Base for Open-AT application tasks
} adl_port_e;

there is ADL_PORT_USB :mrgreen: so, I don’t now what I must to do.
NB I tryed to replace AD_PORT_USB by ADL_PORT_USB_VIRTUAL_BASE in my adl_atSendStdResponse but it’s the same.


Te problem I see is your are using


to send a text string. The failure code is from adl_atSendStdResponse, not from adl_atSendStdResponsePort. Be carefull, this function recieve a adl_strID_e as second parameter (the third in adl_atSendStdResponsePort), where you are sending an ascii string.


Ok, I have found a way (ugly) to do what I want:

adl_atSendResponsePort(ADL_AT_RSP, paras->Port, "\r\nsend ok\r\n");

If someone have a better idea…


DAMN!!! :smiling_imp: you’r wright!! I persisted with a false copy paste thing! Thank you very much!, finaly my version is not to bad…


Hi Sebastien,
If you want to send




It depends on what you want to do, if you want to send standard AT responses (OK, BUSY,NO ANSWER…) use “adl_atSendStdResponsePort”. If you want to send “custom-made” responses use “adl_atSendResponsePort”.