I am testing simple UDP Client/server application.
I get this on console:
0 98 [IP-task]
The following network interfaces are available:
Interface 1 - rpcap://\Device\NPF_{F13A9E5D-BAD9-4454-A630-B54F94B08672}
1 98 [IP-task] (Network adapter 'Intel(R) PRO/1000 MT síeové pYipojení' on local host)
2 98 [IP-task] Interface 2 - rpcap://\Device\NPF_{F142B748-A693-4964-9F66-B5F80DA00E81}
(Network adapter 'Microsoft' on local host)
3 98 [IP-task]
Attempting to open interface number 1.
4 2205 [IP-task] vDHCPProcess: offer 192.168.1.20
vDHCPProcess: offer 192.168.1.20
5 2306 [IP-task]
IP Address: 192.168.1.20
Subnet Mask: 255.255.255.0
6 2307 [IP-task] Gateway Address: 192.168.1.1
DNS Server Address: 192.168.1.1
When enabled debug printing to UDP, I see traffic from 192.168.1.20 which is address allocated by DHCP to this application to 192.168.0.11 which is echo server in my case.
returns with -11 and subsequent assert fails. When commenting out assert, application continues but receive returns always -11.
Socket is properly opened without error.
Client send function returns number of bytes send always 51.
I don’t see any traffic from client to server task on port 5005 using Wireshark.
(tried also port 4500, same result)
tried with firewall switched off, tried with enabling app through firewall, tried enable port 5005.
disabled also zero copy client/server tasks.
disabled TCP tasks which also don’t work.
If I understand your post correctly it sounds like you have got network access because you have an IP address assigned from the DHCP server, and you can send because you are sending logging data through a different UDP socket, but you don’t have any network connectivity between the UDP client and server socket - is that correct?
Can you step into the sendto() function for the client to see what it does?
It is possible your network setup is just not going to let you send and receive on the same computer - I have heard that before also not experienced it myself. I have an alternative setup whereby I use a virtual Ethernet port that gets installed with VirtualBox instead of the real Ethernet port - that also works but requires different network setup - specifically the network interface to use changes and I need to configure a static IP address that is compatible with whichever IP address the virtual network has.
yes, I dont have connectivity between client and server
I tried different setups
a) first on my PC which has only WiFi, no success
b) on another PC with wired eth port, no luck
c) again on my PC but with virtual machine running Windows7, there I have bridge between virtual machine and real WiFi adapter
npf WinPcap service is running
5 when I step into sendto(), I think it exits from here
/* Ask the IP-task to send this packet /
if( xSendEventStructToIPTask( &xStackTxEvent, xTicksToWait ) == pdPASS )
{
/ The packet was successfully sent to the IP task. */
lReturn = ( int32_t ) uxTotalDataLength;
returning number of bytes send
if I step into
case eStackTxEvent:
/* The network stack has generated a packet to send. A
pointer to the generated buffer is located in the pvData
member of the received event structure. */
vProcessGeneratedUDPPacket( ipCAST_PTR_TO_TYPE_PTR( NetworkBufferDescriptor_t, xReceivedEvent.pvData ) );
In most cases a demo using WInPCap can only communicate with applications on another device.
When you start RTOSDemo on your laptop, ping 192.168.1.20 will usually not work.
What does work is to run a UDP server on a second laptop and adapt the IP-addresses. If that is also a Windows laptop you can run the RTOSDemo as well.