def get_camera_serial_and_firmware(console_text):
    """
    Scraps console text for serial and firmware information of all connected realsense devices.

    Args:
        console_text (str): input console text contaning all connected device information

    Returns:
        Array[dic]: Array item for each connect devices.  
    """

    camera_data = []
    for line in console_text.split("\n"):
        if "serial" in line and "firmware" in line:
            serial_num = None
            firmware_num = None
            for item in line.split(","):
                if "serial" in item and "update" not in item:  # there are two items which have the word serial in them
                    serial_num = item.split(" ")[-1]
                elif "firmware" in item:
                    firmware_num = item.split(" ")[-1]
            camera_data.append(
                {"serial": serial_num, "firmware": firmware_num})

    return camera_data