docs: function generateConfig (old_config, is_all_yes) {
  
  	var self = this;
  
  	console.log(colors.bold('--------------- Configuration Generator ---------------\n'));
  
  	var questions = [
  		{
  			type: 'input',
  			name: 'deviceName',
  			message: (old_config.deviceName) ? 'deviceName ?' : 'deviceName ? (e.g. rccar-0)',
  			default: old_config.deviceName,
  			validate: function (value) {
  				if (value.match(/^[A-Za-z0-9_\-]+$/)) return true;
  				return 'Available characters for deviceName: A-Z, a-z, 0-9, underscore, hyphen';
  			}
  		},
  		{
  			type: 'input',
  			name: 'deviceType',
  			message: (old_config.deviceType) ? 'deviceType ?' : 'deviceType (e.g. rccar) ?',
  			default: old_config.deviceType,
  			validate: function (value) {
  				if (value.match(/^[A-Za-z0-9_\-]+$/)) return true;
  				return 'Available characters for deviceType: A-Z, a-z, 0-9, underscore, hyphen';
  			}
  		},
  		{
  			type: 'input',
  			name: 'deviceToken',
  			message: (old_config.deviceToken) ? 'deviceToken ?' : 'deviceToken ? (If already generated on server)',
  			default: old_config.deviceToken,
  			validate: function (value) {
  				if (value.length == 0 || value.match(/^[a-zA-Z0-9]+$/)) return true;
  				return 'Your input seems invalid format';
  			}
  		},
  		{
  			type: 'input',
  			name: 'denhubServerHost',
  			message: (old_config.denhubServerHost) ? 'denhubServerHost ?' : 'denhubServerHost ? (e.g. wss://example.com/)',
  			default: old_config.denhubServerHost,
  			validate: function (value) {
  				if (value.match(/^(ws|wss):\/\/[a-zA-Z0-9_\-\.\:]+\/*$/)) return true;
  				return 'Your input seems invalid format';
  			}
  		}
  
  	];
  
  	// Read the template of commands definition
  	var commands_tmpl = fs.readFileSync(__dirname + '/../templates/' + COMMANDS_FILENAME + '.tmpl').toString();
  
  	// Start the question
  	inquirer.prompt(questions).then(function (answer) {
  
  		// Generate the configuration values
  		if (answer.deviceToken.match(/^\s*$/)) {
  			answer.deviceToken = null;
  		}
  
  		// Clone the configuration object
  		var save_config = JSON.parse(JSON.stringify(old_config || {}));
  		for (var key in answer) {
  			config[key] = answer[key];
  			save_config[key] = answer[key];
  		}
  		if (save_config.commands) {
  			delete save_config.commands;
  		}
  
  		// Preview of the configuration file
  		var formatted_json = JSON.stringify(save_config,  null, '    ');
  		console.log('\n\n' + formatted_json + '\n');
  
  		// To next step
  		var promise = null;
  		if (is_all_yes) {
  			promise = new Promise(function (resolve, reject) {
  				resolve({
  					isSaveConfig: true
  				});
  			});
  		} else {
  			// Confirmation for save the configuration file
  			promise = inquirer.prompt([{
  				type: 'confirm',
  				name: 'isSaveConfig',
  				message: 'The configuration file was generated. Would you write it to ' + CONFIG_FILENAME + ' ?'
  			}]);
  		}
  
  		promise.then(function (answer) {
  
  			if (!answer.isSaveConfig) return false;
  
  			// Save the configuration file
  			console.log('\nWriting to ' + process.cwd() + '/' + CONFIG_FILENAME);
  			fs.writeFileSync(CONFIG_FILENAME, formatted_json);
  			console.log('Writing has been completed.\n\n');
  
  			return true;
  
  		}).then(function (is_wrote) {
  
  			// Check the commands file
  			var commands_file = null;
  			try {
  				commands_file = JSON.parse(fs.readFileSync(COMMANDS_FILENAME));
  			} catch (e) {
  				commands_file = null;
  			}
  
  			if (commands_file != null) {
  				// Skip
  				return {
  					isSaveCommands: false
  				};
  			}
  
  			console.log(commands_tmpl);
  
  			// To skip mode
  			if (is_all_yes) return {isSaveCommands: true};
  
  			// Confirm to user
  			return inquirer.prompt([{
  				type: 'confirm',
  				name: 'isSaveCommands',
  				message: 'The commands file was not found. Would you write the example to ' + COMMANDS_FILENAME + ' ?'
  			}]);
  
  		}).then(function (answer) {
  
  			if (!answer.isSaveCommands) return false;
  
  			// Save the commands file
  			console.log('\nWriting to ' + process.cwd() + '/' + COMMANDS_FILENAME);
  			fs.writeFileSync(COMMANDS_FILENAME, commands_tmpl);
  			console.log('Writing has been completed.\n\n');
  
  			return true;
  
  		}).then(function (is_wrote) {
  
  			// To skip mode
  			if (is_all_yes) return {isGenerateCode: true};
  
  			// Confirmation for continue
  			return inquirer.prompt([{
  				type: 'confirm',
  				name: 'isGenerateCode',
  				message: 'Would you generate the source code now ?'
  			}]);
  
  		}).then(function (answer) {
  
  			if (!answer.isGenerateCode) {
  				console.log(colors.bold.green('\nAll was completed :)'));
  				return;
  			}
  
  			console.log('\n');
  
  			// Generate the source code of the device
  			config.commands = old_config.commands || {};
  			generateCode(config, is_all_yes);
  
  		});
  
  	});
  
  }