[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] windows 7, IPv6, and WiFi
From: |
Zach Smith |
Subject: |
Re: [lwip-users] windows 7, IPv6, and WiFi |
Date: |
Fri, 6 Sep 2013 22:04:59 +0000 |
For anyone who is interested in this:
I posted a couple months ago I was having trouble with Windows7 and IPv6
working with my WiFi device. Well, I was able to get it working and I thought
I'd post an update here for anyone (if anyone) that might care. I wasn't
suspecting it to be a problem with LwIP and turns out, it was not.
Quick recap:
I wasn't able to communicate using a PC with Windows 7 (tried many machines) to
my embedded device via TCP/IPv6 over Wi-Fi. I was able to communicate using
PC(Win7) to my embedded device via TCP/IPv4. And I was able to communicate
using PCs with Windows XP via TCP/IPv4 or IPv6.
1. PC(WinXP) ---[TCP/IPv4] ---[WiFi router] --- [embedded device] **worked
2. PC(WinXP) ---[TCP/IPv6] ---[WiFi router] --- [embedded device] **worked
3. PC(Win7) ---[TCP/IPv6] ---[WiFi router] --- [embedded device] **didn't
work
So, I discovered I was doing something wrong in my low level driver sending
packets to the Wi-Fi module. I use a Redpine module and send it raw Ethernet
packets which the module sends out to the network. The module requires packets
to be in a multiple of 4 bytes so you have to pad with dummy bytes before you
send to the module. I was padding but not quite correctly so my Ethernet
packets were going out with extra zero bytes on the end.
The PC TCP client would send TCP SYN and the embedded device would reply with
TCP SYN/ACK and the PC would not then send ACK. So I assume the Win7 stack was
rejecting the SYN/ACK because of the extra 2 bytes of 00. It is interesting
that my extra byte problem has always been there but has not caused
communication problems with other versions of windows or other TCP clients.
Also interesting is that this was not causing a problem when using IPv4.
It might be because in a successful IPv4 communication the TCP SYN/ACK packet
is smaller than the minimum Ethernet packet size. So the extra 00 bytes that I
was putting at the end were probably considered as padding which is supposed to
be there for small packets. But with IPv6, the TCP SYN/ACK packet is larger
than the minimum size so Windows7 apparently doesn't like the extra zero bytes.
Or perhaps it is the NIC? Not sure.
Anyway, I removed the extra 00 byte padding and all is working well now.
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Ivan Delamer
Sent: Tuesday, July 09, 2013 10:20 AM
To: address@hidden
Subject: Re: [lwip-users] windows 7, IPv6, and WiFi
Sounds like a routing problem to me. Try a PC<->PC IPv6 connection through your
Intranet and see if that works.
PS: I'm using redpine modules too.
Cheers
Ivan
> Date: Tue, 9 Jul 2013 15:02:17 +0000
> From: Zach Smith <address@hidden>
> To: Mailing list for lwIP users <address@hidden>
> Subject: Re: [lwip-users] windows 7, IPv6, and WiFi
> Message-ID:
>
> <address@hidden
> om>
>
> Content-Type: text/plain; charset="us-ascii"
>
> Thank you for the response. Unfortunately we have tried these things
> and still can't get it to work.
>
> Interestingly, we can't get communication with our setup like this:
> [Win7 PC] --- (wired Ethernet) --- (Intranet) ---(wired Ethernet) ---
> [wireless router] --- (WiFi) --- [Embedded device]
>
> But if we try a setup like this then it works:
> [Win7 PC] --- (WiFi) --- [Wireless Router] --- (Embedded device]
>
> -Zach
>
>
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Ivan Delamer
> Sent: Sunday, July 07, 2013 2:52 PM
> To: address@hidden
> Subject: Re: [lwip-users] windows 7, IPv6, and WiFi
>
> Hi Zach,
>
> I have been able to use LwIP with IPv6, Windows 7, and Wifi, so I
> don't think it is specific to those technologies.
>
> I believe Windows 7 has much higher integration of IPv6 (previous
> versions were more like patches). I think one of the changes is that
> there are many more interfaces, and this can complicate things if you
> are using link-local addresses.
>
> So my advice is:
> - If you are using link-local addresses, make sure your PC app is
> specifying the correct interface
> - Try using a specific prefix for your addresses such as aaaa:: and
> use iproute to send all those packets through the interface (Ethernet,
> Wifi) to which the lwip device is connected.
>
> Lastly, you can try temporarily disabling the firewall.
>
> Again, I have used this in many Win7 installations, usually there is a
> configuration issue that can be solved with iproute.
>
> Cheers
> Ivan
>
>
>> Date: Fri, 5 Jul 2013 19:54:28 +0000
>> From: Zach Smith <address@hidden>
>> To: "address@hidden" <address@hidden>
>> Subject: [lwip-users] windows 7, IPv6, and WiFi
>> Message-ID:
>>
>> <address@hidden
>> c
>> om>
>>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> I am experiencing a problem that has me very confused and I wonder if
>> anybody has seen this or could suggest an idea.
>>
>> My embedded device runs lwip and has been working great with IPv4.
>> It uses a WiFi module to handle raw Ethernet packets that I send it
>> and I get raw Ethernet from it. I updated to latest lwip to add IPv6
>> support. I was able to add it and it seemed to work great. That is,
>> with my windows XP machine (IP6 enabled) I could communicate fine
>> with the IP6 embedded device. But someone else in my company then
>> tried it with their Windows 7 machine and couldn't connect. Since
>> then we have tried many different machines - XP, Vista, Win7. Only
>> the Windows 7 machines have problems.
>>
>> A strange thing is that they can ping the embedded device fine but
>> can't open a TCP connection. I have done many Wireshark captures and
>> can see that the Win7 PC sends a SYN and the embedded device responds
>> with a SYN,ACK. But then the PC acts as though it never received the
>> SYN,ACK because it just times out and sends the SYN again. I have
>> compared Wireshark captures from PCs that are able to connect and PCs
>> that are not able to connect and those SYN and SYN,ACK packets look
>> identical except for IP and MAC addresses.
>>
>> I thought maybe it's the WiFi routers but they are just bridged to
>> pass everything through and it does seem that they are routing the
>> packets OK as the PC wireshark logs show - the SYN,ACK from the
>> embedded device gets to the PC but the PC never responds with the
>> ACK.
>>
>> Is there some special thing to configure windows 7 to work with IP6
>> or something I am missing? Any Ideas??
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users
>
> This email may contain information that is confidential and/or
> legally privileged in nature. The message is intended for the use of
> the individual(s) or entity listed above. If you are not the intended
> recipient, please do not read, copy, publish or distribute the
> communication; and notify the sender by replying to this message and
> deleting this copy and any copies that may be in your electronic
> system. Thank you for your compliance.
>
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
________________________________
This email may contain information that is confidential and/or legally
privileged in nature. The message is intended for the use of the individual(s)
or entity listed above. If you are not the intended recipient, please do not
read, copy, publish or distribute the communication; and notify the sender by
replying to this message and deleting this copy and any copies that may be in
your electronic system. Thank you for your compliance.
- Re: [lwip-users] windows 7, IPv6, and WiFi,
Zach Smith <=