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

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

UDP over serial or Modem connection

Postby Ondra » Sun Sep 16, 2007 4:21 pm

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: 14574
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4602 times
Been thanked: 4241 times
Contact:

Postby Benj » Mon Sep 17, 2007 9:19 am

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:

Postby Ondra » Mon Sep 17, 2007 12:43 pm

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: 14574
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4602 times
Been thanked: 4241 times
Contact:

Postby Benj » Mon Sep 17, 2007 1:15 pm

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:

Postby Ondra » Mon Sep 17, 2007 2:37 pm

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:

Postby Ondra » Mon Sep 17, 2007 2:45 pm

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

Ondra

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

Postby Benj » Mon Sep 17, 2007 4:47 pm

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:

Postby Ondra » Wed Sep 19, 2007 3:23 am

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: 14574
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4602 times
Been thanked: 4241 times
Contact:

Postby Benj » Wed Sep 19, 2007 9:22 am

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:

Postby Ondra » Fri Sep 21, 2007 10:08 am

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: 14574
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4602 times
Been thanked: 4241 times
Contact:

Postby Benj » Mon Sep 24, 2007 10:40 am

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:

Postby Ondra » Mon Sep 24, 2007 2:44 pm

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: 14574
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4602 times
Been thanked: 4241 times
Contact:

Postby Benj » Mon Sep 24, 2007 4:04 pm

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

Postby Ondra » Sun Nov 22, 2009 11:13 pm

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: 3092
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 89 times
Been thanked: 391 times
Contact:

Re: UDP over serial or Modem connection

Postby Steve » Mon Nov 23, 2009 7:47 am

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

Postby Ondra » Mon Nov 23, 2009 12:22 pm

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: 3092
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 89 times
Been thanked: 391 times
Contact:

Re: UDP over serial or Modem connection

Postby Steve » Mon Nov 23, 2009 2:56 pm

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.