On the 3220SF side, I'd like to receive the network name that the mobile client is sending via SimpleLinkNetworkUtil.m setDeviceNameFromUrl function.
I have an iOS application that it using the Out of Box provisioning and the AWS Iot SDK integrated and I'd like to either use the above name being set to the device, but not sure what API or code on the C side to look at receiving that function coming in from the endpoint.
Here's some of the code from the mobile app..
+ (void)setDeviceNameFromUrl:(NSString*)baseUrl Name:(NSString*)newName ProductVersion:(Product_Version)version WithCompletion:(void (^)(NSString * errorMsg))handler {
switch (version) {
case Product_Version_Unkown:
handler(@"Failed to get the version of the simple link device");
return;
case Product_Version_R1:
baseUrl = [baseUrl stringByAppendingString:@"/mode_config"];
break;
case Product_Version_R2:
baseUrl = [baseUrl stringByAppendingString:@"/api/1/netapp/set_urn"];
break;
}
NSDictionary * params = @{@"__SL_P_S.B" : newName};
Basically, what I'd like to do is set a Unique enough device name to use on starting up the AWS IoT connection with the unique client identifier that both the mobile application knows and the TI board side knows on connection.
An alternative solution I was thinking is passing an additional param via the following code, but I can't seem to find the C side of this code base. as I searched for references to the following endpoints in the out of box code and didn't fine much.. Maybe this is my lack of understanding that code side. if you can point me to the C side code for this, that will help as well.
+ (void)addProfileFromUrl:(NSString*)baseUrl SSID:(NSString*)ssid Password:(NSString*)password ProductVersion:(Product_Version)version Security:(SecurityType)securityType WithCompletion:(void (^)(NSString * errorMsg))handler {
switch (version) {
case Product_Version_Unkown:
handler(@"Failed to get the version of the simple link device");
return;
case Product_Version_R1:
baseUrl = [baseUrl stringByAppendingString:@"/profiles_add.html"];
break;
case Product_Version_R2:
baseUrl = [baseUrl stringByAppendingString:@"/api/1/wlan/profile_add"];
break;
}