Hi, In one of my networking based projects, I am using two types of wireless USB dongles. One has Realtek 5370 chipset. Another has Atheros 9271 chipset. My application involves TCP/IP socket communication in server-client mode. This works quite good with Rt-5370 based module, but fails with Ath-9271 based module, specifically in client mode!
In client mode, when the statement in my C code to 'connect' to a host socket is executed, it returns with an error "Invalid argument" (errno = EINVAL) !!! Here are some other observations I have: 1. With the same Ath-9271 module, on the same board and same Linux image, it works quite fine while in server mode. The function calls 'socket', 'bind', 'listen', 'accept', 'read', 'write' work well, but it fails only at 'connect' while in client mode. 2. The same client mode C code runs well with Rt-5370 based module. 3. The same client mode C code, when built for i686 using native gcc runs equally well on the Ath-9271 based module as well as on the Rt-5370 based module. I tried to look around for others facing similar issue. I found many, but the solutions suggested were all regarding correctness of the third argument to 'connect', i.e. the size of 'sockaddr_in' (or 'sockaddr_in6' for IPv6 as in my case) structure. I also had a quick walk-through of the kernel code and came to know that this error is returned against an invalid length of address structure passed to 'connect'. In my case, I found it being correct. Moreover, this parameter is passed to 'connect' as it is received from the result of a 'getaddrinfo' call, which initialises it properly. So, no doubt there. How can I get through this? Can anybody throw some light on this issue? Thanks and Regards Vasudeo K. Bidve _______________________________________ Pune GNU/Linux Users Group Mailing List
