Simple UART Echo Program

Share your code with other community members. Please do not ask for code here; use the appropriate product forum instead.

Re: Simple UART Echo Program

Postby mikejamesleslie » Mon Oct 03, 2011 5:26 pm

josepvr wrote:Ensure that the target device is powered-up and connected and two UARTs are connected to COM ports of the PC:

UART1 must be connected to a terminal program (eg, Hyperterminal);
The other UART (either UART2 or the USB) will be used by the Developer Studio.


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.
mikejamesleslie
 
Posts: 41
Joined: Thu Aug 25, 2011 12:17 am
Location: Vancouver, BC
Has thanked: 1 time
Have thanks: 3 times

Re: Simple UART Echo Program

Postby awneil » Mon Oct 03, 2011 7:53 pm

mikejamesleslie wrote:How do I go about setting developer studio to Uart1?

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...
When I say "SiWi", that's short for "Sierra Wireless".
User avatar
awneil
 
Posts: 6641
Joined: Mon Dec 03, 2007 1:18 pm
Location: Basingstoke, UK
Has thanked: 54 times
Have thanks: 88 times

Re: Simple UART Echo Program

Postby mikejamesleslie » Mon Oct 03, 2011 9:12 pm

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
mikejamesleslie
 
Posts: 41
Joined: Thu Aug 25, 2011 12:17 am
Location: Vancouver, BC
Has thanked: 1 time
Have thanks: 3 times

Re: Simple UART Echo Program

Postby awneil » Mon Oct 03, 2011 10:25 pm

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.

mikejamesleslie wrote:I get error response +CME ERROR: 3 which stands for operation not supported.

What version of firmware are you using?

The ability to update the firmware over USB is relatively recent:
viewtopic.php?f=107&t=5692&p=23820&hilit=faq+usb#p23820

I am using the Xact Technologies dev board utilizing the WMP100.

The firmware version they ship does not support AT+WDWL on the USB port
When I say "SiWi", that's short for "Sierra Wireless".
User avatar
awneil
 
Posts: 6641
Joined: Mon Dec 03, 2007 1:18 pm
Location: Basingstoke, UK
Has thanked: 54 times
Have thanks: 88 times

Re: Simple UART Echo Program

Postby mikejamesleslie » Mon Oct 03, 2011 11:33 pm

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:

viewtopic.php?f=121&t=5810
mikejamesleslie
 
Posts: 41
Joined: Thu Aug 25, 2011 12:17 am
Location: Vancouver, BC
Has thanked: 1 time
Have thanks: 3 times

Re: Simple UART Echo Program

Postby enymotion » Fri May 11, 2012 8:58 am

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
enymotion
 
Posts: 18
Joined: Thu Mar 29, 2012 2:49 am
Has thanked: 2 times
Have thanks: 0 time

Re: Simple UART Echo Program

Postby ashwitha » Mon Jan 07, 2013 9:46 am

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......
ashwitha
 
Posts: 1
Joined: Mon Oct 01, 2012 1:47 am
Has thanked: 0 time
Have thanks: 0 time

Re: Simple UART Echo Program

Postby awneil » Mon Jan 07, 2013 2:28 pm

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)
When I say "SiWi", that's short for "Sierra Wireless".
User avatar
awneil
 
Posts: 6641
Joined: Mon Dec 03, 2007 1:18 pm
Location: Basingstoke, UK
Has thanked: 54 times
Have thanks: 88 times

Re: Simple UART Echo Program

Postby malaris » Wed Jun 05, 2013 11:33 am

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
malaris
 
Posts: 1
Joined: Wed Jul 18, 2012 6:27 am
Has thanked: 0 time
Have thanks: 0 time

Re: Simple UART Echo Program

Postby lotam » Fri Jun 07, 2013 9:15 am

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
Please click "+1" in my respond as indication if you think a thread can be closed. Thx.
User avatar
lotam
 
Posts: 624
Joined: Sun Oct 16, 2011 9:35 pm
Has thanked: 0 time
Have thanks: 140 times

Previous

Topic Tags

sample, source code, UART, ADL_IO_LEV_LOW

Return to Sample code

Who is online

Users browsing this forum: No registered users and 1 guest