Simple UART Echo Program


#6

I really struggled to find in the docs how to turn AT off to be able to use the port. Thank you for this example ! I was lost without it. In my app I have no interest in AT commands.

Questions:

Even with fcm, even setting wip debug to USB a lot of stuff still wants to go to Uart1, I wasted 4 hours trying to get the http api working & only saw the ‘Feature not supported’ message after running the example code. anything I can do to set everything to USB & leave the Uarts permanently in data mode ?

Is there any method to set Uart control lines (CTS) without enabling flow control ?

My void main_task ( void ) is exiting & the application then runs via timers & events, some of the example are like this too. Is this correct usage ?

Every now & then, especially If I leave it overnight. The unit goes into a state where it reboots every 10 seconds doing an RTK dump into the trace log. Seems to recover if I reset & re download same app. Anything to read in that dump ?.

Any tips to make sure it is stable over long periods without human intervention, my main app includes a state model to automatically reconnect GPRS & IP links. I’m talking more on the longterm stability of the AT OS.


#7

You should really post those questions as a separate thread


#8

bugs fixed.


#9

Thanks Josepvr

This helped immensly. I cant understand why Sierra didnt have something similar already written!

Matt


#10

Thank you for commenting my code.
I encourage everybody to post their codes to increase this community.


#11

Using this code I wasn’t able to set the baud rate of the UART. It seemed to run the format and parity AT command but failed on subsequent AT commands. Is anyone else experiencing this? Using 7.44 on an FXT003


#12

In what way, exactly, did it “fail” :question:


#13

The adl_atResponse_t *Rsp from all three adl_atCmdCreate functions returned “OK” . The two subsequent calls after the first are not successfully executed irrespective of the “OK” response. The baud rate for instance remains set at 115200(Default) as confirmed using realterm.

Is it possible the modem is failing to execute the commands before switching to datamode?


#14

Note that you need to distinguish an OK [b]result code /b returned by the API function call from an “OK” response returned by the actual AT Command.

Are you sure that you’re getting an “OK” response returned by the actual AT Command?


#15

You are right mattw.
There is a bug in my code… i’m sorry :blush:
You have to save uart configuration after setting it.

In function

int initUART1

add next line after setting parameters:

adl_atCmdCreate("AT&W", UART_1, (adl_atRspHandler_t)EvhConfUartx,NULL);

Now, code in first post is fixed.


#16

I am starting development on an aftermarket kit where Uart2 is already hardwired to a gps receiver. How do I go about setting developer studio to Uart1?

Great step-by-step example thread for us newcomers btw.


#17

You don’t.

DS knows nothing about UARTs - it just sees the COM ports (which may be “virtual”) on the PC.

So you just use whicher COM port is connected to your UART1…


#18

Awneil - maybe you can guide me

I connect to my device usb, open the correct COM port in DS and send at commands using the console view. AT commands go through fine so I have a good connection.

Now I try to upload the latest firmware… I go to the status box in the target management view and click the little package symbol beside the Firmware heading. I pick the latest package from the drop down list and start upload. The green status bar completes and then I get the error popup saying “No target detected”.

If I use at+wdwl in DS or any other terminal program I get error response +CME ERROR: 3 which stands for operation not supported.

I am using the Xact Technologies dev board utilizing the WMP100. Xact has their own dwl loader program but I am waiting on it getting updated… Based on what I have described do you think I missing a step in the upload process or is it just that my pcb won’t accept software from DS?

I am sorry I know this is pretty vague


#19

This really has nothing to do with this thread - or even this section of the forum!

It would be better to start a new thread in a more appropriate section, and give a link back to this for reference.

What version of firmware are you using?

The ability to update the firmware over USB is relatively recent:
https://forum.sierrawireless.com/t/program-via-the-usb/5176/3

The firmware version they ship does not support AT+WDWL on the USB port


#20

Ok well that explains it. So if I update the firmware via Uart I should afterwards be able to use the usb functionality? Thanks

Btw I have started a new thread if you would like to respond further:

https://forum.sierrawireless.com/t/using-ds-with-xact-dev-board/5277/1


#21

Hi,

i have tested the code with a Terminal Program an it works fine. Great job

Now i want to work with the code so that Data which I recieve will be sent to another device.

I didn´t find where the program read the data and write it in a buffer.

Can somebody help me?

Thanks


#22

hi,
Thank you…The code was very much useful to me.Now m trying to write a code to recieve events(eg:alarm,fire detection,smoke detection)from some external application(eg:NFN gateway,hyperterminal) through serial com port on gsm and gsm should parse the events and send those events in terms of sms to other mobile phones… plz help me out to write a code or if you have any code plz post it…


#23

You need to start a new thread for that - in an appropriate section of the forum…

(you can always include a link to this thread)


#24

I Have been tested the code. Its working fine with small echo data.
But My WMP100 kept restarting when send bigger data (estimated ~ 4KB).
Any body can explain why this happen?

Here is my system info :
-“Developer Studio”,“2.1.1.201201180944-R8656”
-“Open AT Framework package”,“2.37.0.201202280640”
-“Open AT OS Package”,“6.37.0.201202060950”
-“Firmware Package”,“7.47.0.201202010317”

Regards,

Aris


#25

Hi Aris,

This maybe issue in FCM, is that mandatory to send big data (~4k) in your use case or just for testing?

Using Open UART maybe a better way…

Thx
L