I am developing with a device that interacts with my mac as a USB drive. When uploading a program, the device will automatically disconnect itself and reset. Because of this, my mac thinks a drive has been forcefully disconnected (without ejecting first), causing it to throw the "Disk not ejected properly" error. How can I avoid this error?

Thank you!

  • 2
    It can't interact as a drive. Either that or on your reset, have it send an unmount command. – Allan Jul 19 '18 at 15:37
  • I am unable to run umount because the drive (which is a DAPLINK drive btw) will do all of the disconnecting and resetting on it's own after it receives a program. – Microbob Jul 19 '18 at 16:01
  • 2
    Then manually unmount the disk (it will still be connected, but not mounted). diskutil unmountDisk diskX where "X" is the identifier of your disk. Then issue the reset. – Allan Jul 19 '18 at 16:04
  • I was really hopeful for that to work, but running the command will make the disk inaccessible (even to cp or mv something in). Is there any other way? If not, is it safe to just ignore the warning? – Microbob Jul 19 '18 at 18:21
  • Why would you attempt to run a file command (cp or mv) on a device after you issue a reset? Do you file ops, unmount, then reset.... Safe? If you're not writing to it, you likely will get away with it but... (standard disclaimer here). I would get with the dev of the device you're using and see what they say. – Allan Jul 19 '18 at 18:48

You must log in to answer this question.

Browse other questions tagged .