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

CCS/MCHP TCP/IP daemon that handles multiple sockets

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



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

CCS/MCHP TCP/IP daemon that handles multiple sockets
PostPosted: Thu Sep 03, 2009 4:16 pm     Reply with quote

I'm writing an app for tcp/ip that will (hopefully) have a single daemon handling multiple duplicate hardware devices hooked to a single PIC18F97J60 in extended bus mode (cool)...

The intent is to have 8 sockets that communicate with the devices and I'd like to have a single set of routines that handle this.

The current method I've see with MCHP's examples is that a single task is a single daemon which is a single port.

So not being in the land of bigger OS's, I thought I would ask the advanced crew here how they may have accomplished this in the past.

(in verilog this would be EASY! INSTANTIATE! INSTANTIATE! INSTANTIATE! hahaha.. but this is not verilog.)

The device on the bus is a single octal UART and I've already written the code to handle the FIFO's and interrupt servicing and so on (and it works. OMG)

Now I just need to write the daemon to allow a TCP connection to jump into the serial flow (one socket per UART channel) and go.

My ports are fixed at something like 1001, 1002, 1003.... 1008

Thanks in advance!

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Fri Sep 04, 2009 8:09 pm     Reply with quote

Well, I can see people have read this -- but did I scare everyone off?

So far, I think I have a solution for doing the multiple socket support -- but I'd still love to hear thoughts from others on how they may have accomplished this.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Wed Sep 09, 2009 11:14 pm     Reply with quote

For those interested,

It's as easy as setting up an array and then working through the number of ports and giving (in my case) each port its own socket.

So far, it's been working out quite nicely.

I have to give credit for the MCHP TCP/IP Stack conversion done by CCS. While it's probably not perfect ( I don't have any complaints yet ) -- I got it working on a PICDEM.net2 in a matter of a couple of hours... and my new code is flowing nicely.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
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