I am trying to send UDP packets between two S7G2 modules using NetX and SSP 1.1.3.
I am using fixed Private IP addresses in the range of 10.0.0.nn
The following are set up on both boards with no errors:
- nx_packet_pool_create
- nx_ip_create --- using the IP I want 10.0.0.nn. Also I have made my code force a unique MAC address for each board and confirmed this is working
- nx_ip_fragment_enable
- nx_arp_enable
- nx_udp_enable
- nx_icmp_enable
- nx_igmp_enable
- nx_udp_socket_create
- nx_udp_socket_bind
- nx_udp_socket_checksum_enable
To send test packet:
- nx_packet_allocate
- nx_packet_data_append "Hello World"
- nx_udp_socket_send --- returns ERROR 0x21 --- invalid IP address
I am pretty sure it returns this error because ARP has not resolved this IP address in its look up table.
I have stepped into the NetX code and this seems to be what is happening.
I think I need to get the definition "NX_ENABLE_IP_STATIC_ROUTING" set in nx_api.h. I have tried enabling this using the configurator to no avail.
First does this seem like my problem?
Second, how do I get this enabled?
Thanks for your help,
Steve D