UDP over serial or Modem connection

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
Ondra
Posts: 325
Joined: Wed Aug 29, 2007 7:33 pm
Been thanked: 2 times
Contact:

UDP over serial or Modem connection

Post by Ondra »

Good day all.
I need some help or at least a point in the right direction. I would like to know if it is possible to Use UDP over a Serial or Modem connection. And if so, could you give an example of how this would be done.

Ondra

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hello Ondra

We have examples of UDP over TCP/IP connections. If you would like these examples then email me at ben@matrixmultimedia.co.uk

Ondra
Posts: 325
Joined: Wed Aug 29, 2007 7:33 pm
Been thanked: 2 times
Contact:

Post by Ondra »

Hi Benj. Thanks for your response. I know that flowcode supports UDP over ethernet. What I want to do is connect and communicate over a dial up modem. Any thoughts on that.

Ondra

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hello Ondra

Im afraid that this is something that I have never looked into. Im sure it is possible but I am unable to provide any help.

Ondra
Posts: 325
Joined: Wed Aug 29, 2007 7:33 pm
Been thanked: 2 times
Contact:

Post by Ondra »

Ok. how about this when sending and receiving using a UDP or IP is the information packaged using the Ethernet packets or is this the case when sending through channel 0 only.

Ondra

Ondra
Posts: 325
Joined: Wed Aug 29, 2007 7:33 pm
Been thanked: 2 times
Contact:

Post by Ondra »

what port does the IP component communicate over and can it be changed and if so how?

Ondra

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hello

You can assign the channel and port by using the TCP_IP hardware macro "Create_UDP_Socket"

Ondra
Posts: 325
Joined: Wed Aug 29, 2007 7:33 pm
Been thanked: 2 times
Contact:

Post by Ondra »

Hi Benj.
Question. The port number is the port of the receiving computer right?
e.g., 80 for Http or 21 FTP. What I want to know is when you say channel what channel and or port on the PIC am I communicating out of. I assume channel is one of the 8 pins on a particular port?

Ondra Simons

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hello Ondra

Yes the port is the remote port of the computer you are talking to.

The channel is the UDP data channel. I think that there can be several different connections running at once.

Ondra
Posts: 325
Joined: Wed Aug 29, 2007 7:33 pm
Been thanked: 2 times
Contact:

Post by Ondra »

I Still don't know what port of the PIC is UDP Channels 0,1,2,3 a part of. What Port A,B,C,D? of the PIC does the data flow out of and into?

Ondra

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hello Ondra

The channel is a virtual or time spliced channel rather then an individual port.

The Flowcode component communicates to the E-Block TCP/IP module via I2C so the hardware port that is used is normally portC. This depends on the PICmicro you are using.

Ondra
Posts: 325
Joined: Wed Aug 29, 2007 7:33 pm
Been thanked: 2 times
Contact:

Post by Ondra »

Any plans to include point to point protocol(PPP) in the TCP/IP component. If not could you build it for me? :D

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hello Ondra

Sorry I dont think that there are any plans to implement PPP into the TCP/IP at the moment.

Ondra
Posts: 325
Joined: Wed Aug 29, 2007 7:33 pm
Been thanked: 2 times
Contact:

Re: UDP over serial or Modem connection

Post by Ondra »

I'm back at this again. I want to program my micro controller to connect to the internet over dialup modem.
I can get the PIC to dial and connect by sending serial AT commands to the modem. I want to communicate over the
link using the UDP protocol. Is there any backdoor tweak to the code that can help me do this? Thanks in advance.

Ondra

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: UDP over serial or Modem connection

Post by Steve »

None that I know of. I think you'll need to formulate your own UDP packets and send these manually.

Ondra
Posts: 325
Joined: Wed Aug 29, 2007 7:33 pm
Been thanked: 2 times
Contact:

Re: UDP over serial or Modem connection

Post by Ondra »

Thanks Steve. Since you guys already have it working, and so as to not have to reinvent the whole thing. Is the following possible and or practical . Compile a program that implements the TCP/IP component. Open the c code file, copy the UDP portion, paste it in a C block in my program, then pass and receive information to and from it. If this is doable would you or could you give assistance, payed or otherwise. If you could, tell me where to start I'll get going, then with a little back and forward communica, we'll have conquered one more topic for me and those that come behind. Thanks in advance.

Ondra

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: UDP over serial or Modem connection

Post by Steve »

Flowcode doesn't do that much with the UDP protocol itself. The "TCP/IP" component that allows Flowcode to work with UDP only works with a specific external chip that contains the TCP/IP stack.

By all means look at the code that Flowcode produces, but I think you will find it does not give enough details about UDP itself.

Post Reply