             backCamera!.unlockForConfiguration()
             self.getStatus(command)
         } catch LightError.torchUnavailable {
-            self.sendErrorCode(command: command, error: QRScannerError.LIGHT_UNAVAILABLE)
+            self.sendErrorCode(command: command, error: QRScannerError.light_unavailable)
         } catch let error as NSError {
             print(error.localizedDescription)
-            self.sendErrorCode(command: command, error: QRScannerError.UNEXPECTED_ERROR)
+            self.sendErrorCode(command: command, error: QRScannerError.unexpected_error)
         }
     }
 

                metaOutput!.setMetadataObjectsDelegate(self, queue: DispatchQueue.main)
                metaOutput!.metadataObjectTypes = [AVMetadataObjectTypeQRCode]
                captureVideoPreviewLayer = AVCaptureVideoPreviewLayer(session: captureSession)
                cameraView.addPreviewLayer(previewLayer: captureVideoPreviewLayer)
                captureSession!.startRunning()
            }
            return true
        } catch CaptureError.backCameraUnavailable {
            self.sendErrorCode(command: command, error: QRScannerError.BACK_CAMERA_UNAVAILABLE)
        } catch CaptureError.frontCameraUnavailable {
            self.sendErrorCode(command: command, error: QRScannerError.FRONT_CAMERA_UNAVAILABLE)
        } catch CaptureError.couldNotCaptureInput(let error){
            print(error.localizedDescription)
            self.sendErrorCode(command: command, error: QRScannerError.CAMERA_UNAVAILABLE)
        } catch {
            self.sendErrorCode(command: command, error: QRScannerError.UNEXPECTED_ERROR)
        }
        return false
    }

                self.getStatus(command)
            })
        } else {
            self.sendErrorCode(command: command, error: QRScannerError.open_settings_unavailable)
            }
        } else {
        // pre iOS 10.0
