{"action":"created","issue":{"url":"https://api.github.com/repos/opentx/opentx/issues/2154","labels_url":"https://api.github.com/repos/opentx/opentx/issues/2154/labels{/name}","comments_url":"https://api.github.com/repos/opentx/opentx/issues/2154/comments","events_url":"https://api.github.com/repos/opentx/opentx/issues/2154/events","html_url":"https://github.com/opentx/opentx/issues/2154","id":63264662,"number":2154,"title":"File system corruption with fullish large SD card","user":{"login":"jmrware","id":171988,"avatar_url":"https://avatars.githubusercontent.com/u/171988?v=3","gravatar_id":"","url":"https://api.github.com/users/jmrware","html_url":"https://github.com/jmrware","followers_url":"https://api.github.com/users/jmrware/followers","following_url":"https://api.github.com/users/jmrware/following{/other_user}","gists_url":"https://api.github.com/users/jmrware/gists{/gist_id}","starred_url":"https://api.github.com/users/jmrware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmrware/subscriptions","organizations_url":"https://api.github.com/users/jmrware/orgs","repos_url":"https://api.github.com/users/jmrware/repos","events_url":"https://api.github.com/users/jmrware/events{/privacy}","received_events_url":"https://api.github.com/users/jmrware/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-20T17:00:00Z","updated_at":"2015-03-21T03:18:05Z","closed_at":null,"body":"Summary\r\n-------\r\n\r\nWhen a known-good largish SD card (16GB) more than half full is plugged into the Taranis (X9D or X9DP running OTX 2.0.13+), and the Taranis is plugged into a PC, (from bootloader mode), CHKDSK reports many errors on that removable drive (and attempts to read certain files from the drive fail). But take this same SD card and plug it back into the PC using a standard SD card adapter (not the Taranis), then CHKDSK reports zero errors (and all files can be accessed without errors). Note that because of this bug, the files used to fill up the disk must be copied using the external card adapter - attempts to do so when connected via the Taranis won't work.\r\n\r\nBackground\r\n----------\r\n\r\nI'm getting ready to release \"TaraniJuke\", which is a collection of some LUA scripts which implement a rather useful background music player. It works just fine with a 2GB card, but I started noticing some problems when I moved up to a larger SD card (16GB). Once the SD card starts filling up, the Taranis starts experiencing problems accessing the SD card. These problems accessing the card only appear when the SD card is connected to the computer using the Taranis - these problems do not occur when the SD card is connected using a standard SD card adapter. It is unknown if this error manifests under normal operating conditions when the Taranis is not plugged into a computer.\r\n\r\n\r\nHow to reproduce\r\n----------------\r\n\r\nDownload the following ZIP file:\r\n\r\nftp://ftp.xmission.com/pub/users/j/jmr/outgoing/TARANI_FS_BUG_TEST.zip\r\n\r\nMD5: D3D4884F0CA7A1DFF1EC68EA8C42D7C3\r\nSHA-1: E9BE01D7EA6228AE6D8173B8086E8CF988744F1B\r\n\r\nThis zip archive contains 3 files:\r\nDUPWAV.BAT - Batch file to make 1000 copies of WAV file in the SOUNDS\\en folder.\r\nREADME.TXT - Description of how to reproduce the error.\r\nTEST.WAV - A 32-kHz, mono Taranis compatible WAV file that is roughly 10MB in size.\r\n\r\nHere are the contents of the README.TXT file from the archive:\r\n\r\nREADME.TXT\r\n----------\r\n\r\nHow to reproduce the Taranis FatFs bug:\r\n\r\n1. Place a 16GB MicroSD card in an external USB adapter and plug it into a Windows PC. It \r\nwill show up as a removable drive \"X:\" in Windows Explorer (however, the drive letter on \r\nyour system will likely be different from X). Do NOT use the Taranis as the USB adapter at \r\nthis point.\r\n2. Open Windows Explorer and right click on the removable drive X:. Format the SD card as \r\nFAT32 using the default settings (cluster size = 8KB). Do NOT select the \"quick format\" \r\noption.\r\n3. Copy the standard OpenTX files and directories to the SD card. It should look something \r\nlike the following:\r\n    Drive X: Directory tree:  \r\n        +---BMP  \r\n        +---EEPROMS  \r\n        +---FIRMWARES  \r\n        +---LOGS  \r\n        +---MODELS  \r\n        +---SCRIPTS  \r\n        |   +---MODEL01  \r\n        |   +---FUNCTIONS  \r\n        |   +---MIXES  \r\n        |   \\---WIZARD  \r\n        \\---SOUNDS  \r\n            \\---en  \r\n                \\---system  \r\n    (The only mandatory folder to be copied is: SOUNDS\\en)  \r\n4. Copy DUPWAV.BAT and TEST.WAV (from this zip archive) to the root directory of the SD \r\ncard, i.e. \"X:\\\".\r\n5. From Windows Explorer, run X:\\DUPWAV.BAT by double clicking on it. This batch file simply \r\nmakes 1000 copies of the TEST.WAV file (which is 12MB) to the SOUNDS\\en folder giving each \r\ncopy of the file a unique name: _TST0001.WAV, _TST0002.WAV, ... _TST1000.WAV. Note that this \r\nprocess takes a LONG TIME ~1 hour. (Go take a break!)\r\n6. Once the batch file finishes making all the wav file copies, verify that the file system \r\nis A-Ok; Double click on X:\\SOUNDS\\en\\_TST1000.WAV and verify that it plays OK. Open a DOS \r\nCommand Prompt Window and type: \"CHKDSK X:\" (Where \"X\" is the drive letter for the SD card.) \r\nVerify that CHKDSK reports no errors.\r\n7. Dis-mount the SD card by clicking on the \"Safely Remove HArdware\" icon in the system tray \r\n(for WIn XP -  On Win7 and higher, right click the removable drive X; in Explorer and \r\nselect: \"Eject\"). Remove the MicroSD card and insert it into the Taranis SD card slot.\r\n9. Connect the Taranis to the PC by using the 3-finger-salute bootloader method. The SD card \r\nin the Taranis shows up as removable drive \"Y:\"  (But once again, the drive letter on your \r\nsystem will likely be different from Y:). At this point, things should start going wonky.\r\n10. Repeat the tests described in step 6 to test the file system integrity. At this point, \r\nWindows should experience a variety of problems accessing the drive - it will be unable to \r\nplay the later WAV files and will report many errors when running CHKDSK from the command \r\nline. Do NOT modify any of the files on the SD drive.\r\n11. Dismount the Taranis, remove the SD card and remount it using the external adapter. The \r\ncard should once again be A-Ok.\r\n"},"comment":{"url":"https://api.github.com/repos/opentx/opentx/issues/comments/84231235","html_url":"https://github.com/opentx/opentx/issues/2154#issuecomment-84231235","issue_url":"https://api.github.com/repos/opentx/opentx/issues/2154","id":84231235,"user":{"login":"mpjf01","id":6133447,"avatar_url":"https://avatars.githubusercontent.com/u/6133447?v=3","gravatar_id":"","url":"https://api.github.com/users/mpjf01","html_url":"https://github.com/mpjf01","followers_url":"https://api.github.com/users/mpjf01/followers","following_url":"https://api.github.com/users/mpjf01/following{/other_user}","gists_url":"https://api.github.com/users/mpjf01/gists{/gist_id}","starred_url":"https://api.github.com/users/mpjf01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpjf01/subscriptions","organizations_url":"https://api.github.com/users/mpjf01/orgs","repos_url":"https://api.github.com/users/mpjf01/repos","events_url":"https://api.github.com/users/mpjf01/events{/privacy}","received_events_url":"https://api.github.com/users/mpjf01/received_events","type":"User","site_admin":false},"created_at":"2015-03-21T03:18:05Z","updated_at":"2015-03-21T03:18:05Z","body":"From what has been said it seems that the problem does not happen on the 2GB card supplied with the radio. If so, why not just stick with that?"}}