[ECOS] SLIP lwIP, eCos and Windows

Øyvind Harboe oyvind.harboe@zylin.com
Wed Mar 17 14:46:00 GMT 2004


This is just a small writeup of some issues when working with lwIP and
Windows. It answers some questions that I've asked previously in this
mailing list:

When using SLIP under Windows against an lwIP eCos unit, a static route
must be set up.

1. Set up a SLIP connection and connect to the unit.
2. Set up a static route using Windows route.exe command. Example
attached from a test I ran against an AT91 EB40a evaluation board.


Note! there is an additional complication that Windows will sometimes
set up a route incorrectly or refuse to do so with weirdo error
messages. Deleting all permanent static routes to the lwIP eCos unit,
and rebooting Windows seems to fix the problem every time. I don't quite
understand why Windows gets into this state, but if I had to guess,
perhaps Windows gets confused by SLIP changing "IF address" every it
connects to the lwIP eCos unit. If someone knows a cure, or can shed
some light on this problem, it would be most welcome. (Excluding the
"use Linux" solution :-)


Øyvind

-------------- next part --------------
- 192.168.222.202 is the IP of the SLIP connection (on the Windows end).
- 10.0.0.10 is the IP of the lwIP eCos unit (on the other end of the
serial cable).


c:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 50 56 c0 00 08 ...... VMware Virtual Ethernet Adapter
0x3 ...00 50 56 c0 00 01 ...... VMware Virtual Ethernet Adapter
0x1000005 ...00 50 bf 5d 3a 98 ...... NDIS 5.0 driver

0x4000006 ...00 53 45 00 00 00 ...... WAN (PPP/SLIP) Interface
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    192.168.222.1  192.168.222.115      1
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
     192.168.34.0    255.255.255.0     192.168.34.1    192.168.34.1       1
     192.168.34.1  255.255.255.255        127.0.0.1       127.0.0.1       1
   192.168.34.255  255.255.255.255     192.168.34.1    192.168.34.1       1
    192.168.133.0    255.255.255.0    192.168.133.1   192.168.133.1       1
    192.168.133.1  255.255.255.255        127.0.0.1       127.0.0.1       1
  192.168.133.255  255.255.255.255    192.168.133.1   192.168.133.1       1
    192.168.222.0    255.255.255.0  192.168.222.115  192.168.222.115      1
    192.168.222.0    255.255.255.0  192.168.222.202  192.168.222.202      1
  192.168.222.115  255.255.255.255        127.0.0.1       127.0.0.1       1
  192.168.222.202  255.255.255.255        127.0.0.1       127.0.0.1       1
  192.168.222.255  255.255.255.255  192.168.222.115  192.168.222.115      1
  192.168.222.255  255.255.255.255  192.168.222.202  192.168.222.202      1
        224.0.0.0        224.0.0.0     192.168.34.1    192.168.34.1       1
        224.0.0.0        224.0.0.0    192.168.133.1   192.168.133.1       1
        224.0.0.0        224.0.0.0  192.168.222.115  192.168.222.115      1
        224.0.0.0        224.0.0.0  192.168.222.202  192.168.222.202      1
  255.255.255.255  255.255.255.255    192.168.133.1   192.168.133.1       1
Default Gateway:     192.168.222.1
===========================================================================
Persistent Routes:
  None

c:\>route add 10.0.0.10 192.168.222.202 if 0x4000006

!!!!!! IF THIS FAILS REBOOTING WINDOWS HELPS !!!!!!

c:\>ping 10.0.0.10

Pinging 10.0.0.10 with 32 bytes of data:

Reply from 10.0.0.10: bytes=32 time=40ms TTL=128
Reply from 10.0.0.10: bytes=32 time=60ms TTL=128
Reply from 10.0.0.10: bytes=32 time=31ms TTL=128
Reply from 10.0.0.10: bytes=32 time=30ms TTL=128

Ping statistics for 10.0.0.10:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 30ms, Maximum =  60ms, Average =  40ms

c:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 50 56 c0 00 08 ...... VMware Virtual Ethernet Adapter
0x3 ...00 50 56 c0 00 01 ...... VMware Virtual Ethernet Adapter
0x1000005 ...00 50 bf 5d 3a 98 ...... NDIS 5.0 driver

0x4000006 ...00 53 45 00 00 00 ...... WAN (PPP/SLIP) Interface
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    192.168.222.1  192.168.222.115      1
        10.0.0.10  255.255.255.255  192.168.222.202  192.168.222.202      1
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
     192.168.34.0    255.255.255.0     192.168.34.1    192.168.34.1       1
     192.168.34.1  255.255.255.255        127.0.0.1       127.0.0.1       1
   192.168.34.255  255.255.255.255     192.168.34.1    192.168.34.1       1
    192.168.133.0    255.255.255.0    192.168.133.1   192.168.133.1       1
    192.168.133.1  255.255.255.255        127.0.0.1       127.0.0.1       1
  192.168.133.255  255.255.255.255    192.168.133.1   192.168.133.1       1
    192.168.222.0    255.255.255.0  192.168.222.115  192.168.222.115      1
    192.168.222.0    255.255.255.0  192.168.222.202  192.168.222.202      1
  192.168.222.115  255.255.255.255        127.0.0.1       127.0.0.1       1
  192.168.222.202  255.255.255.255        127.0.0.1       127.0.0.1       1
  192.168.222.255  255.255.255.255  192.168.222.115  192.168.222.115      1
  192.168.222.255  255.255.255.255  192.168.222.202  192.168.222.202      1
        224.0.0.0        224.0.0.0     192.168.34.1    192.168.34.1       1
        224.0.0.0        224.0.0.0    192.168.133.1   192.168.133.1       1
        224.0.0.0        224.0.0.0  192.168.222.115  192.168.222.115      1
        224.0.0.0        224.0.0.0  192.168.222.202  192.168.222.202      1
  255.255.255.255  255.255.255.255    192.168.133.1   192.168.133.1       1
Default Gateway:     192.168.222.1
===========================================================================
Persistent Routes:
  None

c:\>
-------------- next part --------------
-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


More information about the Ecos-discuss mailing list