Other Parts Discussed in Thread: CC3200, CC3100SDK
In advance, I apologize for asking what is going to sound like a really stupid question.
I'm working on a project where an android app communicates with a cc3200 over p2p with udp packets. So far I can connect, communicate both directions on both the android and the cc3200 and am pretty happy with the progress. There is however one hurdle I can't get over and that is getting the cc3200 to get an IP address from the android.
The android is always the Group Owner and its IP is 192.168.49.1
When the cc3200 connects its IP is192.168.49.153. I don't think this IP is a product of DHCP because when I sign a tablet onto the android it gets IP 192.168.49.10 which I think is more plausible.
I'm using many of the routines from the example apps including this one from the p2p example.
static long ConfigureSimpleLinkToDefaultState()
As best I can understand, the following is responsible for setting how the cc3200 gets the IP address.
// Enable DHCP client
lRetVal = sl_NetCfgSet(SL_IPV4_STA_P2P_CL_DHCP_ENABLE,IPCONFIG_MODE_ENABLE_IPV4,1,&ucVal);
ASSERT_ON_ERROR(lRetVal);
So my first question is, am I reading this right? Is this configuring the cc3200 to get its IP via DHCP? If so it doesn't seem to do it.
Second question, am I off base assuming that the 192.168.49.153 address is not coming from the android?
Third question, Documentation on the NetCfg module says, "In order to disable the static IP and get the address from DHCP one should use SL_STA_P2P_IPV4_DHCP_SET" but that option does not exist. I assume the only options for the first parameter are,
SL_MAC_ADDRESS_SET
SL_IPV4_STA_P2P_CL_DHCP_ENABLE
SL_IPV4_STA_P2P_CL_STATIC_ENABLE
SL_IPV4_AP_P2P_GO_STATIC_ENABLE
SL_IPV4_DHCP_CLIENT
SL_IPV4_DNS_CLIENT
SL_IPV4_ARP_FLUSH
Yet I can't get the desired result from any of them.
So where should I go from here? Is this a multistep setup or am I missing something minor?
Thanks in advance.