Description

u8_set_ident_data() – sets the five characters long identifier of the CAN2SER instance. This can be requested by our communication partner if it is of interest. e.g. to associate the right channels etc. By default this identifier is ‘SERIA’.

Syntax

myExampleSerial.u8_set_ident_data( os_ident );

Parameters

String os_ident – the new identifier (max. 5 characters long string)

Returns

uint8_t – 5: all bytes are copied into the identifier of the CAN2SER channel.

Example Code

The following example sets a new identifier for the CAN2SER instance ‘Serial

void setup()
{  
  // Wait for the PC can2ser-monitor to send handshakes
  while(!Serial) {;}
  Serial.println("Set the channel identifier");
  Serial.println("of the CAN2SER channel 'Serial'");
  // Send out the request
  Serial.u8_set_ident_data("MyC2S");
  // give the PC some time to answer
  delay(100); 
  Serial.println("Now you can find this identifier in the");
  Serial.println("C2S Monitor -> Discover devices");
}
void loop () 
{
}

Notes and Warnings

See also


CAN2SER Class
s_get_peers_ident_data()
u8_request_peers_name_ident()
BOOTLOADER SETTINGS – Library