Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cpn): Workaround MacOS 13 filesystem type change #2564

Merged
merged 1 commit into from Oct 16, 2022

Conversation

curuvar
Copy link
Contributor

@curuvar curuvar commented Oct 15, 2022

Fixes #

Summary of changes:

On MacOS 13 the EdgeTX companion will not find the radio's SD card. The reason is that the companion app looks for volumes of type "fat", "vfat", or "msdos"; while the latest MacOS mounts the radio with type "lifs".

This fix extends the regular expression to match that type.

@pfeerick pfeerick added enhancement ✨ New feature or request companion Related to the companion software labels Oct 15, 2022
@curuvar
Copy link
Contributor Author

curuvar commented Oct 15, 2022

I just checked and, this problem also exists in the 2.8 release candidate.

@raphaelcoeffic
Copy link
Member

raphaelcoeffic commented Oct 15, 2022

The question here is really: how does it happen? The radio itself does not understand anything else but FAT (various variants, but LiFS does not seems to be one of them).

As a matter of fact, the radio firmware exports the file system as a collection of blocks, which means that the operating system on which Companion is running has raw access to that file system. That does not mean however that the radio firmware will understand it.

EDIT: ok, seems to be just some "other" name it is using for various file systems mounted through some new proxy driver.
https://threedots.ovh/blog/2022/06/quick-look-at-user-mode-file-systems-on-macos-ventura/

@raphaelcoeffic raphaelcoeffic added this to the 2.8 milestone Oct 15, 2022
@curuvar
Copy link
Contributor Author

curuvar commented Oct 15, 2022

The radio reads the card correctly and if I put the radio in USB storage mode connected to a Linux machine the SD card mounts as:

/dev/sda1 on /mnt type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)

If I do the same thing on my Mac the card mounts as:

msdos://disk12s1/RM SD CARD on /Volumes/RM SD CARD (lifs, local, nodev, nosuid, noowners, noatime)

The "msdos:" in the volume name seems to indicate that the Mac recognizes it as a fat volume, but the "lifs" is the file type returned by: QStorageInfo::mountedVolumes().

I suppose this may be a MacOS issue, and I'll report it to Apple, but as the MacOS 13 release is due real-soon-now, it may not get fixed there rapidly even if they see it as a bug.

@raphaelcoeffic
Copy link
Member

Qt will probably provide something, but first in releases 6.x, which would quite leap jump for us.

@curuvar
Copy link
Contributor Author

curuvar commented Oct 15, 2022

Perhaps, but Qt probably just calls getfsent and returns whatever it sets fs_vfstype to.

@pfeerick pfeerick changed the title Fix to find radio on MacOS fix(macos): Workaround MacOS 13 filesystem type change Oct 16, 2022
@pfeerick pfeerick changed the title fix(macos): Workaround MacOS 13 filesystem type change fix(cpn): Workaround MacOS 13 filesystem type change Oct 16, 2022
@pfeerick
Copy link
Member

Thanks for this! Always nice to have fixes in place for stuff that someone else is about to break before it happens ;) Looks like it was reported about two months ago and they've done nothing about it.

@pfeerick pfeerick merged commit b703f9f into EdgeTX:main Oct 16, 2022
@raphaelcoeffic raphaelcoeffic linked an issue Oct 16, 2022 that may be closed by this pull request
christophe-calmejane added a commit to christophe-calmejane/opentx that referenced this pull request Nov 24, 2022
3djc pushed a commit to opentx/opentx that referenced this pull request Dec 20, 2022
shane-droid added a commit to shane-droid/edgetx that referenced this pull request Aug 12, 2023
…icSwitch2-testmergeMain-18oct22

* 'main' of https://github.com/EdgeTX/edgetx: (101 commits)
  feat(color): mix/output bars show '0%' (EdgeTX#2592)
  fix(lua): send EVT_VIRTUAL_EXIT only on short EXIT press (EdgeTX#2573)
  fix(color): Write pending changes to model before duplicate (EdgeTX#2579)
  fix(color): min/max highlighting should depend on mixer channel value (EdgeTX#2582)
  fix(gf): reset global function context if disabled (EdgeTX#2578)
  fix(color): clear spectrum analyser data buffer on init
  fix(color): check `theme` before accessing it
  fix(cpn): Workaround MacOS 13 filesystem type change (EdgeTX#2564)
  chore(adc): store constant structs in FLASH (EdgeTX#2551)
  fix(color): copy/paste inputs/mixers (EdgeTX#2545)
  fix(color): RF power drop-down (EdgeTX#2547)
  fix(color): module setup sub-type after selecting MPM (EdgeTX#2548)
  fix(B&W): `a~x` not being displayed correctly (EdgeTX#2539)
  fix(X10): Simulated page up in menu toolbar (EdgeTX#2543)
  fix: hard coded special characters (EdgeTX#2538)
  feat(color): single press to trigger model select menu (EdgeTX#2533)
  fix(color): shortcut for model select (EdgeTX#2528)
  fix(color): screen / widget setup (EdgeTX#2532)
  fix(NV14/EL18): Reduce LCD pixel clock to 1000000 (EdgeTX#2525)
  fix: clear internal module FIFO after DMA init (EdgeTX#2527)
  ...

# Conflicts:
#	radio/src/fonts/lvgl/lv_font_noto_cn_24.c
#	radio/src/fonts/lvgl/lv_font_noto_tw_24.c
#	radio/src/gui/colorlcd/model_mixes.cpp
#	radio/src/gui/colorlcd/output_edit.cpp
#	radio/src/gui/colorlcd/screen_setup.cpp
#	radio/src/gui/colorlcd/view_about.cpp
#	radio/src/storage/modelslist.cpp
#	radio/src/translations/cn.h
#	radio/src/translations/de.h
#	radio/src/translations/en.h
#	radio/src/translations/se.h
#	radio/src/translations/tw.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
companion Related to the companion software enhancement ✨ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EdgeTX Companion 2.7.1 cannot find SD card on Mac OS.
3 participants