diff --git a/include/NovelecProtocol.h b/include/NovelecProtocol.h
index 7ebd93fd88828df6c70d1ad44db89747e566b4b7..1d4c12c8473793098744dd770461cd3e483d4790 100644
--- a/include/NovelecProtocol.h
+++ b/include/NovelecProtocol.h
@@ -100,8 +100,8 @@ public:
 protected :
 	short _devAdd;								//- novelec active channel address
 	short _novType;								//- novelec type number (1 to 5)
-	short _rangeParameterNum;					//-	command number for the range 
-	std::string _function;						//- the novelec mode
+	short _rangeParameterNum;			//-	command number for the range 
+	std::string _function;				//- the novelec mode
 	
 	//- check if the cmd is understood
 	void check_command	(std::string resp_to_check);
diff --git a/include/TangoGpibLink.h b/include/TangoGpibLink.h
index 1384f0e1e6829d32239676f315c544ed2c53d3d0..9ca083d7b80ad8fea818c2cada67944960d50e60 100644
--- a/include/TangoGpibLink.h
+++ b/include/TangoGpibLink.h
@@ -99,8 +99,6 @@ private :
 	void create_gpib_proxy(void) throw (Tango::DevFailed);
   
 	Tango::DeviceProxyHelper* _gpib_proxy;
-
-	bool _is_gpib_proxy_created;
 	
 	std::string response;
 
diff --git a/src/AbstractElectrometerClass.cpp b/src/AbstractElectrometerClass.cpp
index 960ed64b54408c8d4b186f4e8da86287fe0562cd..fd00e50f1db933b4489fb8bc6fa5afe8b4510cf0 100644
--- a/src/AbstractElectrometerClass.cpp
+++ b/src/AbstractElectrometerClass.cpp
@@ -11,9 +11,14 @@
 //
 // $Author: xavela $
 //
-// $Revision: 1.16 $
+// $Revision: 1.17 $
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.16  2009/03/10 10:28:52  xavela
+// xavier:
+// range values ordered
+// set_range added
+//
 // Revision 1.15  2009/01/19 12:00:25  xavela
 // xavier :
 // - MCCE2 (Novelec part) : methods to change the active channel to communicate with.
@@ -109,13 +114,15 @@
 // AbstractElectrometerClass::AbstractElectrometerClass
 // ============================================================================
 AbstractElectrometerClass::AbstractElectrometerClass (std::string comLink_device_name)
-:	_device_proxy_name(comLink_device_name),
+:	electrometerState(UNKNOWN),
 	_range(0),
 	_rangeStr("NOT INITIALISED"),
 	_mode("NOT INITIALISED"),
+	_device_proxy_name(comLink_device_name),
+	_electrometerProtocol(0),
 	_size(-1),
-	_trigMod(-1),
-	electrometerState(UNKNOWN)
+	_trigMod(-1)
+	
 {
 //	std::cout << "AbstractElectrometerClass::AbstractElectrometerClass <-" << std::endl;
 
@@ -228,7 +235,7 @@ void AbstractElectrometerClass::abort (void)
 // ============================================================================
 // AbstractElectrometerClass::set_knplc
 // ============================================================================
-void AbstractElectrometerClass::set_knplc (float nplcValueStr) 
+void AbstractElectrometerClass::set_knplc (float) 
 {
 	throw electrometer::ElectrometerException("COMMAND_NOT_SUPPORTED", 
 											"This Electrometer does not support this command.",
@@ -256,7 +263,7 @@ void AbstractElectrometerClass::set_triggerMode (short)
 // ============================================================================
 // AbstractElectrometerClass::set_triggercount
 // ============================================================================
-void AbstractElectrometerClass::set_triggercount (short trigCountStr) 
+void AbstractElectrometerClass::set_triggercount (short ) 
 {
 	throw electrometer::ElectrometerException("COMMAND_NOT_SUPPORTED", 
 											"This Electrometer does not support this command.",
@@ -473,7 +480,7 @@ std::string AbstractElectrometerClass::electrometer_status (void)
 // ============================================================================
 // AbstractElectrometerClass::set_buffer_size
 // ============================================================================
-void AbstractElectrometerClass::set_buffer_size (short size) 
+void AbstractElectrometerClass::set_buffer_size (short ) 
 {
   // force read of range on instrument to update _range variable
 	throw electrometer::ElectrometerException("COMMAND_NOT_SUPPORTED", 
diff --git a/src/KeithleyDDCProtocol.cpp b/src/KeithleyDDCProtocol.cpp
index 2091849855ab1390443a5b242f0c02dc7186203b..43204a0c0fd51ca3f1710ba7e54c9f336485a188 100644
--- a/src/KeithleyDDCProtocol.cpp
+++ b/src/KeithleyDDCProtocol.cpp
@@ -340,28 +340,23 @@ std::string dataStr("");
 std::vector<double> argout;
 std::string::size_type posBeg;
 std::string::size_type posEnd;
-short numberOfData = 0;
+
 	//- 
 	posBeg = 0;
 	posEnd = datalist.find(',', posBeg);
-//-DEBUG std::cout << "\t*****::buildDataList -> argin :\n$" << datalist << "$" << std::endl;
+
   //- there is just one value
   if(posEnd == std::string::npos)
   {
 		  argout.push_back( XString<double>::convertFromString(datalist) );
-//-DEBUG std::cout << "\t*****::buildDataList -> JUST ONE DATA :$" << datalist << "$" << std::endl;
   }
   else
   {
-//	  int i = 0;
-    //std::string tmp = get_triggercount();
-//    numberOfData =  XString<short>::convertFromString(get_triggercount());
-
     for(; posEnd != std::string::npos; )
     {
 		  dataStr = datalist.substr(posBeg,posEnd);
 		  argout.push_back( XString<double>::convertFromString(dataStr) );
-//-DEBUG std::cout << "\t*****::buildDataList -> FULL OF DATA : " << i << " -> $" << argout[i] << "$" << std::endl;
+
       posBeg = posEnd+1;
 		  posEnd = datalist.find(',', posBeg);
 
@@ -372,10 +367,8 @@ short numberOfData = 0;
    		  argout.push_back( XString<double>::convertFromString(dataStr) );
         break;
       }
-
     }
   }
-
 	return argout;
 }
 
diff --git a/src/Keithley_485.cpp b/src/Keithley_485.cpp
index bb34279a50bcf1a5380a03a1db4de6af250a34c4..6d53f398d0d7c86657720108da94648988e450be 100644
--- a/src/Keithley_485.cpp
+++ b/src/Keithley_485.cpp
@@ -10,7 +10,6 @@
 //    X. Elattaoui
 //
 // ============================================================================
-static long KEITHLEY_MODEL = 485;
 
 // ============================================================================
 // DEPENDENCIES
diff --git a/src/Keithley_486.cpp b/src/Keithley_486.cpp
index da5dea6b9d4c26ba219e7673422ca105b3169d08..f7a68311fcf75ece05b7238da6bc9f696fc68929 100644
--- a/src/Keithley_486.cpp
+++ b/src/Keithley_486.cpp
@@ -10,7 +10,6 @@
 //    X. Elattaoui
 //
 // ============================================================================
-static long KEITHLEY_MODEL = 486;
 
 // ============================================================================
 // DEPENDENCIES
diff --git a/src/Keithley_487.cpp b/src/Keithley_487.cpp
index 483d2fea9a641aec8f1dd06cedbca635b2ebc6f5..7e7f1fdd2b447e792bc5352f350065da5c7e689e 100644
--- a/src/Keithley_487.cpp
+++ b/src/Keithley_487.cpp
@@ -10,7 +10,6 @@
 //    X. Elattaoui
 //
 // ============================================================================
-static long KEITHLEY_MODEL = 487;
 
 // ============================================================================
 // DEPENDENCIES
diff --git a/src/Keithley_617.cpp b/src/Keithley_617.cpp
index 2d91a260584c27edea165ac95be0c18159bf6494..8ee8b25ec83b2b3890218ccd55ff3b868a8d488c 100644
--- a/src/Keithley_617.cpp
+++ b/src/Keithley_617.cpp
@@ -10,7 +10,6 @@
 //    X. Elattaoui
 //
 // ============================================================================
-static long KEITHLEY_MODEL = 617;
 
 // ============================================================================
 // DEPENDENCIES
@@ -136,7 +135,7 @@ std::string Keithley_617::get_ElectroMeterRange (void)
 // ============================================================================
 // Keithley_617::set_buffer_size()
 // ============================================================================
-void Keithley_617::set_buffer_size (short cmd) 
+void Keithley_617::set_buffer_size (short ) 
 {
 
 		throw electrometer::ElectrometerException("COMMAND_NOT_SUPPORTED", 
diff --git a/src/Keithley_6485.cpp b/src/Keithley_6485.cpp
index a8ced38a5d8c0156866f9e2e2598a11a02721bad..6c4331d947e5d98daff82c661e73382fc49cf66d 100644
--- a/src/Keithley_6485.cpp
+++ b/src/Keithley_6485.cpp
@@ -10,7 +10,6 @@
 //    X. Elattaoui
 //
 // ============================================================================
-static long KEITHLEY_MODEL = 6485;
 
 // ============================================================================
 // DEPENDENCIES
diff --git a/src/Keithley_6487.cpp b/src/Keithley_6487.cpp
index 656f22691a5d8e5314da19949f65092c703a4079..b9ee2b919ab93be26ec5610284fc5987b4c22ee4 100644
--- a/src/Keithley_6487.cpp
+++ b/src/Keithley_6487.cpp
@@ -10,7 +10,6 @@
 //    X. Elattaoui
 //
 // ============================================================================
-static long KEITHLEY_MODEL = 6487;
 
 // ============================================================================
 // DEPENDENCIES
diff --git a/src/Keithley_6512.cpp b/src/Keithley_6512.cpp
index 8ae2737288d74abb7eef855aad1c7fdf5606e31c..8307f0d302f1668cd5047983aff09651923abef5 100644
--- a/src/Keithley_6512.cpp
+++ b/src/Keithley_6512.cpp
@@ -10,7 +10,6 @@
 //    X. Elattaoui
 //
 // ============================================================================
-static long KEITHLEY_MODEL = 6512;
 
 // ============================================================================
 // DEPENDENCIES
diff --git a/src/Keithley_6514.cpp b/src/Keithley_6514.cpp
index fd17f290d0dc4fe743d696aa484275b35195e362..19dc4b737221ef29b047f4c6adcf8a234a34690a 100644
--- a/src/Keithley_6514.cpp
+++ b/src/Keithley_6514.cpp
@@ -10,7 +10,6 @@
 //    X. Elattaoui
 //
 // ============================================================================
-static long KEITHLEY_MODEL = 6514;
 
 // ============================================================================
 // DEPENDENCIES
diff --git a/src/Keithley_6517.cpp b/src/Keithley_6517.cpp
index b5ea7d40ea20d53f82327f69044c55bb535491a6..3e012c509cb7df1a29993006de2d54337a95662f 100644
--- a/src/Keithley_6517.cpp
+++ b/src/Keithley_6517.cpp
@@ -10,7 +10,6 @@
 //    X. Elattaoui
 //
 // ============================================================================
-static long KEITHLEY_MODEL = 6517;
 
 // ============================================================================
 // DEPENDENCIES
@@ -403,7 +402,6 @@ std::stringstream cmd_to_send;
 
   if(numPLC <= 0 || numPLC > 10.0)
 	{
-//    std::cout << "Keithley_6517::set_knplc -> " << numPLC << std::endl;
 		throw electrometer::ElectrometerException("OUT_OF_RANGE", 
 												"Invalid number of PLC.\n Please enter a value in the range 0.01 to 10.0.",
 												"Keithley_6517::set_knplc( ).");
diff --git a/src/Makefile.linux b/src/Makefile.linux
index ac6210465e5536f2d7a20373b805e57120c8f0a3..cdcb730606c788d454beeef29cc218bf67603fd6 100644
--- a/src/Makefile.linux
+++ b/src/Makefile.linux
@@ -6,9 +6,13 @@
 #
 # $Author: xavela $
 #
-# $Revision: 1.5 $
+# $Revision: 1.6 $
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.5  2008/04/16 08:40:32  xavela
+# xavier :
+# lib compiled on Linux platform
+#
 # Revision 1.4  2008/02/15 10:17:57  xavela
 # xavier :
 # - command abort added for SCPI Keithleys
@@ -52,7 +56,7 @@
 #		 of a library with no Tango dependencies)
 #
 OUTPUT_TYPE = STATIC_LIB
-#RELEASE_TYPE = DEBUG
+RELEASE_TYPE = RELEASE
 #=============================================================================
 # OUTPUT_DIR  is the directory which contains the build result.
 # if not set, the standard location is :
diff --git a/src/NovelecProtocol.cpp b/src/NovelecProtocol.cpp
index 9d29ac3b2112f5d4bdf85d5152072501bfa5a246..ddd38989da49b61ff96fc6a0d07095e798a3ad7a 100644
--- a/src/NovelecProtocol.cpp
+++ b/src/NovelecProtocol.cpp
@@ -33,7 +33,7 @@ static const short	RANGE_CMD_NUM		= 8;
 static const short	RESPONSE_LGTH_CMD_NUM = 17;
 static const short	CLEAR_ERRORS_CMD_NUM  = 18;
 //- the specific new line character
-static const char	END_OF_LINE[] = {13, 10, 0};
+static const string	END_OF_LINE = "\r\n";
 //- modes allowed
 static const std::string mode_str[]		= {"ERR : UNKNOWN MODE","ZERO V/F","OFFSET","LEAKAGE","TEST","MEASURE"};
 static const std::string range_str[5][8]= {	{"1e-11AcC","3e-11AcC","1e-10AcC","3e-10AcC", "OUT OF RANGE","OUT OF RANGE","OUT OF RANGE","OUT OF RANGE"},
@@ -52,13 +52,14 @@ static const std::string gain_str[]		= {"1","10","100"};
 NovelecProtocol::NovelecProtocol (std::string& serial_device_name, short devAddress, short novelecType)
 :	ElectrometerProtocol(),
 	_devAdd(devAddress),
-	_novType(novelecType),
-	_is_measure_mode_on(false)
+	_novType(novelecType)
 {
 
 	_communication_link = new TangoSerialLink (serial_device_name);
 	_rangeParameterNum	= _novType + 2;
-
+	_function = "Not updated";
+	_is_measure_mode_on = false;
+	_is_explicite_resp_enabled = false;
 }
 
 // ============================================================================
@@ -69,24 +70,21 @@ void NovelecProtocol::init_MCCE2_for_communication(void)
 std::stringstream explicite_resp;
 std::string tmp("no data");
 
-	std::cout << "NovelecProtocol::init_MCCE2_for_communication(void) -> ENTERING ... ADDRESS = " << this->_devAdd << std::endl;
 	//- CMD to enable PROG cmds
 	this->switch_MCCE2_OFF();  //- this command is now called in the MCCE2 device !
-	std::cout << "NovelecProtocol::switch_MCCE2_OFF() -> DONE !!!" << std::endl;
 
 	//- Clear error registers
 	this->clear_registers();
-	std::cout << "NovelecProtocol::clear_registers() -> DONE !!!" << std::endl;
 
 	//- send cmd to have an explicite response :
 	explicite_resp << _devAdd << " PROG " << RESPONSE_LGTH_CMD_NUM << " 1" << END_OF_LINE << std::endl;
 	tmp = _communication_link->write_read(explicite_resp.str());
+
 	//- check only the command response
 	check_command(tmp);
+	
 	//- if no error
 	_is_explicite_resp_enabled = true;
-	std::cout << "NovelecProtocol::init_MCCE2_for_communication(void) -> DONE !!!" << std::endl;
-
 }
 
 // ============================================================================
@@ -121,14 +119,14 @@ std::string tmp("no data");
 // ============================================================================
 void NovelecProtocol::switch_MCCE2_OFF (void) 
 {
-std::stringstream toto;
+std::stringstream cmd_to_send;
 std::string tmp("no data");
 
-std::cout << "NovelecProtocol::switch_MCCE2_OFF : _devAdd" << _devAdd << endl;
 	//- send cmd to have a explicite response :
-	toto << _devAdd << " MEASURE 0 " << END_OF_LINE << std::ends;
-std::cout << "\n\n NovelecProtocol::switch_MCCE2_OFF -> CMD = [" << toto.str() << "]" << std::endl;
-	tmp = _communication_link->write_read(toto.str());
+	cmd_to_send << _devAdd << " MEASURE 0 " << END_OF_LINE << std::endl;
+
+	tmp = _communication_link->write_read(cmd_to_send.str());
+
 	//- check only the command response
 	check_command(tmp);
 
@@ -147,6 +145,7 @@ std::string tmp("no data");
 	//- send command to Novelec device
 	cmd_to_send << _devAdd << " READ " << MODE_CMD_NUM << END_OF_LINE << std::endl;
 	tmp = _communication_link->write_read(cmd_to_send.str());
+
 	//- check and extract the response
 	argout = check_and_extract_data(tmp, MODE_CMD_NUM);
 
@@ -364,11 +363,12 @@ std::string NovelecProtocol::get_frequency (void)
 {
 std::stringstream cmd_to_send;
 std::string argout("no data");
-std::string tmp("no data");
+std::string tmp("");
 
 	//- send command to Novelec device
 	cmd_to_send << _devAdd << " READ " << FREQUENCY_CMD_NUM << END_OF_LINE << std::endl;
 	tmp = _communication_link->write_read(cmd_to_send.str());
+	
 	//- check and extract the response
 	argout = check_and_extract_data(tmp, FREQUENCY_CMD_NUM);
 
@@ -637,6 +637,7 @@ std::string cmd_sentStr;
 				*/
 				//- extract char
 				response = response.substr(18,1);
+				
 				//- check what is this char a 'space' or 'letter'
 				if(response.find(" ") != std::string::npos)
 					_is_explicite_resp_enabled = false;
@@ -657,6 +658,5 @@ std::string cmd_sentStr;
 													"Invalid string received from Novelec device.",
 													"NovelecProtocol::check_and_extract_data( ).");
 
-
 	return data;
 }
diff --git a/src/Novelec_MCCE2.cpp b/src/Novelec_MCCE2.cpp
index 482a575fd253d5d47f8346861086ccc13ead9c13..e1809605db1e7796310bf3a1c19fbf0f2cd97644 100644
--- a/src/Novelec_MCCE2.cpp
+++ b/src/Novelec_MCCE2.cpp
@@ -27,8 +27,8 @@
 // ============================================================================
 Novelec_MCCE2::Novelec_MCCE2 (std::string& comLink_device_name, short address, short novTypeNumber)
 :	AbstractElectrometerClass(comLink_device_name),
-	_MCCE2electroTypeNumber(novTypeNumber),
-	_rangeLimit(0)
+	_rangeLimit(0),
+	_MCCE2electroTypeNumber(novTypeNumber)
 {
 	//std::cout << "Novelec_MCCE2::Novelec_MCCE2 <-" << std::endl;
 
diff --git a/src/TangoGpibLink.cpp b/src/TangoGpibLink.cpp
index e4041f7074ea73f60a1eb6bde8d09c3dcc2b9063..6e87b93b6b9d0f0196112dcaf5be60a70d882b17 100644
--- a/src/TangoGpibLink.cpp
+++ b/src/TangoGpibLink.cpp
@@ -24,8 +24,7 @@
 // ============================================================================
 TangoGpibLink::TangoGpibLink (std::string& gpib_device_name) 
 :	CommunicationLink(gpib_device_name),
-_gpib_proxy (0),
-_is_gpib_proxy_created (false)
+_gpib_proxy (0)
 {
 	std::cout << "TangoGpibLink::TangoGpibLink <-" << std::endl;
 	
@@ -41,11 +40,10 @@ TangoGpibLink::~TangoGpibLink (void)
 {
 	std::cout << "TangoGpibLink::~TangoGpibLink <-" << std::endl;
 	
-	if(_is_gpib_proxy_created)
+	if(_gpib_proxy)
 	{
 		delete _gpib_proxy;
 		_gpib_proxy = 0;
-		_is_gpib_proxy_created = false;
 	}
 	
 	std::cout << "TangoGpibLink::~TangoGpibLink ->" << std::endl;
@@ -63,19 +61,16 @@ void TangoGpibLink::create_gpib_proxy (void)  throw (Tango::DevFailed)
 	{
 		//- try
 		this->_gpib_proxy = new Tango::DeviceProxyHelper(_communication_Device_name);
-		_is_gpib_proxy_created = true;
 	}
 	catch(Tango::DevFailed& df )
 	{
 		description = "Unable to create proxy on : " + _communication_Device_name;
-		_is_gpib_proxy_created = false;
 		
 		Tango::Except::re_throw_exception (df,
 			(const char*)"COMMUNICATION_ERROR",
 			description.c_str(),
 			(const char*)"TangoGpibLink::create_gpib_proxy");
-	}
-	
+	}	
 }
 
 
@@ -86,7 +81,7 @@ void TangoGpibLink::write (std::string command_to_send)  throw (Tango::DevFailed
 {
   std::string description("");
 	
-	if(!_is_gpib_proxy_created)
+	if(!_gpib_proxy)
 		create_gpib_proxy();
 	
 	try
@@ -113,7 +108,7 @@ void TangoGpibLink::write (std::string command_to_send)  throw (Tango::DevFailed
 std::string TangoGpibLink::read (void) throw (Tango::DevFailed)
 {
 	
-	if(!_is_gpib_proxy_created)
+	if(!_gpib_proxy)
 		create_gpib_proxy();
 	
 	try
@@ -130,7 +125,6 @@ std::string TangoGpibLink::read (void) throw (Tango::DevFailed)
 	}
 	
 	return this->response ;
-
 }
 
 // ============================================================================
@@ -140,15 +134,13 @@ std::string TangoGpibLink::write_read (std::string command_to_send) throw (Tango
 {
   std::string description("");
 	
-	if(!_is_gpib_proxy_created)
+	if(!_gpib_proxy)
 		create_gpib_proxy();
 	
 	try
 	{
 		//- try
-		this->_gpib_proxy->command_inout("WriteRead",  command_to_send, response);
-		return this->response;
-		
+		this->_gpib_proxy->command_inout("WriteRead",  command_to_send, response);		
 	}
 	catch(Tango::DevFailed& df )
 	{
@@ -157,10 +149,9 @@ std::string TangoGpibLink::write_read (std::string command_to_send) throw (Tango
 		Tango::Except::re_throw_exception (df,
 			(const char*)"COMMUNICATION_ERROR",
 			description.c_str(),
-			(const char*)"TangoGpibLink::write_read");
-		
+			(const char*)"TangoGpibLink::write_read");		
 	}
-	
+	return this->response;
 }
 
 // ============================================================================
@@ -171,15 +162,13 @@ bool TangoGpibLink::SRQLineState (void) throw (Tango::DevFailed)
   std::string description("");
   bool result = false;
 	
-	if(!_is_gpib_proxy_created)
+	if(!_gpib_proxy)
 		create_gpib_proxy();
 	
 	try
 	{
 		//- try
-		this->_gpib_proxy->command_out("IsSRQLineUP",  result);
-		return result;
-		
+		this->_gpib_proxy->command_out("IsSRQLineUP",  result);	
 	}
 	catch(Tango::DevFailed& df )
 	{
@@ -191,7 +180,8 @@ bool TangoGpibLink::SRQLineState (void) throw (Tango::DevFailed)
 			(const char*)"TangoGpibLink::SRQLineState");
 		
 	}
-	
+
+	return result;
 }
 
 // ============================================================================
@@ -202,15 +192,13 @@ short TangoGpibLink::readStatusByteRegister (void) throw (Tango::DevFailed)
   std::string description("");
   short result = -1;
 	
-	if(!_is_gpib_proxy_created)
+	if(!_gpib_proxy)
 		create_gpib_proxy();
 	
 	try
 	{
 		//- try
 		this->_gpib_proxy->read_attribute("statusByteRegister",  result);
-		return result;
-		
 	}
 	catch(Tango::DevFailed& df )
 	{
@@ -221,8 +209,8 @@ short TangoGpibLink::readStatusByteRegister (void) throw (Tango::DevFailed)
 			description.c_str(),
 			(const char*)"TangoGpibLink::readStatusByteRegister");
 		
-	}
-	
+	}	
+	return result;
 }
 
 // ============================================================================
@@ -232,7 +220,7 @@ void TangoGpibLink::clear (void) throw (Tango::DevFailed)
 {
   std::string description("");
 	
-	if(!_is_gpib_proxy_created)
+	if(!_gpib_proxy)
 		create_gpib_proxy();
 	
 	try
@@ -247,10 +235,8 @@ void TangoGpibLink::clear (void) throw (Tango::DevFailed)
 		Tango::Except::re_throw_exception (df,
 			(const char*)"COMMUNICATION_ERROR",
 			description.c_str(),
-			(const char*)"TangoGpibLink::clear");
-		
-	}
-	
+			(const char*)"TangoGpibLink::clear");		
+	}	
 }
 
 // ============================================================================
@@ -260,7 +246,7 @@ void TangoGpibLink::trigger (void) throw (Tango::DevFailed)
 {
   std::string description("");
 	
-	if(!_is_gpib_proxy_created)
+	if(!_gpib_proxy)
 		create_gpib_proxy();
 	
 	try
@@ -276,8 +262,6 @@ void TangoGpibLink::trigger (void) throw (Tango::DevFailed)
 			(const char*)"COMMUNICATION_ERROR",
 			description.c_str(),
 			(const char*)"TangoGpibLink::clear");
-		
 	}
-	
 }
 
diff --git a/src/TangoSerialLink.cpp b/src/TangoSerialLink.cpp
index 472505bc3cabc1a2d0887e549eb0ebfd5e9a143c..c745657c194b71a28ef00adfaa51c6621cab5294 100644
--- a/src/TangoSerialLink.cpp
+++ b/src/TangoSerialLink.cpp
@@ -44,7 +44,7 @@ TangoSerialLink::~TangoSerialLink (void)
 {
 	//std::cout << "TangoSerialLink::~TangoSerialLink <-" << std::endl;
 
-	if(_is_serial_proxy_created)
+	if(_serial_proxy)
 	{
 		delete _serial_proxy;
 		_serial_proxy = 0;
@@ -66,13 +66,14 @@ void TangoSerialLink::create_serial_proxy (void)  throw (Tango::DevFailed)
 	{
 		//- try
 		this->_serial_proxy = new Tango::DeviceProxyHelper(_communication_Device_name);
+		(*_serial_proxy)->ping();
 		_is_serial_proxy_created = true;
 	}
 	catch(Tango::DevFailed& df )
 	{
 		description = "Unable to create proxy on : " + _communication_Device_name;
 		_is_serial_proxy_created = false;
-
+		this->_serial_proxy = 0;
 		Tango::Except::re_throw_exception (df,
 										(const char*)"COMMUNICATION_ERROR",
 										description.c_str(),
@@ -88,7 +89,7 @@ void TangoSerialLink::write (std::string command_to_send)  throw (Tango::DevFail
 {
   std::string description("");
 
-	if(!_is_serial_proxy_created)
+	if(!_serial_proxy)
 		create_serial_proxy();
 
 	try
@@ -115,7 +116,7 @@ void TangoSerialLink::write (std::string command_to_send)  throw (Tango::DevFail
 std::string TangoSerialLink::read (void) throw (Tango::DevFailed)
 {
 
-	if(!_is_serial_proxy_created)
+	if(!_serial_proxy)
 		create_serial_proxy();
 
 	try
@@ -140,17 +141,22 @@ std::string TangoSerialLink::read (void) throw (Tango::DevFailed)
 // ============================================================================
 std::string TangoSerialLink::write_read (std::string command_to_send) throw (Tango::DevFailed)
 {
+	if(!_serial_proxy)
+		create_serial_proxy();
+
 	std::string respTmp("");
-	
-//	long nb_char_written = 0;
+	long flush_in_out = 2;
+
+	//- Flush buffers ( In & Out = 2 )
+	_serial_proxy->command_in("DevSerFlush", flush_in_out);
 
 	omni_thread::sleep(0, 200000000); //200 milliseconds
 	write(command_to_send);
+
 	//- sleep a little bit to let the adapter(RS232/485) to switch mode
 	omni_thread::sleep(0, 100000000); //100 milliseconds
+	
 	// now read response from HW 
-	respTmp = this->read();
-
-	return respTmp;
+	return this->read();
 }