def send_camera_error_messages(server, port1, port2):
    m1 = Message()
    m2 = Message()

    m1.set_date_time()
    m1.set_camera_status(-1)
    m1.set_checksum()

    m2.set_date_time()
    m2.set_camera_status(-1)
    m2.set_checksum()
    logger.info("Message 1 is %s", m1.convert_to_string())
    logger.info("Message 2 is %s", m2.convert_to_string())

    print("Sending m1 to port:" + port1)
    server.sendto(m1.convert_to_string().encode(), ('<broadcast>', int(port1)))
    print("Sending m2 to port:" + port2)
    server.sendto(m2.convert_to_string().encode(), ('<broadcast>', int(port2)))
            #p1 = ( int(image_points[2][0]), int(image_points[2][1]))
            #p2 = ( int(nose_end_point2D[0][0][0]), int(nose_end_point2D[0][0][1]))

            #cv2.line(image, p1, p2, (255,0,0), 2)

            #cv2.imwrite("string.jpg", image)
            #plt.imshow(image)
            #break

        #break
    except Exception as ex:
        print(ex)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break
    m1.set_date_time()
    m1.set_camera_status(1)
    m1.set_checksum()
    m2.set_date_time()
    m2.set_camera_status(1)
    m2.set_checksum()

    if frameId % multiplier == 0:
        cv2.imshow('frame', image)
        count = count + 1
        logger.info("Message 1 is %s", m1.convert_to_string())
        logger.info("Message 2 is %s", m2.convert_to_string())

        print("Sending m1 to port:" + port1)
        server.sendto(m1.convert_to_string().encode(),
                      ('<broadcast>', int(port1)))