The mission or fence file on the SD card could not be opened
What ArduPilot says:
- PreArm: Failed to open fence storage
- PreArm: Failed to open …
BRD_SD_MISSION or BRD_SD_FENCE is above 0: the mission (file APM/mission.stg) or the fence (APM/fence.stg) is kept on the SD card, with that many kilobytes set aside, instead of in the board's own small storage. At start-up the file could not be opened or created, so the mission or fence shows as empty and arming is refused. Nothing has been erased: ArduPilot does not save the empty state, so that the card can be put right and the board started again. “Failed to open fence storage” comes together with another fence message.
What to do, most likely first
There was no SD card in the slot, or it was not seated, when the board started.
CheckLogs are not being written to the card either.
FixInsert the card with the power off and start again.
The card is full, or its file system is damaged.
CheckPut the card in a computer: can it be read, and is there free space?
FixCopy off what you need, format the card (FAT32) and start the board again.
The setting came with another aircraft's parameters, and this board has no card.
FixSet
BRD_SD_MISSIONandBRD_SD_FENCEto 0 to use the board's own storage, reboot, then upload the mission and the fence again.
Parameters to look at
| Parameter | What it is |
|---|---|
BRD_SD_MISSION | SDCard Mission size |
BRD_SD_FENCE | SDCard Fence size |
The code that sends it
PreArm: Failed to open fence storage
libraries/AP_Arming/AP_Arming.cpp AP_Arming::fence_checks() · Open in ArduPilot Copter-4.7.1
PreArm: Failed to open …
libraries/AP_Arming/AP_Arming.cpp AP_Arming::mission_checks() · Open in ArduPilot Copter-4.7.1