Smartconfig another spark using a spark

Hi,
I have 2 spark boards. I configure 1 board using my android device. Is it possible to configure another spark board from 1 spark board?

Thanks,
Milind

hello @aryajur,

i don’t think that is possible since Smart Config and the broadcast messages sent out using the App is proprietary to TI and the :spark: core will not be able to load up the .java file and perform a Smart Config.

Hope this helps! :smiley:

Technically speaking, it’s possible. Realistically speaking, you’re better off preparing for the zombie apocalypse.

1 Like

What I am thinking is since it is done through the phone which may just be using the wifi API it should be possible to do it through Spark?

Like I said, it technically could be done, but it’s a very complicated process. There’s a great write-up here that explains how the TI smart config process works. It’s fairly simple to understand (think Morse code), but difficult to implement.

Thanks for the link. Alternatively, if I have a fixed SSID and network key is it possible for Spark to tell the CC3000 about that so that it does not need smart config?

I think it may be possible, but I don’t know enough about the lower-level firmware stuff to confidently confirm it.

Maybe @Bdub, @bko, and/or @peekay123 (or other forum members) can give you a better answer.

@aryajur,

i think this can be done and what Smart Config and USB wifi setup does as well.

Can’t track down the specific user code to do the manual adding of profile.

the USB one is here:

https://github.com/spark/core-firmware/blob/master/src/wifi_credentials_reader.cpp#L67

1 Like

Hi All,

The TI CC3000 driver in core-common-lib/CC3000_Host_Driver/wlan.c has a function wlan_add_profile() that takes a whole bunch of arguments:


//*****************************************************************************
//
//!  wlan_add_profile
//!
//!  @param    ulSecType  WLAN_SEC_UNSEC,WLAN_SEC_WEP,WLAN_SEC_WPA,WLAN_SEC_WPA2
//!  @param    ucSsid    ssid  SSID up to 32 bytes
//!  @param    ulSsidLen ssid length
//!  @param    ucBssid   bssid  6 bytes
//!  @param    ulPriority ulPriority profile priority. Lowest priority:0.
//!			   Important Note: Smartconfig process (in unencrypted mode) 
//!			   stores the profile internally with priority 1, so changing  
//!			   priorities when adding new profiles should be done with extra care
//!  @param    ulPairwiseCipher_Or_TxKeyLen  key length for WEP security
//!  @param    ulGroupCipher_TxKeyIndex  key index
//!  @param    ulKeyMgmt        KEY management 
//!  @param    ucPf_OrKey       security key
//!  @param    ulPassPhraseLen  security key length for WPA\WPA2
//!
//!  @return    On success, index (1-7) of the stored profile is returned.         
//!				On error, -1 is returned.
//!
//!  @brief     When auto start is enabled, the device connects to
//!             station from the profiles table. Up to 7 profiles are supported. 
//!             If several profiles configured the device choose the highest 
//!             priority profile, within each priority group, device will choose 
//!             profile based on security policy, signal strength, etc 
//!             parameters. All the profiles are stored in CC3000 NVMEM.
//!
//!  @sa        wlan_ioctl_del_profile 
//
//*****************************************************************************

#ifndef CC3000_TINY_DRIVER
INT32 wlan_add_profile(UINT32 ulSecType, 
	UINT8* ucSsid,
	UINT32 ulSsidLen, 
	UINT8 *ucBssid,
	UINT32 ulPriority,
	UINT32 ulPairwiseCipher_Or_TxKeyLen,
	UINT32 ulGroupCipher_TxKeyIndex,
	UINT32 ulKeyMgmt,
	UINT8* ucPf_OrKey,
	UINT32 ulPassPhraseLen)

I think eventually this could be wrapped up in a nicer, easier to use package, but right now this is all that is available.

1 Like

Thank you all. I will try to get it to work and post an update when it works.

2 Likes