Searching \ for '[OT]: Seiko S7600A TCP Connection Problem using PI' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=seiko+s7600a+tcp
Search entire site for: 'Seiko S7600A TCP Connection Problem using PI'.

Exact match. Not showing close matches.
PICList Thread
'[OT]: Seiko S7600A TCP Connection Problem using PI'
2000\08\02@142206 by Dennis Hromin

flavicon
face
Hello,
 After reading all the documentation and sample code for the S7600 chip,
I am still having a lot of difficulty establishing a TCP Connection. I am
successfully able to initate a PPP connection and obtain an IP address.
When I try to make a TCP connection to a PC computer running a daytime
Server (for example) port 13 written in java, my PIC16F877 is unable to
establish a connection. As far as I can tell, it sits in a SYN_SENT state
in client mode and running it as a server, it sits in LISTEN tcp state.
 Below is an excerpt of my CCS C code for the PIC16F877 and if anyone
can tell me if i'm doing something wrong, or if it is not possible for the
seiko chip to communicate with a PC at all, let me know.

 Here is the code part where it trys to establish a TCP connection. I
believe that my PPP connection code is working fine. I did not even get to
the stages of sending data yet.

 Thanks for any help or tips,
 Dennis

       for(temp=0;temp<3;temp++) //i do not understand why this happens
//three times, I copied it from the mchip app note AN730 i believe it was

       {
               WriteSeiko(Socket_Index,0x00);  // Use Socket 0

               while( (ReadSeiko(Socket_Status_H)&0x01)==0x01);

               WriteSeiko(Socket_Config_Status_L,0x10);  // Reset socket
               delay_ms(100);
       // Write the preconfigured server IP address to the S-7600A
       // The Arrarys are previously defined in the program for both the
       // IP and port number
               WriteSeiko(Their_IP_Address_L,TheirIPAddr[0]);
               WriteSeiko(Their_IP_Address_M,TheirIPAddr[1]);
               WriteSeiko(Their_IP_Address_H,TheirIPAddr[2]);
               WriteSeiko(Their_IP_Address_U,TheirIPAddr[3]);

               WriteSeiko(Our_Port_L,PORT_L);  // Write the port address
               WriteSeiko(Their_Port_L,PORT_L);  // for both the server
               WriteSeiko(Our_Port_H,PORT_H);  // and the client
               WriteSeiko(Their_Port_H,PORT_H);

               WriteSeiko(Socket_Config_Status_L,0x02); // Use TCP client mode
               WriteSeiko(Socket_Activate,0x01);   // Activate socket


// My program just loops at this point waiting till a connection is
// established, but it never happens.

               while(1)        //Loop: Waiting to establish a connection
               {
                       j = ReadSeiko(Socket_Status_M);
                       printf("The value of j: %x\n",j);
                       delay_ms(5);
               if(j&0x10)
                       {
                       printf("\n\rCONNECT\n\r");
                       break;
                       }
               else if((j&0x40)||(j&0x20))
                       {
                       printf(" RST/FIN Seen\n");
                       CONNECTED=0;
                       break;
                       }

               else if(j&0xe0)
                       break;
               }

       }

delay_ms(500);

printf("\n\rSocket connected\n\r");

// After this point the code should continue with sending data, but i have
// not gotten this far yet.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

2000\08\02@142754 by Andrew Kunz

flavicon
face
>  Below is an excerpt of my CCS C code for the PIC16F877 and if anyone
>can tell me if i'm doing something wrong, or if it is not possible for the

Do you mean, Aside from using CCS?

Logic-wise, nothing was outstanding.  I assume you ARE able to made ICMP
messages fly, and perhaps UDP?

Andy

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

2000\08\02@150150 by Dennis Hromin

flavicon
face
Well, I should say that my CCS code does compile and there are no errors,
i was just wondering if there where any mistakes in the procedure for
starting a TCP connection.
 As for UDP, i have not tried it. That will be my next option.
As for ICMP, I am unsure how it works. I tried to ping the PIC/Seiko
device after it is assigned an IP address. I do to recieve any replies.
Could this be a problem? Is it possible for the Seiko chip to ping another
host PC on the network?
 One other thing I should mention is that I'm using a wireless access
point device that is configured as a PPP server and has an ethernet
interface. It does do IP routing and seems to be configured correctly.

-Dennis

On Wed, 2 Aug 2000, Andrew Kunz wrote:

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

2000\08\02@152631 by Andrew Kunz

flavicon
face
>As for UDP, i have not tried it. That will be my next option.
>As for ICMP, I am unsure how it works. I tried to ping the PIC/Seiko

Start simple first.  Order of complexity is

    ICMP (very simple)
    UPD
    TCP (very complex)

>device after it is assigned an IP address. I do to recieve any replies.

You have a typo.  Does this mean NO PING REPLY?  If that's the case, you need to
start there.  You don't have it configured properly.  The Seiko must be able to
PING before it can make a TCP connection.

>Could this be a problem? Is it possible for the Seiko chip to ping another
>host PC on the network?

Yes, and Yes.

>interface. It does do IP routing and seems to be configured correctly.

What if you connect a PC in place of your PIC project.  Does it communicate
properly to other nodes?

Andy

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

2000\08\02@175900 by Dennis Hromin

flavicon
face
There does not seem to be any documentation or info on how to run the
ICMP protocol. If I just power up my circuit and after it establishes a
PPP connection and obtains an IP address, should I automatically be able
to ping it and recieve a reply? Or is there another procedure where the
ichip needs to be in a specificate state?
 Do I need to do anything with interrupts because I have not even
connected the two Interrupt pins to the PIC.
 Any one have suggestions on how to test ICMP with the S7600? Or how to
write code for the chip to send out ICMP requests?
Thanks,
Dennis

> Start simple first.  Order of complexity is
>
>      ICMP (very simple)
>      UPD
>      TCP (very complex)


I do have a SDK development board for the iready, but I have not used it
in that matter. It seems to me that there would be a lot more difficulty
involved in this, where I would have to compile a lot of C code for the
PC. I will try and give it a shot.
>
> What if you connect a PC in place of your PIC project.  Does it communicate
> properly to other nodes?

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

2000\08\03@071541 by Andrew Kunz

flavicon
face
> There does not seem to be any documentation or info on how to run the
>ICMP protocol. If I just power up my circuit and after it establishes a
>PPP connection and obtains an IP address, should I automatically be able
>to ping it and recieve a reply? Or is there another procedure where the
>ichip needs to be in a specificate state?

Most likely you should, as soon as you have an IP address, be able to ping the
unit.  ICMP is the lowest level of communication - basically, it means that a
destination is reachable (ie, all routing is functioning properly, both ends
have IP addresses, and the chips are physically alive).

>  Do I need to do anything with interrupts because I have not even
>connected the two Interrupt pins to the PIC.

Are you polling the Seiko rather than relying on interrupts?  You have to be
ready when it is!  You don't necessarily need to use the interrupts AS an
interrupt, but you likely need to test it.

>I do have a SDK development board for the iready, but I have not used it
>in that matter. It seems to me that there would be a lot more difficulty
>involved in this, where I would have to compile a lot of C code for the
>PC. I will try and give it a shot.


I strongly recommend you get the SDK going first.]

Andy

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2000\08\03@092744 by WF

flavicon
face
I recommend the LOCSSK 1.0 too! :)

Miguel

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2000\08\03@112621 by Dennis Hromin

flavicon
face
Well, last night I was able to accomplish UDP Send from the PIC to a PC
on the LAN (where the PIC would send UDP data). When I tried UDP Recieve
(where the PIC would poll the status registers for data), it failed again.

I now have reason to believe there is a problem with my routing. It seems
that I can only send data in one direction and thus would explain why TCP
and ICMP is not working. I will have to conntact the manufacturer again
about their equipment.

> Most likely you should, as soon as you have an IP address, be able to ping the
> unit.  ICMP is the lowest level of communication - basically, it means that a
> destination is reachable (ie, all routing is functioning properly, both ends
> have IP addresses, and the chips are physically alive).
>

Yes, I am polling the registers for available data and whether it has
connected. I wasn't sure if interrupts where required for basic operation
which is what I'd like to accomplish first.

> Are you polling the Seiko rather than relying on interrupts?  You have to be
> ready when it is!  You don't necessarily need to use the interrupts AS an
> interrupt, but you likely need to test it.
>

Thanks for all the help Andy, it really helped me determine what the
problem was.
-Dennis

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2000\08\03@123035 by Andrew Kunz

flavicon
face
> Thanks for all the help Andy, it really helped me determine what the
>problem was.

Well, Dennis, that's what the list is for.  I've been helped here a "few" times
myself!

Andy

-







Dennis Hromin <spam_OUTdhrominTakeThisOuTspamENGINEER.INTERNEXUS.NET> on 08/03/2000 11:49:42 AM

Please respond to pic microcontroller discussion list <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>








To:      PICLISTspamKILLspamMITVMA.MIT.EDU

cc:      (bcc: Andrew Kunz/TDI_NOTES)



Subject: Re: [OT]: Seiko S7600A TCP Connection Problem using
         PIC16F877








Well, last night I was able to accomplish UDP Send from the PIC to a PC
on the LAN (where the PIC would send UDP data). When I tried UDP Recieve
(where the PIC would poll the status registers for data), it failed again.

I now have reason to believe there is a problem with my routing. It seems
that I can only send data in one direction and thus would explain why TCP
and ICMP is not working. I will have to conntact the manufacturer again
about their equipment.

> Most likely you should, as soon as you have an IP address, be able to ping the
> unit.  ICMP is the lowest level of communication - basically, it means that a
> destination is reachable (ie, all routing is functioning properly, both ends
> have IP addresses, and the chips are physically alive).
>

Yes, I am polling the registers for available data and whether it has
connected. I wasn't sure if interrupts where required for basic operation
which is what I'd like to accomplish first.

> Are you polling the Seiko rather than relying on interrupts?  You have to be
> ready when it is!  You don't necessarily need to use the interrupts AS an
> interrupt, but you likely need to test it.
>

Thanks for all the help Andy, it really helped me determine what the
problem was.
-Dennis

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2000\08\03@190201 by Mitchell D. Miller

picon face
>  I now have reason to believe there is a problem with my routing.

Are these two devices on the same network segment?

-- Mitch

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2000\08\03@213158 by Dennis Hromin

flavicon
face
Yes, they are in fact. This is what I do not understand. I can telnet to
my router (which is a wireless access point) and I can issue a Ping
command, but even from there I do not recieve any responses.
 The manufactuer on the access point (router) told me to issue a
netstat -rn command in the DOS prompt of windows to display a routing
table.  This is not possible because the device connected to my wireless
trancsciever is the Seiko and PIC chip.
 Does anyone know if the Seiko knows where to route all it's data packets
to? Is it all built in to the chip?
 I am still uncertain what to do because I was told that my routing was
setup correctly.
-Dennis

On Thu, 3 Aug 2000, Mitchell D. Miller wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2000\08\03@233943 by Mitchell D. Miller

picon face
Is the subnet mask on the PIC project the same as on the router and your PC?
If not, it will appear to be on a different TCP/IP network.  Also, what is
the value assigned to the Default Gateway parameter?  In your case, it
should be set to 0.0.0.0.

Do I understand that from your PC, you do not get a reply from your router
when you try to ping it?  If your router connects you to a public network,
it may be programmed to not respond to PING requests.  Ping replies are a
dead giveaway that there is a PC waiting to be "hacked" at that IP address.
Since the recent DoS attacks, many corporations have shut off replies to
ping requests.

Can you give a little more information regarding your network configuration?
Media type, number of PCs, DHCP or static assigned IP addresses, O/S on the
PCs?

-- Mitch


{Original Message removed}

2000\08\04@112519 by Dennis Hromin

flavicon
face
The subnet is the same for all devices on the network. It is a private
network not connected to a public one. There is only one PC, the wireless
access point/router which is assigned an IP address and then the Seiko/PIC
circuit which is assigned and IP address.
 There is no default gateway and I was told that it is not needed. I
tried adding one, but it did not solve the problem.

> Is the subnet mask on the PIC project the same as on the router and your PC?
> If not, it will appear to be on a different TCP/IP network.  Also, what is
> the value assigned to the Default Gateway parameter?  In your case, it
> should be set to 0.0.0.0.

From my PC, i can ping the router and get a reply. I cannot ping the Seiko
chip from my PC. That is the problem. I should say that the router i am
reffering to is really a wireless access point like those used for wirless
ethernet cards. It is more like a bridge, but has routing functions
because of the ethernet interface.

I understand what you mean about ping being turned off because of DoS,
but this is a private network for development/testing and I have not
turned off any services like that.

> Do I understand that from your PC, you do not get a reply from your router
> when you try to ping it?  If your router connects you to a public network,
> it may be programmed to not respond to PING requests.  Ping replies are a
> dead giveaway that there is a PC waiting to be "hacked" at that IP address.
> Since the recent DoS attacks, many corporations have shut off replies to
> ping requests.
>

Basically the problem is that my Seiko chip can send out data through the
network to my PC, but I cannot return any data back to the chip. If I use
UDP, it works in one direction and thus I can send data from the PIC to
the PC, but not the other way around. TCP and ICMP requires data to
transmit back and forth and that is not working at this point.

> Can you give a little more information regarding your network configuration?
> Media type, number of PCs, DHCP or static assigned IP addresses, O/S on the
> PCs?

I hope this make a little more sense. I thought it was a problem with the
PIC/Seiko, but I believe it has something to do with the Access Point, and
the manufacturer (Digital Wireless Corp.) has not been of much help yet.
-Dennis

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\04@121855 by Mitchell D. Miller

picon face
> Basically the problem is that my Seiko chip can send out data through the
> network to my PC, but I cannot return any data back to the chip. If I use
> UDP, it works in one direction and thus I can send data from the PIC to
> the PC, but not the other way around. TCP and ICMP requires data to
> transmit back and forth and that is not working at this point.

It sounds like the default gateway on your PC is misconfigured.  I believe
it should be 0.0.0.0.  I believe you can find this out by doing a ROUTE
PRINT from a command prompt (that works in NT, at least).

-- Mitch

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\04@175315 by dal wheeler

flavicon
face
Do you have a packet sniffer running on a PC in your network?  It might make
it easier to look at what exactly is going on.  I'm not sure what DOS packet
sniffers are available, but under linux we use tcpdump.  This is available
in a bootable floppy distribution of linux, so it'd be easy to setup if you
don't find a DOS equiv.  Check out http://www.freesco.org

> The subnet is the same for all devices on the network. It is a private
> network not connected to a public one. There is only one PC, the wireless
> access point/router which is assigned an IP address and then the Seiko/PIC
> circuit which is assigned and IP address.
>   There is no default gateway and I was told that it is not needed. I
> tried adding one, but it did not solve the problem.
>
> > Is the subnet mask on the PIC project the same as on the router and your
PC?
> > If not, it will appear to be on a different TCP/IP network.  Also, what
is
{Quote hidden}

router
> > when you try to ping it?  If your router connects you to a public
network,
> > it may be programmed to not respond to PING requests.  Ping replies are
a
> > dead giveaway that there is a PC waiting to be "hacked" at that IP
address.
{Quote hidden}

configuration?
> > Media type, number of PCs, DHCP or static assigned IP addresses, O/S on
the
{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\04@202624 by Mitchell D. Miller

picon face
> Do you have a packet sniffer running on a PC in your network?

Say, now that you mention it, I believe there is a TCPView (or something
like that) available (along with a collection of other very sweet utilities)
at http://www.sysinternals.com.  These guys have a number of great utilities
that I use all the time (particularly with NTFS partitions), but I've not
used their TCP/IP capturing program.

-- Mitch

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\07@172522 by Dennis Hromin

flavicon
face
I tried setting the default gateway to 0.0.0.0 on my PC, but that did not
solve any problems. I cannot determine whether it is routing or a PPP
protocol problem or something else.
I can telnet to my router unit and issue a ping command from there as
well, which one would think that any routing issue would not interfere
since we are pinging from the router itself and not from a PC on the LAN.
I was told that the seiko should respond to a ping protocol packet, but I
am not receiving any responses. Yet I could only send data from the Seiko
(not recieve any data).  I am really confused now and I do not know what
to do about this. The manufacturer on the wireless equipment has not
provided much input yet. When I get my TINI this week, i'm going to test
my wireless equipment with it using PPP.
-dennis

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2000\08\08@154410 by Oliver Broad

flavicon
face
When using simpler interfaces such as UARTs an all too common scenario is
the TX but no RX or RX but no TX, where in some way the microcontroller was
failing to communicate with the UART. Happened to me at least once.
Fortunately with RS232 a simple scope test eliminated most other potential
pitfalls. Unfortunately I understand that in this case that is not an option
due to the complexity of the PPP protocol. Are you certain that if the
S7600A had recieved a packet the micro would be able to detect it.


{Original Message removed}

2000\08\08@220214 by Dennis Hromin

flavicon
face
Hi all,
Well, I finally figured out the problem to my project. It was as I
suspected an error with the router device. Because this is a wireless
device, a configuration for the internal RF radio was set wrong. It was
supposed to be set to factory defaults, but it wasn't.  This meant that it
was not able to properly send data back to the PIC & Seiko and thus would
explain why I was only able to send data in one direction.
I guess no one on this list could of figured the problem since it was a
specific problem with the equipment not related to PIC or Seiko.
Well, thanks for all the help in debugging. This is my first actual
project and I've learned a lot from it.
 A tip to all those working with the seiko, if you can't ping it after it
has an IP address, there is a network/link problem. Unfortunately, I was
using wireless technology which made things a little more difficult to
debug.
-Dennis

On Tue, 8 Aug 2000, Oliver Broad wrote:

> When using simpler interfaces such as UARTs an all too common scenario is
> the TX but no RX or RX but no TX, where in some way the microcontroller was
> failing to communicate with the UART. Happened to me at least once.
> Fortunately with RS232 a simple scope test eliminated most other potential
> pitfalls. Unfortunately I understand that in this case that is not an option
> due to the complexity of the PPP protocol. Are you certain that if the
> S7600A had recieved a packet the micro would be able to detect it.
>

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...