Trouble reading input from serial

currently I am trying to read two inputs from the serial monitor using the sscanf function. However, i cannot get the function to return the values that it should be finding

#include <stdio.h>

// pins for the LEDs:



void setup() {
  // initialize serial:
  Serial.begin(9600);
  Serial.print("setup working");
  Serial.print("\n"); 


}
char *device, *input;
void loop() {
  while (Serial.available() > 0) {

    // look for the next valid integer in the incoming serial stream:
    String value = Serial.readString();
    Serial.print("value: "); 
    Serial.print(value);
    Serial.print("\n");    
    
    int buffer_len = value.length() + 1;
    Serial.print("buffer_len: "); 
    Serial.print(buffer_len);
    Serial.print("\n");
 
    char buffer[buffer_len];
    Serial.print("buffer: "); 
    Serial.print(buffer); 
    Serial.print("\n"); 
    
    value.toCharArray(buffer, buffer_len);
    Serial.print("buffer 2: "); 
    Serial.print(buffer);
    Serial.print("\n"); 
     
    sscanf(buffer, "%s : %s", device, input);
    Serial.print(device);
    Serial.print("a\n");
     
    Serial.print(input); 
    Serial.print("b\n"); 

  }
}

I am trying to find the output variables: device, and input. however, I cannot find these values

Are we supposed to guess what the test data are and the results you hope to get, or do you think it might be a good idea to give those to us?

'device' and 'input' are pointers pointing to nowhere (NULL, 0). You need to use arrays for each that can hold the device data plus terminating nul character and the input data plus terminating nul character.

E.g

// one character device identifier plus nul character
// e.g. 0..9
char device[2];
// three character input plus nul character
// e.g. 0..255
char input[4];

I further suggest that you read Serial Input Basics - updated to get rid of the blocking nature of readString(). Your code currently introduces a delay of one second.

The above link will also free you of the use of String (capital S).