CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

2 UDP connections

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Sigma



Joined: 03 May 2004
Posts: 48
Location: Sg

View user's profile Send private message

2 UDP connections
PostPosted: Thu Feb 08, 2007 5:09 am     Reply with quote

Hi, all,
Have anyone tried getting 2 UDP connections working simutaneouly with Siemens MC35i? One of my customers wants my PIC to open 2 connections with different ports to cater for TX and RX respectively. IS it doable?
Please advice.

Sigma
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Thu Feb 08, 2007 5:26 am     Reply with quote

I have not done anything with the Siemens device mentioned. However, from a generalized standpoint, every socket (or connection) is bidirectional. Therefore a single socket (connection) handles transmit and receive.

Now it may be that a specific application uses one direction for data and the reverse direction for control / status. In this scenario (at least) two sockets (connections) would then be required.

There are a couple of variations on this theme, use one socket for bidirectional data, and the other for bidirectional control. The other variation is to multiplex bidirection data and control on the same connection (conceptually using a port within a port).

Can you do it? That depends on you application and how you code it - it is simple enough to code. For most of my network applications, including my demos, I use one or both of the variations outlined above.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Sigma



Joined: 03 May 2004
Posts: 48
Location: Sg

View user's profile Send private message

PostPosted: Thu Feb 08, 2007 7:31 pm     Reply with quote

Thanks, asmallri.
My customer tried 1 socket (TX and RX together) before. But they claimed that sometimes the TX data from the server was not sent to the embedded device (using MC35i). What will be the possible reasons?

regards
Sigma
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Thu Feb 08, 2007 7:55 pm     Reply with quote

Sigma wrote:
Thanks, asmallri.
My customer tried 1 socket (TX and RX together) before. But they claimed that sometimes the TX data from the server was not sent to the embedded device (using MC35i). What will be the possible reasons?

regards
Sigma


Difficult (impossible?) to say without knowing your configuration but I assume you are sending and receiving UDP commands to this device over the serial interface. If you are using CCS as the tool you will, as a minimum require a receive interrupt handler and ring buffer to avoid loss of characters (and therefore receive packet corruption) while transmitting a PDU.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group