Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - johnr

Pages: 1 [2] 3 4 ... 7
16
NXPTM M522XX, KINETIS and i.MX RT / Re: TCP socket connection
« on: April 04, 2008, 02:12:39 AM »
Hi Mark, The only difference between those linux box's is that the 10.1.2.47 and 10.1.2.95 hosts I was having
problems with were located inside our firewall, so I had a direct TCP path to it. The 208.44.86.230 host is outside
of our firewall,  requiring we go through routers to access it.
 I'll do some more testing to clarify this. Maybe I'll try patching the TCP code that you mentioned earlier
that aborts when it doesn't see the SYN/ACK response and see what happens.


 Thanks,
 John

17
NXPTM M522XX, KINETIS and i.MX RT / Re: TCP socket connection
« on: April 03, 2008, 09:59:40 PM »
Mark, The 208.44.86.230 box is outside of our firewall. When I
connect to it via uTasker, I get the following logs. Ill go back and compare this to connecting to the box that is on our switch.

 Thanks,
 John


0 - fnSetNextIMS_moving from OPENING to OPEN_REQUESTED
1 - fnIMSListener() Event=CONNECTED State=OPENING
1 - fnSetNextIMS_moving from OPENED to OPENED
610 - fnIMSListener() Event=CLOSED State=CLOSED
610 - fnSetNextIMS_moving from CLOSED to CLOSED



Code: [Select]
1 0.000000    Phonetic_00:1f:30     Broadcast             ARP      Who has 10.1.2.1?  Tell 10.1.2.38
      2 0.000181    Dell_20:79:a7         Phonetic_00:1f:30     ARP      10.1.2.1 is at 00:12:3f:20:79:a7
      3 0.000231    10.1.2.38             208.44.86.230         TCP      56278 > 9002 [SYN] Seq=0 Len=0 MSS=1460
      4 0.000238    10.1.2.11             10.1.2.38             ICMP     Redirect (Redirect for host)
      5 0.000242    208.44.86.230         10.1.2.38             TCP      9002 > 56278 [SYN, ACK] Seq=0 Ack=1 Win=16060 Len=0 MSS=1460
      6 0.000245    10.1.2.38             208.44.86.230         TCP      56278 > 9002 [ACK] Seq=1 Ack=1 Win=1460 Len=0
      7 5.013756    CompaqCo_30:3b:44     Phonetic_00:1f:30     ARP      Who has 10.1.2.38?  Tell 10.1.2.2
      8 5.013772    Phonetic_00:1f:30     CompaqCo_30:3b:44     ARP      10.1.2.38 is at 00:07:f9:00:1f:30
      9 5.017447    Dell_20:79:a7         Phonetic_00:1f:30     ARP      Who has 10.1.2.38?  Tell 10.1.2.11
     10 5.017551    Phonetic_00:1f:30     Dell_20:79:a7         ARP      10.1.2.38 is at 00:07:f9:00:1f:30
     11 60.146190   10.1.2.38             208.44.86.230         TCP      56278 > 9002 [FIN, ACK] Seq=1 Ack=1 Win=1460 Len=0
     12 60.146209   10.1.2.11             10.1.2.38             ICMP     Redirect (Redirect for host)
     13 60.147116   208.44.86.230         10.1.2.38             TCP      9002 > 56278 [ACK] Seq=1 Ack=2 Win=16060 Len=0
     14 61.053988   208.44.86.230         10.1.2.38             TCP      9002 > 56278 [FIN, ACK] Seq=1 Ack=2 Win=16060 Len=0
     15 61.054042   10.1.2.38             208.44.86.230         TCP      56278 > 9002 [ACK] Seq=2 Ack=2 Win=1460 Len=0
     16 61.054193   10.1.2.11             10.1.2.38             ICMP     Redirect (Redirect for host)
     17 65.101247   CompaqCo_30:3b:44     Phonetic_00:1f:30     ARP      Who has 10.1.2.38?  Tell 10.1.2.2
     18 65.101265   Phonetic_00:1f:30     CompaqCo_30:3b:44     ARP      10.1.2.38 is at 00:07:f9:00:1f:30
     19 65.106050   Dell_20:79:a7         Phonetic_00:1f:30     ARP      Who has 10.1.2.38?  Tell 10.1.2.11
     20 65.106156   Phonetic_00:1f:30     Dell_20:79:a7         ARP      10.1.2.38 is at 00:07:f9:00:1f:30


18
NXPTM M522XX, KINETIS and i.MX RT / Re: TCP socket connection
« on: April 03, 2008, 02:17:27 PM »
Hi Mark, IP's 10.1.2.95 and 10.1.2.47 are 2 of the in house linux hosts that use port 9002
for our application. Here's an IP of a linux host that is accessible from the Internet

 208.44.86.230 port 9002


 Thanks,
 John

19
NXPTM M522XX, KINETIS and i.MX RT / Re: TCP socket connection
« on: April 02, 2008, 09:26:59 PM »
Mark , I was able to connect OK to the linux telnet port 23.
Here's the log. We can't connect to port 9002
on that box.


 Thanks,
 John

Here's my log. For some reason we're getting a CONREQ and
TCP_EVENT_REGENERATE events. I'm not sending any data, just
opening the connection.

Code: [Select]
- fnSetNextIMS_state connected OK
1 - fnIMSListener() TCP_EVENT_CONNECTED
3 - fnIMSListener() TCP_EVENT_CONREQ
3 - fnIMSListener() TCP_EVENT_DATA
3 - fnHandleData() state=4 len=12
603 - fnIMSListener() TCP_EVENT_REGENERATE
680 - fnIMSListener() TCP_EVENT_REGENERATE
719 - fnIMSListener() TCP_EVENT_CLOSED
720 - fnIMSListener() TCP_EVENT_REGENERATE

Code: [Select]
63 1029.794544 Phonetic_00:1f:30     Broadcast             ARP      Who has 10.1.2.47?  Tell 10.1.2.38
     64 1029.795157 Advantec_37:40:40     Phonetic_00:1f:30     ARP      10.1.2.47 is at 00:d0:c9:37:40:40
     65 1033.421818 10.1.2.38             10.1.2.47             TCP      56278 > telnet [FIN, ACK] Seq=1 Ack=13 Win=1460 Len=0
     66 1033.422652 10.1.2.47             10.1.2.38             TCP      telnet > 56278 [ACK] Seq=13 Ack=2 Win=16060 Len=0
     67 1033.430642 10.1.2.47             10.1.2.38             TCP      telnet > 56278 [FIN, ACK] Seq=13 Ack=2 Win=16060 Len=0
     68 1033.430843 10.1.2.38             10.1.2.47             TCP      [TCP Keep-Alive] 56278 > telnet [ACK] Seq=1 Ack=14 Win=1460 Len=0
     69 1033.431688 10.1.2.47             10.1.2.38             TCP      [TCP Keep-Alive ACK] telnet > 56278 [ACK] Seq=14 Ack=2 Win=16060 Len=0
     70 1033.737752 10.1.2.47             10.1.2.38             TCP      telnet > 56278 [FIN, ACK] Seq=13 Ack=2 Win=16060 Len=0
     71 1034.353423 10.1.2.47             10.1.2.38             TCP      telnet > 56278 [FIN, ACK] Seq=13 Ack=2 Win=16060 Len=0
     72 1035.590325 10.1.2.47             10.1.2.38             TCP      telnet > 56278 [FIN, ACK] Seq=13 Ack=2 Win=16060 Len=0
     73 1037.416811 Phonetic_00:1f:30     Broadcast             ARP      Who has 10.1.2.47?  Tell 10.1.2.38
     74 1037.417317 Advantec_37:40:40     Phonetic_00:1f:30     ARP      10.1.2.47 is at 00:d0:c9:37:40:40
     75 1038.104518 10.1.2.47             10.1.2.38             TCP      telnet > 56278 [FIN, ACK] Seq=13 Ack=2 Win=16060 Len=0
     76 1041.453627 Phonetic_00:1f:30     Broadcast             ARP      Who has 10.1.2.47?  Tell 10.1.2.38
     77 1041.454171 Advantec_37:40:40     Phonetic_00:1f:30     ARP      10.1.2.47 is at 00:d0:c9:37:40:40
     78 1043.063326 10.1.2.47             10.1.2.38             TCP      telnet > 56278 [FIN, ACK] Seq=13 Ack=2 Win=16060 Len=0
     79 1043.063339 10.1.2.38             10.1.2.47             TCP      56278 > telnet [RST] Seq=2 Len=0


20
NXPTM M522XX, KINETIS and i.MX RT / Re: TCP socket connection
« on: April 02, 2008, 09:01:08 PM »
Mark, the host we're trying to connect to is running linux ver
2.2.25. I did a test connecting to our SMTP server and it
worked OK. Here's the log.
  I'll try to connect to the telnet port on the linux host giving us the problem.

 Thanks,
 John


Code: [Select]
1 0.000000    Phonetic_00:1f:30     Broadcast             ARP      Who has 10.1.2.111?  Tell 10.1.2.38
      2 0.000056    CompaqCo_8e:06:8a     Phonetic_00:1f:30     ARP      10.1.2.111 is at 00:50:8b:8e:06:8a
      3 0.002083    10.1.2.38             10.1.2.111            TCP      56278 > smtp [SYN] Seq=0 Len=0 MSS=1460
      4 0.002100    10.1.2.111            10.1.2.38             TCP      smtp > 56278 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1460
      5 0.002123    10.1.2.38             10.1.2.111            TCP      56278 > smtp [ACK] Seq=1 Ack=1 Win=1460 Len=0
      6 0.011113    10.1.2.111            10.1.2.38             SMTP     Response: 220 ip226.sensaphone.us ESMTP Sendmail 8.12.11/8.12.11; Wed, 2 Apr 2008 15:38:57 -0400
      7 0.016719    10.1.2.38             10.1.2.111            TCP      56278 > smtp [ACK] Seq=1 Ack=89 Win=1460 Len=0
      8 60.136331   10.1.2.38             10.1.2.111            TCP      56278 > smtp [FIN, ACK] Seq=1 Ack=89 Win=1460 Len=0
      9 60.136379   10.1.2.111            10.1.2.38             TCP      smtp > 56278 [FIN, ACK] Seq=89 Ack=2 Win=5840 Len=0
     10 60.136411   10.1.2.38             10.1.2.111            TCP      56278 > smtp [ACK] Seq=2 Ack=90 Win=1460 Len=0

21
NXPTM M522XX, KINETIS and i.MX RT / Re: TCP socket connection
« on: April 02, 2008, 07:07:06 PM »
Mark, I connected the uTasker device, the host it's trying to connect to
and the PC running Wireshark to the same Netgear hub.
uTasker has IP 10.1.2.38 and is trying to connect to 10.1.2.95, port
9002. I log the fnConnectTCP and it returns OK. Here's the
Wireshark dump.

  I can't run the current project in the simulator since it has too many
changes in it that prevent it from compiling under VC.

 Thanks,
 John

 Here's my log
0 - fnSetNextIMS_state connected OK
1 - fnIMSListener() TCP_EVENT_ABORT



Wireshark log using filter host 10.1.2.38

Code: [Select]
No.     Time        Source                Destination           Protocol Info
      1 0.000000    Phonetic_00:1f:30     Broadcast             ARP      Who has 10.1.2.95?  Tell 10.1.2.38
      2 0.000058    Advantec_56:82:52     Phonetic_00:1f:30     ARP      10.1.2.95 is at 00:d0:c9:56:82:52
      3 0.000068    10.1.2.38             10.1.2.95             TCP      56278 > 9002 [SYN] Seq=0 Len=0 MSS=1460
      4 0.000075    10.1.2.95             10.1.2.38             TCP      9002 > 56278 [ACK] Seq=0 Ack=1 Win=16060 Len=0
      5 0.000079    10.1.2.38             10.1.2.95             TCP      56278 > 9002 [RST] Seq=0 Len=0
      6 5.015432    Advantec_56:82:52     Phonetic_00:1f:30     ARP      Who has 10.1.2.38?  Tell 10.1.2.95
      7 5.015451    Phonetic_00:1f:30     Advantec_56:82:52     ARP      10.1.2.38 is at 00:07:f9:00:1f:30

22
NXPTM M522XX, KINETIS and i.MX RT / TCP socket connection
« on: April 01, 2008, 04:49:23 PM »
Hi Mark, I am using the non buffered mode and try to connect to
a TCP host from uTasker. uTasker is set to IP 10.1.2.38
and the remote host has IP 10.1.2.47. After connecting the listener
gets an EVENT_ABORT. Here's the Wireshark log. It looks like uTasker
sends an ARP broadcast out asking who is 10.1.2.47, then 10.1.2.47
send out 3 ARP broadcasts asking who 10.1.2.38 is then stops.
It looks like uTasker is not sening back the ARP request to
10.1.2.47.

 The connect code returns OK. I got a valid socket number, 6,
and I'm using remote port 9002.
 
Code: [Select]
if  (fnTCP_Connect(IMS_TCP_socket, ipIMS, IMS_HOST_PORT, 0, 0)       >= 0)


 I can ping uTasker from 10.1.2.251 Ok and acces the uTasker web
server with no problems.


 Thanks,
 John
 
 
 

No.     Time        Source                Destination           Protocol Info
      4 10.032296   Advantec_37:40:40     Broadcast             ARP      Who has 10.1.2.38?  Tell 10.1.2.47


No.     Time        Source                Destination           Protocol Info
      5 294.297014  Phonetic_00:1f:30     Broadcast             ARP      Who has 10.1.2.47?  Tell 10.1.2.38

Address Resolution Protocol (request)

No.     Time        Source                Destination           Protocol Info
      6 302.262124  Advantec_37:40:40     Broadcast             ARP      Who has 10.1.2.38?  Tell 10.1.2.47


No.     Time        Source                Destination           Protocol Info
      7 303.298232  Advantec_37:40:40     Broadcast             ARP      Who has 10.1.2.38?  Tell 10.1.2.47


No.     Time        Source                Destination           Protocol Info
      8 304.294644  Advantec_37:40:40     Broadcast             ARP      Who has 10.1.2.38?  Tell 10.1.2.47

No.     Time        Source                Destination           Protocol Info
      9 406.338065  Vmware_26:8d:5d       Broadcast             ARP      Who has 10.1.2.38?  Tell 10.1.2.251

Frame 9 (42 bytes on wire, 42 bytes captured)
Ethernet II, Src: Vmware_26:8d:5d (00:0c:29:26:8d:5d), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Address Resolution Protocol (request)

No.     Time        Source                Destination           Protocol Info
     10 406.338440  Vmware_26:8d:5d       Broadcast             ARP      Who has 10.1.2.38?  Tell 10.1.2.251


No.     Time        Source                Destination           Protocol Info
     11 406.338644  Phonetic_00:1f:30     Vmware_26:8d:5d       ARP      10.1.2.38 is at 00:07:f9:00:1f:30


No.     Time        Source                Destination           Protocol Info
     12 406.338789  10.1.2.251            10.1.2.38             ICMP     Echo (ping) request

Frame 12 (74 bytes on wire, 74 bytes captured)
Ethernet II, Src: Vmware_26:8d:5d (00:0c:29:26:8d:5d), Dst: Phonetic_00:1f:30 (00:07:f9:00:1f:30)
Internet Protocol, Src: 10.1.2.251 (10.1.2.251), Dst: 10.1.2.38 (10.1.2.38)
Internet Control Message Protocol

No.     Time        Source                Destination           Protocol Info
     13 406.339256  10.1.2.38             10.1.2.251            ICMP     Echo (ping) reply


23
NXPTM M522XX, KINETIS and i.MX RT / Re: fnSendTCP() behaviour
« on: March 31, 2008, 03:21:16 PM »
Thanks, Mark. I'll limit my TCP data payloads 1460 bytes.


 John
 

24
NXPTM M522XX, KINETIS and i.MX RT / Re: fnSendTCP() behaviour
« on: March 28, 2008, 02:50:58 PM »
Thanks Mark, It's getting clearer now :)
  USE_BUFFERED_TCP isn't defined in my project, we're not using TELNET, so TCP_BUFFER_FRAME isn't defined in app_hw_5233x.h.
How can it work ?

 John

25
NXPTM M522XX, KINETIS and i.MX RT / fnSendTCP() behaviour
« on: March 27, 2008, 06:40:38 PM »
Hi Mark, I plan on using fnSendTCP()  as described in my previous post ,due
to our low bandwidth needs and it's more efficient memory usage.
 Does fnSendTCP() return <= 0 only when it can't resolve the ARP entry ?
After returning >0 the listener will get a TCP_EVENT_ACK when the other side acks us
or  a TCP_EVENT_REGENERATE on a timeout ?
 Where is the TCP send/rcv buffer size defines used in in non-buffered mode ? I should
set these to handle the largest packets I expect to send/rcv.
 If we have to break up a packet with multple fnSendTCP() calls, it loks like we would
always need to prepend the MIN_TCP_HLEN space and set the push flag to 0
except on the last packet fragment.


 Thanks,
 John
 

26
NXPTM M522XX, KINETIS and i.MX RT / Re: Writing a TCP socket
« on: March 27, 2008, 04:13:17 PM »
Thanks Mark, the links cleared it up a bit. I'm familar with the linux and
windows socket abstractions, which are higher level APIs.
 Our application is basically half duplex in nature. One side sends a data packet and the other responds with an ack data packet. Most packets are only a few hundred bytes in length. The largest packet we would receive would be 1550 data bytes, which is only sent at initialization to download params. 
 I'm still trying to decide whether to use the simple non-buffered or
buffered interface. I'm looking at the smtp code as a starting
point. We don't need the throughput of the buffered interface, so we can save memory, at the expense of more API compexity.  Eventually it will make sense  ;D


 John


27
NXPTM M522XX, KINETIS and i.MX RT / Writing a TCP socket
« on: March 26, 2008, 06:22:42 PM »
Hi,
 Is it possible to return the number of bytes written when
calling =fnSendTCP() ? The end of fnSendIP() contains the following code
which I wouldn't think would do it. It looks like it returns <= 0 on an error.
 I am porting some linux type net code to run in uTasker that would loop writting the socket until all the data went out. I see the data buffer passed in  fnSendTCP() must also contain an uninitialized TCP header area ,which isn't included in the length. If  fnSendTCP()  doesn't
return the actual byte count that was sent, what would be a safe
max that I could use to break up the data ?

Code: [Select]
    fnWrite(Ethernet_handle, dat, usLen);      // add the pay load
    return (fnWrite(Ethernet_handle, 0, 0));   // transmit the  EHERNET frame


 Thanks,
 John



28
NXPTM M522XX, KINETIS and i.MX RT / Re: Register passing in SP5
« on: February 06, 2008, 10:23:08 PM »
Hi Mark, the SP5 code with reg passing and no A6 stack frames looks like it's
working so far. A co worker has  ported over a small pre-emptive RTOS which
ran on a 8051 type CPU so he can run some of his code with uTasker.
We are using an unused TIMER set for 10ms to preempt the RTOS code. We only
do this when uTasker is idle. We also use a trap to implement an RTOS Yield function.
We are testing it with 2 RTOS tasks running and so far it seems to be working.
I moved the top of the heap down and we have about 12K of free stack ram
to add more RTOS tasks etc. The fp_coldfire.a lib hasn't had a problem with
the pre-emptive RTOS tasks so far in my testing.

 Thanks,
 John

29
NXPTM M522XX, KINETIS and i.MX RT / Re: Register passing in SP5
« on: February 05, 2008, 07:56:11 PM »
Mark, I set the project to use register passing. We also
use the fp_coldfire.a math library located in the
FreeScaleCW6.3 tree. There is no project in their tree to rebuild
it ,so I used it as is. The uTasker project ran OK. When I disassembled the calls to  fp_coldfire.a I noticed that the compiler must know it's stack passing and uses that method. Overall the project saved about 6K of code and 176 byes less of
stack usage using register passing. I also disabled using A6
stack frames and saved over 2K of code usage. Do you think
this will be a problem ?

 Thanks,
 John

30
NXPTM M522XX, KINETIS and i.MX RT / Re: Register passing in SP5
« on: February 05, 2008, 03:07:46 PM »
Thanks Mark, I'll give it a shot ...

 John

Pages: 1 [2] 3 4 ... 7