Jump to content

[USB Wifi] Updated Ralink/Mediatek RT2870/ RT2770/ RT3X7X/ RT537X/ RT5572


rodrigocunha
476 posts in this topic

Recommended Posts

22 hours ago, ghost8282 said:

The only way I found with my mediatek RT2870 is to: 

...

Thank you very much for the answer!
How did you delete the snapshot and tag an empty one? I tried to disable authenticated-root, but then booting the system 

mount -uw /

return 
 

mount: / failed with 66

 

Link to comment
Share on other sites

22 hours ago, adamantinum said:

How did you delete the snapshot and tag an empty one?

 

1- Boot into recovery

2- run a terminal:

csrutil disable

3- reboot and boot into recovery again; check if csrutil is disabled:

csrutil status

Disable authenticathed root:

csrutil authenticated-root disable

4- Reboot and boot into recovery again; check if authenticated-root is disabled:

csrutil authenticated-root status

List your disks:

diskutil list

Take note of your Big Sur volume name (NOT the data one): in this example I'm calling it MacOsVolumeName, position disk5s5.

unmount Big Sur volume name:

diskutil umount /Volumes/MacOsVolumeName

Mount Big Sur disk:

diskutil mount disk5s5

Mount Big Sur volume in read/write:

mount -uw /Volumes/MacOsVolumeName

Tag an empty snapshot:

/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs_systemsnapshot -v /Volumes/MacOsVolumeName -r ""

List snapshots on Big Sur disk:

diskutil apfs listSnapshots disk5s5

Delete ALL the snapshots you have by UUID (Replace UUIDHERE with your real UUID); this command may be run several times, one time for each snapshot you have:

diskutil apfs deleteSnapshot disk5s5 -uuid UUIDHERE

These commands are all run from RECOVERY and need several reboots, follow carefully the instructions, otherwise you may have a not bootable system.

 

Now boot into Mac OS (not recovery).

 

Mount / in read and write:

sudo mount -uw /

--------------------------------------------------

Now you can modify system files from terminal (always use sudo)

Edited by ghost8282
typo
Link to comment
Share on other sites

1 hour ago, adamantinum said:

how can I extract from the Installer the needed kext and panes?

Use pkgutil --expand-full:

pkgutil --expand-full /path/to/pkg/to/expand.pkg /path/to/destination/of/extracted/files/Expanded

Note: do not create before folder "Expanded"

Then navigate to /path/to/destination/of/extracted/files/Expanded/ and you will find packageroot.pkg (this is for WIFI-Dlink Catalina-Panel-V2.pkg.zip available here).

Right click on packageroot.pkg and click show contents:

kext is in Payload/WirelessUtility/Driver/Catalina/

pref pane is in Payload/WirelessUtility/Other

wireless utility is in Payload/WirelessUtility/UI

  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...

Hello. I have an RT2870 adapter and I'm using it with macOS Catalina 10.15.6 through the Ralink Panel Utility, but the adapter keeps dropping. Searching on GitHub I realized that, apparently, he is only optimized until Catalina 10.15.4, as chris1111 did not come up with updates anymore. How can I use the adapter in the latest version of the system without facing these problems?

Link to comment
Share on other sites

On 9/19/2020 at 11:45 PM, JemsIslan said:

Hello. I have an RT2870 adapter and I'm using it with macOS Catalina 10.15.6 through the Ralink Panel Utility, but the adapter keeps dropping. Searching on GitHub I realized that, apparently, he is only optimized until Catalina 10.15.4, as chris1111 did not come up with updates anymore. How can I use the adapter in the latest version of the system without facing these problems?

Are you using this?

https://github.com/chris1111/WIFI-Dlink-Catalina-Panel-V2/files/4242866/WIFI-Dlink.Catalina-Panel-V2.pkg.zip

 

This should be the latest, I have a RT2870 too with Catalina 10.15.6 latest and I'm not experiencing disconnections. The only thing (not only in catalina but also in previous os) is that sometimes (once in 20-30?) as soon after the boot the adapter cannot connect and I must reboot the os.

Link to comment
Share on other sites

23 hours ago, ghost8282 said:

Are you using this?

Yes, this is the version I am using. Do you use your adapter on the USB 2.0 or 3.0 port? I suspect you have some influence on that. Anyway, the drops usually happen when I connect the device's bluetooth with my wireless headset.

Link to comment
Share on other sites

14 hours ago, JemsIslan said:

Do you have problems plugging in 3.0?

Just tried for 6 hours with my adapter connected to usb 3.0 (My macos is a qemu vm connected to a passed through inateck pci usb card): no issues.

7 hours ago, JemsIslan said:

did you need to do any other procedure besides installing .pkg on the system? what's your adapter?

Well, to be honest I don't remember how I installed it..Anyway if the pkg doesn't fail to install that's ok, the pkg is only an automated way to copy the kext, the pref pane and the wireless utility.

If it fails (for any reason), extract the files from the package and copy them manually, as explained in previous posts.

However, I would check that all the files are in their position and that the kext is loaded correctly.

My device is Alfa AWUS036NH.

Link to comment
Share on other sites

8 hours ago, ghost8282 said:

Well, to be honest I don't remember how I installed it..Anyway if the pkg doesn't fail to install that's ok, the pkg is only an automated way to copy the kext, the pref pane and the wireless utility.

If it fails (for any reason), extract the files from the package and copy them manually, as explained in previous posts.

However, I would check that all the files are in their position and that the kext is loaded correctly.

My device is Alfa AWUS036NH.

I have already reinstalled the software several times and even then it keeps giving me some connection drops from time to time. My adapter is an Alfa UW06. I'm suspecting that it's some bad EFI configuration or wrong USB mapping. Could you upload your EFI so I can check what's different from mine in this regard? If not, how did you do your USB mapping?

Link to comment
Share on other sites

On 9/26/2020 at 5:18 PM, JemsIslan said:

how did you do your USB mapping?

I have a virtual machine, so I don't think my efi will be very useful.

Anyway, for usb 2.0 I pass the single device through qemu with the ich9-ehci1 model.

For usb 3.0 I'm passing through the pci card, it's a inatek kt4006 with the fresco fl1100 chipset.

For usb/efi related stuff I'm injecting EC device and usb properties (power properties), check SSDT-EC-USBX.dsl for the source code.

Link to comment
Share on other sites

mmm there's a more simple way to make our RT2870 to work with big sur, without messing up with sealing/unsealing.

 

Pro: no need to unseal the os, so no need to seal the os before performing an os update

Cons: wireless pref pane is not working, but this doesn't mean you are not able to connect to a different ssid, not able to scan for available wifi networks :(

 

This applies to opencore bootloader.

 

Steps:

1- mount opencore EFI partition, copy RT2870USBWirelessDriver.kext in the EFI/OC/kext folder, modify config.plist to inject the kext

2- copy D-LinkUtility to applications folder (not the pref pane, not the kext, only the utility)

3- go to ~/Library/Preferences (this is ok, since it's a folder under the control of the user); you need to create 2 files:

a) ActiveProfileSetting.plist with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
	<dict>
		<key>AC Power CAM</key>
		<string>0</string>
		<key>Active Profile Flag</key>
		<string>YES</string>
		<key>Authentication Type</key>
		<string>3</string>
		<key>BSSID</key>
		<string>INPUT HERE THE MAC ADDRESS OF THE SSID, EXAMPLE 001122AABBCC</string>
		<key>Channel</key>
		<string>1</string>
		<key>Encryption Type</key>
		<string>1</string>
		<key>Fragmentation Threshold</key>
		<string>2346</string>
		<key>Hidden</key>
		<string>0</string>
		<key>Network Type</key>
		<string>1</string>
		<key>Power Save Mode</key>
		<string>0</string>
		<key>Preamble Type</key>
		<string>0</string>
		<key>Profile Name</key>
		<string>INPUT HERE THE PROFILE NAME YOU WANT, IT CAN BE THE SAME OF THE SSID NAME</string>
		<key>RTS Threshold</key>
		<string>2347</string>
		<key>SSID</key>
		<string>INPUT HERE THE SSID NAME YOU WANT TO CONNECT TO</string>
		<key>Tx Power</key>
		<string>0</string>
		<key>WEPKey1</key>
		<string></string>
		<key>WEPKey1 Type</key>
		<string>0</string>
		<key>WEPKey2</key>
		<string></string>
		<key>WEPKey2 Type</key>
		<string>0</string>
		<key>WEPKey3</key>
		<string></string>
		<key>WEPKey3 Type</key>
		<string>0</string>
		<key>WEPKey4</key>
		<string></string>
		<key>WEPKey4 Type</key>
		<string>0</string>
		<key>WEPKeyUse</key>
		<string>0</string>
		<key>WPAPSK</key>
		<string>INPUT HERE THE WIFI PASSWORD WPA2</string>
	</dict>
</array>
</plist>

Change all the strings that start with "INPUT HERE..." with your data (the mac address is not so important I think, because even if I input a wrong one, the device connect to the ssid).

The example above applies to a wpa2 access point, which should be the most common, not sure what you have to change to connect to open access point or wep ones, however you can try, description strings in the xml seem quite clear.

BTW, [Ironic mode: ON] thanks dlink and friends to store password in plain text....[Ironic mode: OFF]

 

b) AdvancedProfileSetting.plist with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
	<dict>
		<key>Ad Hoc Mode</key>
		<string>1</string>
		<key>BG Protection</key>
		<string>0</string>
		<key>Tx Burst</key>
		<string>1</string>
		<key>Tx Rate</key>
		<string>0</string>
		<key>Wireless Mode</key>
		<string>9</string>
	</dict>
</array>
</plist>

4- Go to System preferences, users and groups and add applications/D-LinkUtility/MiniTaskUSB-DLinkUtility to automatically startup the utility.

 

This is all it's needed to make wifi working, the kext, the utility and the files that store preferences.

Now on boot the usb wifi will automatically connect to the SSID you set.

Clicking from the top menu on Wireless Preference will do nothing, no wifi panel is installed and the executable (if not patched) points to prefpane in /System folder.

 

To do:

I'm trying to get a working prefpane installed in ~/Library/..: actually the panel is force closing, the same happened with an unsealed os, without the kext in /System/Library/Extensions/; I tried hex patching the executable to change paths but still doesn't work.

 

BTW: [Ironic mode: ON] thank you Apple for the sealed os [Ironic mode: OFF]

Edited by ghost8282
Link to comment
Share on other sites

THIS IS NO MORE VALID

 

Ok, so ladies and gentlement, my daily updates about the RT2870 device and bug sur (I will name it bug on purpose :D).

 

Goal: have a working device with prefpane with all the files installed in the non /System folder.

 

Unluckily the goal is not reached, no luck in patching the wifi prefpane..but..I found a quite good way to have all working.

The following applies to current master version of opencore and it's working with bug sur beta 9.

I have iMacPro1,1 SMBIOS data.

 

We would want a sealed system, we don't want to delete snapshots, we would want SIP enabled and authenticated-root enabled: however this is not possible at the moment, because the utility needs some files copied to the /System directory.

 

What we will achieve by the following is a sealed system with SIP and authenticated-root enabled with a working device with a not working prefpane and a system not booting from the snapshot, but without breaking the seal; so, we can use the sealed system everyday or a system not booting from the snapshot, and in this last case, we will be able to switch to the sealed system in ?less than 5 minutes? instead of reinstalling MacOS to seal the system again.

 

As I wrote in the above post:

1- mount opencore EFI partition, copy RT2870USBWirelessDriver.kext in the EFI/OC/Kexts folder, modify config.plist to inject the kext on boot

2- copy D-LinkUtility to applications folder (not the pref pane, not the kext, only the utility)

3- go to ~/Library/Preferences (this is ok, since it's a folder under the control of the user); you need to create 2 files:

a) ActiveProfileSetting.plist

b) AdvancedProfileSetting.plist

4- Go to System preferences, users and groups and add applications/D-LinkUtility/MiniTaskUSB-DLinkUtility to automatically startup the utility

5- Verify that in the opencore config.plist SecureBootModel is set to "Disabled"

 

If you boot your system you will see that it will boot from the snapshot, SIP and authenticated-root can be enabled and the wifi will work, but not the prefpane.

 

If you want the prefpane:

6- Verify that in the opencore config.plist SecureBootModel is set to "Default" (by changing this the os will not boot from the snapshot!)

7- boot into recovery and disable SIP (csrutil disable) and reboot

8- mount / in read and write (sudo mount -uw /)

9- terminal: copy D-LinkWirelessUtility.prefPane in /System/Library/PreferencePanes/

10- terminal: copy RT2870USBWirelessDriver.kext in /System/Library/Extensions/

11- Assign proper permissions to D-LinkWirelessUtility.prefPane and RT2870USBWirelessDriver.kext (sudo chmod -R 755 and sudo chown -R root:wheel)

12- End: working wifi and working wifi preference pane

 

Now, let's suppose there's an apple update, to update apple wants a sealed system and booting from snapshot (probably also SIP enabled?)

All you have to do is to delete D-LinkWirelessUtility.prefPane and RT2870USBWirelessDriver.kext (not sure if it's a must, anyway delete them since we don't want a not bootable os), mount opencore efi and set back SecureBootModel to "Disabled"; if SIP must be enable for the os update boot into recovery, enable SIP and reboot; since you are now booting from a snapshot you will be able to update the os through the preference pane, you will have a working wifi, but without the pref pane; if you want to have the pref pane back just change SecureBootModel to Default.

 

Booting back from / (no snapshot, SecureBootModel=Default) and you will have again the working wifi prefpane (obviously after an os update you will have to copy again D-LinkWirelessUtility.prefPane and RT2870USBWirelessDriver.kext)

Edited by ghost8282
Link to comment
Share on other sites

  • 2 weeks later...
On 9/30/2020 at 5:09 PM, ghost8282 said:

6- Verify that in the opencore config.plist SecureBootModel is set to "Default" (by changing this the os will not boot from the snapshot!)

This is not possible anymore with beta 10: booting with SecureBootModel=Default returns kernel panic, "not possible to boot from the live fs on a release build". :(

 

Edited by ghost8282
  • Like 1
  • Sad 1
Link to comment
Share on other sites

  • 3 weeks later...
On 10/31/2020 at 3:54 AM, sparten said:

how to make my usb wifi work with mojave ?

 

The product id is 7601
The vendor id is 148F
can I find a help ?

now I used vietnam tool and install the usb wifi but cant launch the vendor or vietnam tool app to connect the wifi with mojave 
any suggestion or helping ?

 

001.png

Screen Shot 2020-11-02 at 2.13.01 AM.png

Link to comment
Share on other sites

  • 2 weeks later...
On 9/30/2020 at 6:09 PM, ghost8282 said:

Ok, so ladies and gentlement, my daily updates about the RT2870 device and bug sur (I will name it bug on purpose :D).

 

Goal: have a working device with prefpane with all the files installed in the non /System folder.

 

Unluckily the goal is not reached, no luck in patching the wifi prefpane..but..I found a quite good way to have all working.

The following applies to current master version of opencore and it's working with bug sur beta 9.

I have iMacPro1,1 SMBIOS data.

 

We would want a sealed system, we don't want to delete snapshots, we would want SIP enabled and authenticated-root enabled: however this is not possible at the moment, because the utility needs some files copied to the /System directory.

 

What we will achieve by the following is a sealed system with SIP and authenticated-root enabled with a working device with a not working prefpane and a system not booting from the snapshot, but without breaking the seal; so, we can use the sealed system everyday or a system not booting from the snapshot, and in this last case, we will be able to switch to the sealed system in ?less than 5 minutes? instead of reinstalling MacOS to seal the system again.

 

As I wrote in the above post:

1- mount opencore EFI partition, copy RT2870USBWirelessDriver.kext in the EFI/OC/Kexts folder, modify config.plist to inject the kext on boot

2- copy D-LinkUtility to applications folder (not the pref pane, not the kext, only the utility)

3- go to ~/Library/Preferences (this is ok, since it's a folder under the control of the user); you need to create 2 files:

a) ActiveProfileSetting.plist

b) AdvancedProfileSetting.plist

4- Go to System preferences, users and groups and add applications/D-LinkUtility/MiniTaskUSB-DLinkUtility to automatically startup the utility

5- Verify that in the opencore config.plist SecureBootModel is set to "Disabled"

 

If you boot your system you will see that it will boot from the snapshot, SIP and authenticated-root can be enabled and the wifi will work, but not the prefpane.

 

If you want the prefpane:

6- Verify that in the opencore config.plist SecureBootModel is set to "Default" (by changing this the os will not boot from the snapshot!)

7- boot into recovery and disable SIP (csrutil disable) and reboot

8- mount / in read and write (sudo mount -uw /)

9- terminal: copy D-LinkWirelessUtility.prefPane in /System/Library/PreferencePanes/

10- terminal: copy RT2870USBWirelessDriver.kext in /System/Library/Extensions/

11- Assign proper permissions to D-LinkWirelessUtility.prefPane and RT2870USBWirelessDriver.kext (sudo chmod -R 755 and sudo chown -R root:wheel)

12- End: working wifi and working wifi preference pane

 

Now, let's suppose there's an apple update, to update apple wants a sealed system and booting from snapshot (probably also SIP enabled?)

All you have to do is to delete D-LinkWirelessUtility.prefPane and RT2870USBWirelessDriver.kext (not sure if it's a must, anyway delete them since we don't want a not bootable os), mount opencore efi and set back SecureBootModel to "Disabled"; if SIP must be enable for the os update boot into recovery, enable SIP and reboot; since you are now booting from a snapshot you will be able to update the os through the preference pane, you will have a working wifi, but without the pref pane; if you want to have the pref pane back just change SecureBootModel to Default.

 

Booting back from / (no snapshot, SecureBootModel=Default) and you will have again the working wifi prefpane (obviously after an os update you will have to copy again D-LinkWirelessUtility.prefPane and RT2870USBWirelessDriver.kext)

 

I am trying to install in big sur can you please attach D-LinkUtility and D-LinkPrefrancese.pan

Edited by eng_redaesm
Link to comment
Share on other sites

On 11/15/2020 at 1:35 AM, chris1111 said:

Not possible because its work only with a snapshot

read some above post

 

What about MT7601 on Big Sur? Will OC kext injection work for RT2870USBWirelessDriver.kext ? Or with clover?

Link to comment
Share on other sites

2 hours ago, RagK said:

Will OC kext injection work for RT2870USBWirelessDriver.kext ?

Yes, the injection works, read some posts above.

On 11/14/2020 at 7:46 PM, eng_redaesm said:

can you please attach D-LinkUtility and D-LinkPrefrancese.pan

Please follow these steps to get files from the original package:
https://www.insanelymac.com/forum/topic/299948-usb-wifi-updated-ralinkmediatek-rt2870-rt2770-rt3x7x-rt537x-rt5572/?do=findComment&amp;comment=2736720

Take into account that now SecureBootModel Default won't allow you anymore to boot from the root disk: the message you quoted is no more valid.

Edited by ghost8282
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...