benbaker76 / Hackintool

The Swiss army knife of vanilla Hackintoshing
MIT License
3.01k stars 243 forks source link

12.3 cann't generated bluetooth reg file #174

Open dgzens opened 2 years ago

dgzens commented 2 years ago

Unable to generate bluetooth .reg file, nothing happens when I click it, and no file is generated on the desktop

tonynesss commented 2 years ago

same problem on 12.3 with the latest hackintool.I don't know if this is the reason. https://github.com/digitalbirdo/BT-LinkkeySync/issues/26#issuecomment-1046894081

benbaker76 commented 2 years ago

Can you please try 3.8.5

tonynesss commented 2 years ago

Can you please try 3.8.5

I just tried to use the latest version. The reg file has been successfully exported, but my Bluetooth mouse still can't work between the two systems. Then I found a csrk parameter in the Bluetooth reg file of windows, but this parameter is not available in the mac, which makes it unusable on windows. Is there a way to import the parameters of reg file in windows into the keychain of mac?IMG_20220319_123019.png

benbaker76 commented 2 years ago

I just tried to use the latest version. The reg file has been successfully exported, but my Bluetooth mouse still can't work between the two systems. Then I found a csrk parameter in the Bluetooth reg file of windows, but this parameter is not available in the mac, which makes it unusable on windows. Is there a way to import the parameters of reg file in windows into the keychain of mac?IMG_20220319_123019.png

I'm trying to figure out where the CSRK, CSRKInbound, InboundSignCounter and OutboundSignCounter values are on macOS. I tried getting this information from an issue reported here but for some reason the user closed it before giving any further info.

So what I need to figure this out is (a) where this data is stored on macOS and (b) how I need to convert it to the format Windows requires in the registry.

I need output from the following Terminal commands: system_profiler -xml -detaillevel full SPBluetoothDataType

Then once you have the device_address run: security find-generic-password -a device_address -s MobileBluetooth -w

Replace device_address with the value output from the first command.

PS Why are you blurring out the values? Are you afraid someone might hack your mouse?

tonynesss commented 2 years ago

I just tried to use the latest version. The reg file has been successfully exported, but my Bluetooth mouse still can't work between the two systems. Then I found a csrk parameter in the Bluetooth reg file of windows, but this parameter is not available in the mac, which makes it unusable on windows. Is there a way to import the parameters of reg file in windows into the keychain of mac?IMG_20220319_123019.png

I'm trying to figure out where the CSRK, CSRKInbound, InboundSignCounter and OutboundSignCounter values are on macOS. I tried getting this information from an issue reported here but for some reason the user closed it before giving any further info.

So what I need to figure this out is (a) where this data is stored on macOS and (b) how I need to convert it to the format Windows requires in the registry.

I need output from the following Terminal commands: system_profiler -xml -detaillevel full SPBluetoothDataType

Then once you have the device_address run: security find-generic-password -a device_address -s MobileBluetooth -w

Replace device_address with the value output from the first command.

Thank you for your reply! However, I regret to tell you that I found that the data about csrk seems to be unique in the windows system by consulting information, Mac does not generate this data when pairing Bluetooth devices. After the successful pairing of the windows system and Bluetooth devices, the data will be useless.If so, there is only one way,that is import Bluetooth address data in reg file into keychain of mac.

tonynesss commented 2 years ago

I just tried to use the latest version. The reg file has been successfully exported, but my Bluetooth mouse still can't work between the two systems. Then I found a csrk parameter in the Bluetooth reg file of windows, but this parameter is not available in the mac, which makes it unusable on windows. Is there a way to import the parameters of reg file in windows into the keychain of mac?IMG_20220319_123019.png

I'm trying to figure out where the CSRK, CSRKInbound, InboundSignCounter and OutboundSignCounter values are on macOS. I tried getting this information from an issue reported here but for some reason the user closed it before giving any further info.

So what I need to figure this out is (a) where this data is stored on macOS and (b) how I need to convert it to the format Windows requires in the registry.

I need output from the following Terminal commands: system_profiler -xml -detaillevel full SPBluetoothDataType

Then once you have the device_address run: security find-generic-password -a device_address -s MobileBluetooth -w

Replace device_address with the value output from the first command.

Thank you for your reply! However, I regret to tell you that I found that the data about csrk seems to be unique in the windows system by consulting information, Mac does not generate this data when pairing Bluetooth devices. After the successful pairing of the windows system and Bluetooth devices, the data will be useless.I'll try again tomorrow.

benbaker76 commented 2 years ago

It might not be unique to Windows. CSRK and CSRKInbound are both 16 byte values so these could be Remote Encryption->Long-term Key and Remote IRK values on macOS.

The InboundSignCounter looks like it can just be set to 0xffffffffffffffff and OutboundSignCounter can be set to 0x00000000.

So I would experiment with trying Remote Encryption->Long-term Key and Remote IRK as the values for CSRK and CSRKInbound. You might also need to reverse the bytes.

dgzens commented 2 years ago

3.8.5 still unable to export reg file :( Now I use the "Keychain access" tool to export data and modify it myself

tonynesss commented 2 years ago

It might not be unique to Windows. CSRK and CSRKInbound are both 16 byte values so these could be Remote Encryption->Long-term Key and Remote IRK values on macOS.

The InboundSignCounter looks like it can just be set to 0xffffffffffffffff and OutboundSignCounter can be set to 0x00000000.

So I would experiment with trying Remote Encryption->Long-term Key and Remote IRK as the values for CSRK and CSRKInbound. You might also need to reverse the bytes.

Ok, after my experiment, it has been confirmed that the parameters about CSRK are useless.I tried to delete the parameters about csrk in the registry in windows system, and found that it did not affect the normal operation of my Bluetooth mouse.

At the same time, I tried to change the address parameters inside, and unexpectedly found that this method was feasible!I found that the address in the reg file generated by hackintool is different from the address in the windows system. Perhaps it is because of this that Bluetooth devices of the two systems cannot be shared.(f4ee2544a7d9 was generated by hacintool.)20220321091726.png20220321091710.png

benbaker76 commented 2 years ago

3.8.5 still unable to export reg file :( Now I use the "Keychain access" tool to export data and modify it myself

Can you please attach the output to these two commands:

system_profiler -xml -detaillevel full SPBluetoothDataType
security find-generic-password -a device_address -s MobileBluetooth -w

Replace device_address with the value output from the first command.

benbaker76 commented 2 years ago

At the same time, I tried to change the address parameters inside, and unexpectedly found that this method was feasible!I found that the address in the reg file generated by hackintool is different from the address in the windows system. Perhaps it is because of this that Bluetooth devices of the two systems cannot be shared.(f4ee2544a7d9 was generated by hacintool.)!

It's strange that the device_address is different between the two. Perhaps these are two different devices? Are you pairing the device correctly in macOS? What is the output of the two commands above?

Have you tried generating the registry file in Hackintool and changing the device_address value to match what Windows is expecting?

tonynesss commented 2 years ago

At the same time, I tried to change the address parameters inside, and unexpectedly found that this method was feasible!I found that the address in the reg file generated by hackintool is different from the address in the windows system. Perhaps it is because of this that Bluetooth devices of the two systems cannot be shared.(f4ee2544a7d9 was generated by hacintool.)!

It's strange that the device_address is different between the two. Perhaps these are two different devices? Are you pairing the device correctly in macOS? What is the output of the two commands above?

Have you tried generating the registry file in Hackintool and changing the device_address value to match what Windows is expecting?

Maybe it's because I reset the device after connecting to the windows system and then connected the Bluetooth device to the mac, which caused the addresses in the two systems to be different. I tried to use the file generated by the first command to get the device_address and then Replace it with the second command. Run the second command. It replied to this prompt. (Bluetooth device is connected and working normally.)mmexport1647879771852.png

benbaker76 commented 2 years ago

Sorry, the correct lines are:

security find-generic-password -a "Public device_address" -s BluetoothLE -w
security find-generic-password -a "Random device_address" -s BluetoothLE -w

Again, replacing device_address as you have above.

elfzweik commented 2 years ago

I met similar problem after upgrading to 12.3. Hackintool does generate the bluetooth.reg. But the information is not complete. I have 6 devices shown in systeminfo. But there are only 4 in bluetooth.reg. I tried the 2 commands you posted upstairs. My Logi M590 mouse was not shown in Bluetooth.reg. I can see this device in system_profiler -xml -detaillevel full SPBluetoothDataType. But sudo security find-generic-password -a EB:F4:EC:26:47:0E -s BluetoothLE -w returns security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.

benbaker76 commented 2 years ago

But sudo security find-generic-password -a EB:F4:EC:26:47:0E -s BluetoothLE -w returns security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.

That command is incorrect. You need the two lines above your post.

elfzweik commented 2 years ago

OK. The commands and responses are as follows.

zhenxuanwang@MacBook-Pro ~ % system_profiler -xml -detaillevel full SPBluetoothDataType
<?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>_SPCommandLineArguments</key>
        <array>
            <string>/usr/sbin/system_profiler</string>
            <string>-nospawn</string>
            <string>-xml</string>
            <string>SPBluetoothDataType</string>
            <string>-detailLevel</string>
            <string>full</string>
        </array>
        <key>_SPCompletionInterval</key>
        <real>0.064069032669067383</real>
        <key>_SPResponseTime</key>
        <real>0.15046799182891846</real>
        <key>_dataType</key>
        <string>SPBluetoothDataType</string>
        <key>_detailLevel</key>
        <integer>-1</integer>
        <key>_items</key>
        <array>
            <dict>
                <key>controller_properties</key>
                <dict>
                    <key>controller_address</key>
                    <string>34:2E:B6:91:8B:26</string>
                    <key>controller_chipset</key>
                    <string>THIRD_PARTY_DONGLE</string>
                    <key>controller_discoverable</key>
                    <string>attrib_off</string>
                    <key>controller_firmwareVersion</key>
                    <string>v256 c256</string>
                    <key>controller_productID</key>
                    <string>0x0001</string>
                    <key>controller_state</key>
                    <string>attrib_on</string>
                    <key>controller_supportedServices</key>
                    <string>0x382039 &lt; HFP AVRCP A2DP HID Braille AACP GATT Serial &gt;</string>
                    <key>controller_transport</key>
                    <string>USB</string>
                    <key>controller_vendorID</key>
                    <string>0x004C (Apple)</string>
                </dict>
                <key>device_connected</key>
                <array>
                    <dict>
                        <key>Keyboard K380</key>
                        <dict>
                            <key>device_address</key>
                            <string>34:88:5D:C6:B2:9C</string>
                            <key>device_firmwareVersion</key>
                            <string>66.0.1</string>
                            <key>device_minorType</key>
                            <string>Keyboard</string>
                            <key>device_productID</key>
                            <string>0xB342</string>
                            <key>device_services</key>
                            <string>0x800020 &lt; HID ACL &gt;</string>
                            <key>device_vendorID</key>
                            <string>0x046D</string>
                        </dict>
                    </dict>
                </array>
                <key>device_not_connected</key>
                <array>
                    <dict>
                        <key>EDIFIER TWS NB2 Pro</key>
                        <dict>
                            <key>device_address</key>
                            <string>60:F4:3A:E4:E7:13</string>
                            <key>device_minorType</key>
                            <string>Headset</string>
                        </dict>
                    </dict>
                    <dict>
                        <key>M585/M590</key>
                        <dict>
                            <key>device_address</key>
                            <string>EB:F4:EC:26:47:0E</string>
                            <key>device_minorType</key>
                            <string>Mouse</string>
                        </dict>
                    </dict>
                    <dict>
                        <key>Microsoft Arc Mouse</key>
                        <dict>
                            <key>device_address</key>
                            <string>E4:AE:44:98:C3:7E</string>
                            <key>device_minorType</key>
                            <string>Mouse</string>
                        </dict>
                    </dict>
                    <dict>
                        <key>MOPS Wireless Speaker</key>
                        <dict>
                            <key>device_address</key>
                            <string>00:00:01:04:1C:4F</string>
                            <key>device_minorType</key>
                            <string>Headset</string>
                        </dict>
                    </dict>
                    <dict>
                        <key>Zhenxuan的 iPad</key>
                        <dict>
                            <key>device_address</key>
                            <string>34:42:62:4A:B5:34</string>
                        </dict>
                    </dict>
                </array>
            </dict>
        </array>
        <key>_name</key>
        <string>SPBluetoothDataType</string>
        <key>_parentDataType</key>
        <string>SPHardwareDataType</string>
        <key>_properties</key>
        <dict>
            <key>_name</key>
            <dict>
                <key>_detailLevel</key>
                <string>-1</string>
                <key>_isColumn</key>
                <string>YES</string>
                <key>_isOutlineColumn</key>
                <string>YES</string>
                <key>_order</key>
                <string>0</string>
            </dict>
            <key>controller_address</key>
            <dict>
                <key>_detailLevel</key>
                <string>0</string>
                <key>_order</key>
                <string>2</string>
            </dict>
            <key>controller_name</key>
            <dict>
                <key>_detailLevel</key>
                <string>1</string>
                <key>_order</key>
                <string>1</string>
            </dict>
            <key>controller_properties</key>
            <dict>
                <key>_detailLevel</key>
                <string>-1</string>
                <key>_order</key>
                <string>1</string>
            </dict>
            <key>controller_state</key>
            <dict>
                <key>_detailLevel</key>
                <string>-1</string>
                <key>_order</key>
                <string>3</string>
            </dict>
            <key>device_address</key>
            <dict>
                <key>_detailLevel</key>
                <string>0</string>
                <key>_order</key>
                <string>1</string>
            </dict>
            <key>device_connected</key>
            <dict>
                <key>_detailLevel</key>
                <string>-1</string>
                <key>_order</key>
                <string>2</string>
            </dict>
            <key>device_productID</key>
            <dict>
                <key>_detailLevel</key>
                <string>0</string>
                <key>_order</key>
                <string>4</string>
            </dict>
            <key>device_vendorID</key>
            <dict>
                <key>_detailLevel</key>
                <string>0</string>
                <key>_order</key>
                <string>3</string>
            </dict>
            <key>devices_list</key>
            <dict>
                <key>_detailLevel</key>
                <string>-1</string>
                <key>_order</key>
                <string>100</string>
            </dict>
            <key>volumes</key>
            <dict>
                <key>_detailLevel</key>
                <string>0</string>
            </dict>
        </dict>
        <key>_timeStamp</key>
        <date>2022-04-06T06:24:09Z</date>
        <key>_versionInfo</key>
        <dict>
            <key>com.apple.SystemProfiler.SPBluetoothReporter</key>
            <string>1</string>
        </dict>
    </dict>
</array>
</plist>
zhenxuanwang@MacBook-Pro ~ % security find-generic-password -a "Public EB:F4:EC:26:47:0E" -s BluetoothLE -w
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
zhenxuanwang@MacBook-Pro ~ % security find-generic-password -a "Random EB:F4:EC:26:47:0E" -s BluetoothLE -w
3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e0a3c21444f435459504520706c697374205055424c494320222d2f2f4170706c652f2f44544420504c49535420312e302f2f454e222022687474703a2f2f7777772e6170706c652e636f6d2f445444732f50726f70657274794c6973742d312e302e647464223e0a3c706c6973742076657273696f6e3d22312e30223e0a3c646963743e0a093c6b65793e52656d6f746520456e6372797074696f6e3c2f6b65793e0a093c646963743e0a09093c6b65793e456e637279707465642044697665727369666965723c2f6b65793e0a09093c646174613e0a090949506b3d0a09093c2f646174613e0a09093c6b65793e4c6f6e672d7465726d204b65793c2f6b65793e0a09093c646174613e0a09092b46396f5849734f316f644e734a63766c46685557773d3d0a09093c2f646174613e0a09093c6b65793e4c6f6e672d7465726d204b6579204c656e6774683c2f6b65793e0a09093c646174613e0a090945413d3d0a09093c2f646174613e0a09093c6b65793e4c6f6e672d7465726d204b657920547970653c2f6b65793e0a09093c646174613e0a090941413d3d0a09093c2f646174613e0a09093c6b65793e52616e646f6d204e756d6265723c2f6b65793e0a09093c646174613e0a0909686631467856374754666f3d0a09093c2f646174613e0a093c2f646963743e0a093c6b65793e52656d6f74652049524b3c2f6b65793e0a093c646174613e0a0942542f632f33714e2f5653473441643744484e7756513d3d0a093c2f646174613e0a3c2f646963743e0a3c2f706c6973743e0a
elfzweik commented 2 years ago

I found the problem. When the bt4.0 device is connected with bluetooth, Hackintool cannot get the info of this device. But the full reg can be generated when the device is not connected.

thelittlefox commented 2 years ago

My mouse works fine both macOS and win11. Export reg file with bluetooth devices disconnected. it's the first choice to sync BLE device between windows and mac.

But keyboard does not work, there is both Local Encryption key and Remote Encryption key in macOS keychain xml. I tried to replace EDVI and ERand in reg file with the value in Local Encryption key. It did not work. Any suggestions? 截屏2022-04-06 09 49 41 截屏2022-04-06 09 51 57

elfzweik commented 2 years ago

I got a Logitech MX Anywhere 3 mouse today. Hackintool has the info of the mouse. But there is no LTK, EDIV, ERAND info. The generated reg info is as follows:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\342eb6918b26\e295d034a29a]
"IRK"=hex:dc,59,26,e5,45,79,8b,cb,47,64,2c,b5,fd,0a,ba,1b
"Address"=hex(b):9a,a2,34,d0,95,e2,00,00
"AddressType"=dword:00000001
"MasterIRKStatus"=dword:00000001
"AuthReq"=dword:0000002d

The 2 commands' return are:

zhenxuanwang@MacBook-Pro ~ % security find-generic-password -a "Public E2:95:D0:34:A2:9A" -s BluetoothLE -w
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
zhenxuanwang@MacBook-Pro ~ % security find-generic-password -a "Random E2:95:D0:34:A2:9A" -s BluetoothLE -w
3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e0a3c21444f435459504520706c697374205055424c494320222d2f2f4170706c652f2f44544420504c49535420312e302f2f454e222022687474703a2f2f7777772e6170706c652e636f6d2f445444732f50726f70657274794c6973742d312e302e647464223e0a3c706c6973742076657273696f6e3d22312e30223e0a3c646963743e0a093c6b65793e4c6f63616c20456e6372797074696f6e3c2f6b65793e0a093c646963743e0a09093c6b65793e4c6f6e672d7465726d204b65793c2f6b65793e0a09093c646174613e0a0909344d79424453515236434c41666757566f6871484a773d3d0a09093c2f646174613e0a09093c6b65793e4c6f6e672d7465726d204b6579204c656e6774683c2f6b65793e0a09093c646174613e0a090945413d3d0a09093c2f646174613e0a09093c6b65793e4c6f6e672d7465726d204b657920547970653c2f6b65793e0a09093c646174613e0a090941673d3d0a09093c2f646174613e0a093c2f646963743e0a093c6b65793e52656d6f74652049524b3c2f6b65793e0a093c646174613e0a0947376f4b2f6255735a45664c69336c4635535a5a33413d3d0a093c2f646174613e0a3c2f646963743e0a3c2f706c6973743e0a

I don't know how to get the parameters from these digits. @headkaze can you help? Thanks.

thelittlefox commented 2 years ago

I got a Logitech MX Anywhere 3 mouse today. Hackintool has the info of the mouse. But there is no LTK, EDIV, ERAND info. The generated reg info is as follows:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\342eb6918b26\e295d034a29a]
"IRK"=hex:dc,59,26,e5,45,79,8b,cb,47,64,2c,b5,fd,0a,ba,1b
"Address"=hex(b):9a,a2,34,d0,95,e2,00,00
"AddressType"=dword:00000001
"MasterIRKStatus"=dword:00000001
"AuthReq"=dword:0000002d

The 2 commands' return are:

zhenxuanwang@MacBook-Pro ~ % security find-generic-password -a "Public E2:95:D0:34:A2:9A" -s BluetoothLE -w
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
zhenxuanwang@MacBook-Pro ~ % security find-generic-password -a "Random E2:95:D0:34:A2:9A" -s BluetoothLE -w
3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e0a3c21444f435459504520706c697374205055424c494320222d2f2f4170706c652f2f44544420504c49535420312e302f2f454e222022687474703a2f2f7777772e6170706c652e636f6d2f445444732f50726f70657274794c6973742d312e302e647464223e0a3c706c6973742076657273696f6e3d22312e30223e0a3c646963743e0a093c6b65793e4c6f63616c20456e6372797074696f6e3c2f6b65793e0a093c646963743e0a09093c6b65793e4c6f6e672d7465726d204b65793c2f6b65793e0a09093c646174613e0a0909344d79424453515236434c41666757566f6871484a773d3d0a09093c2f646174613e0a09093c6b65793e4c6f6e672d7465726d204b6579204c656e6774683c2f6b65793e0a09093c646174613e0a090945413d3d0a09093c2f646174613e0a09093c6b65793e4c6f6e672d7465726d204b657920547970653c2f6b65793e0a09093c646174613e0a090941673d3d0a09093c2f646174613e0a093c2f646963743e0a093c6b65793e52656d6f74652049524b3c2f6b65793e0a093c646174613e0a0947376f4b2f6255735a45664c69336c4635535a5a33413d3d0a093c2f646174613e0a3c2f646963743e0a3c2f706c6973743e0a

I don't know how to get the parameters from these digits. @headkaze can you help? Thanks.

Can you get xml info from keychain? Re-pair mouse under macOS. KeyChain--- Search 'bluetooth'---open the items with recent update time--- show password. Use Command + A to select all the contents, then Command +C ,Comman+V copy and paste it to PlistEdit. To check whether there is LTK, EDIV, ERAND info in keychain indeed. It is weird there is no LTK, EDIV, ERAND info.

elfzweik commented 2 years ago

@thelittlefox Thanks a lot for your help. It is weird again. I found more info in the keychain. However, as shown in the picture: 2022-04-13-3.35.57.png There are only LTK and IRK, no EDIV and ERAND. Comparing IRK and Hackintool generated reg, I reverse the sequence of LTK and input into Windows Registry. The mouse continually connected and disconnected. I believe this is caused by lack of EDIV and ERAND.

elfzweik commented 2 years ago

My mouse works fine both macOS and win11. Export reg file with bluetooth devices disconnected. it's the first choice to sync BLE device between windows and mac.

But keyboard does not work, there is both Local Encryption key and Remote Encryption key in macOS keychain xml. I tried to replace EDVI and ERand in reg file with the value in Local Encryption key. It did not work. Any suggestions? 截屏2022-04-06 09 49 41 截屏2022-04-06 09 51 57

I checked the keychain stored info of my Logitech MX Keys. There is only remote encryption section.

2022-04-13-3.49.40.png

I think you'd better try using remote encryption values, including LTK, EDIV, ERAND and IRK. Make sure in Windows Registry the address of ...\Keys\Devices and...\Keys\hub's address\keyboard address\ are the same. And don't forget to also check whether the address value of ...\Keys\hub's address\keyboard address\Address matches the keyboard address.

thelittlefox commented 2 years ago

@elfzweik I've got my keyboard to work by searching and replacing bluetooth mac address in Windows Registry.
Be careful there is a lot of relevant keys and values. Replace them all.

Local encryption seems useless, i've tried to delete Local Encryption key and the keyboard still works well.

if you can speak Chinese, you can refer to this article. https://bbs.pcbeta.com/viewthread-1800655-1-1.html

elfzweik commented 2 years ago

@thelittlefox Thanks for the info, but unfortunately it does not help. My problem interestingly is that only remoteIRK presents in Keychain. @headkaze Do you know what is the cause of this problem? The result of security find-generic-password -a "Random E2:95:D0:34:A2:9A" -s BluetoothLE -w and what I get from Keychain are shown in my posts above.

benbaker76 commented 2 years ago

The result of security find-generic-password -a "Random E2:95:D0:34:A2:9A" -s BluetoothLE -w and what I get from Keychain are shown in my posts above.

You can use a website like Hex to ASCII Text String Converter to decode the output:

<?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">
<dict>
    <key>Remote Encryption</key>
    <dict>
        <key>Encrypted Diversifier</key>
        <data>
        IPk=
        </data>
        <key>Long-term Key</key>
        <data>
        +F9oXIsO1odNsJcvlFhUWw==
        </data>
        <key>Long-term Key Length</key>
        <data>
        EA==
        </data>
        <key>Long-term Key Type</key>
        <data>
        AA==
        </data>
        <key>Random Number</key>
        <data>
        hf1FxV7GTfo=
        </data>
    </dict>
    <key>Remote IRK</key>
    <data>
    BT/c/3qN/VSG4Ad7DHNwVQ==
    </data>
</dict>
</plist>

Then you can use Base64 to Hex to get the bytes for the \<data>\</data> entries.

elfzweik commented 2 years ago

@headkaze Thanks for the help. The decrypted info is the same as what I get from keychain as per @thelittlefox 's instruction. Now the question is why my MX Anywhere 3 has only IRK and LTK, no EDIV and ERAND. I put IRK and LTK to Windows Registry. The mouse keeping shift between "connected" and "disconnected". The mouse pointer does not move.

thelittlefox commented 2 years ago

BLE devices have two paring methods. One is LE legacy pairing, which may change IRK、 LTK、 ERAND、 EDVI and CSRK values. The other is LE Secure Connections, which changes IRK and CSRK. Maybe your MX Anywhere 3 and bluetooth adaptor both support LE Secure Connections. If you wanna more information, bluetooth core documents may help. BLUETOOTH SPECIFICATION Core_v4.2.pdf

Reference: https://www.cnblogs.com/iini/p/12801242.html https://blog.csdn.net/suxiang198/article/details/48656041 http://www.wowotech.net/bluetooth/le_security_manager.html

elfzweik commented 2 years ago

@thelittlefox Thank you for the help. I read the article and also googled some articles regarding BLE paring, but didn't get any clue how to handle my problem. Now I give up and use the mouse's capability to pair 3 devices. Fortunately it can pair 3 devices, just enough for my Windows, MacOS and Linux.

thelittlefox commented 2 years ago

@elfzweik I ever encounted keybord's keeping shift between "connected" and "disconnected". After replacing all the key and values with new Bluetooth Address in WIndows Registry, keyboard began to work well. Blow progresses may help :

  1. Pairing in windows, windows will store BLE info in Windows Registry with Bluetooth Address A. Check whether windows store ERand, EDVI, IRK and CSRK。If there is only LTK there, I guess it may get close to success.
  2. Paring in macOS, get LTK and Bluetooth Address B and from Keychain.
  3. Fill the corresponding value with new LTK, and repalce all address A with address B in all keys and values.

Or you can try to fill KeyChain info with the LTK and Bluetooth Address in Windows。

lilce083 commented 2 years ago

Hi. Hope anyone can help me. Im pairing my combo ( keyboard and mouse ) device on monterey and win 11. This is Bluetooth LE device Here is my device. Its rii i4 : http://www.riitek.com/product/i4.html I found some problem i can pair magic mouse of both, but can not connect i4 on mac os. When my friend connect his airpod on my mac os, then i can connect my i4, when he disconnect his airpod, i still can connect and use my i4. And when i remove his airpod profile, i will lose connect of i4. I though this problem like my i4 need something from airpod profile, then i4 can connect and use

about pair my i4 with monterey and win 11. I tried get information from xml source of keychain access ( ediv, ltk, rand, irk ). Then edit registry on windows with that information. It did not work

Tried use hackintool 3.8.7 for get bluetooth reg. And i can see this reg file make 2 new keys on registry (cc088d04f4b6 and dca4cad9aea4). But that key not correct with MAC address. Test it and it did not work too

help help help … sos sos

my i4 mac address : 72000012373e 23A710E0-6E5E-43FD-9682-404617376928 9ABD431E-3EFF-4018-A3DA-528083DE2683 54FF8180-FACC-4F35-A138-8082F4E1B655 53DDD02A-B45D-4F91-B3AA-94D0D585FE50

aleixsr commented 1 year ago

@headkaze Thanks for the help. The decrypted info is the same as what I get from keychain as per @thelittlefox 's instruction. Now the question is why my MX Anywhere 3 has only IRK and LTK, no EDIV and ERAND. I put IRK and LTK to Windows Registry. The mouse keeping shift between "connected" and "disconnected". The mouse pointer does not move.

Hello, exact same issue like you. Also I've a MX Anywhere 2 that doesn't face the issue.

Malumen commented 5 hours ago

After a few years, my Windows 10 SSD finally died.

Reinstalled the OS and that means I need to redo my Windows <-> macOS BT keys.

I'm using a Satechi Slim X1 keyboard. Supports BT 5.0 LE, but I am having trouble getting it to connect between macOS and PC.

I've tried several times using hackintool. I can now get macOS Monterey to export a .reg file, and I can use psexec to import the file.

After importing the file, the keyboard still will not work. I can turn off/on bluetooth. I can turn off/on the keyboard. Rebooted the computer. Nothing works to get the keyboard to connect to both systems.

NOTE: in macOS Monterey, the keyboard has a Local and Remote section.

I'm wondering if I can write the info from Windows into Monterey instead of from Monterey into Windows.

Please help if you can.

lilce083 commented 5 hours ago

I had a custom mini keyboard and mouse with the name is i4. This device need bt le for connect. But i hear mac os change the source of bluetooth few years ago. And when they changed. I cant connect anymoreĐược gửi từ iPhone của tôiVào ngày 7 thg 7, 2024, lúc 17:29, Malumen @.***> đã viết: After a few years, my Windows 10 SSD finally died. Reinstalled the OS and that means I need to redo my Windows <-> macOS BT keys. I'm using a Satechi Slim X1 keyboard. Supports BT 5.0 LE, but I am having trouble getting it to connect between macOS and PC. I've tried several times using hackintool. I can now get macOS Monterey to export a .reg file, and I can use psexec to import the file. After importing the file, the keyboard still will not work. I can turn off/on bluetooth. I can turn off/on the keyboard. Rebooted the computer. Nothing works to get the keyboard to connect to both systems. NOTE: in macOS Monterey, the keyboard has a Local and Remote section. I'm wondering if I can write the info from Windows into Monterey instead of from Monterey into Windows. Please help if you can.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

lilce083 commented 5 hours ago

I dont remember when they change bluetooth dev. Maybe catalina or monterey. And when they changed. I dont know only some device like my device cant connect anymore or all of bt le. The truth is i dont know. Back to old version of mac os. When u wanna sync bt keyboard like that. U need to connect ur device to mac os and windows. Get reg key then import reg key to os else ( cant remember 100% but on this topic u can read it ). With support app is hackintool. U can do it. Let try broĐược gửi từ iPhone của tôiVào ngày 7 thg 7, 2024, lúc 17:29, Malumen @.***> đã viết: After a few years, my Windows 10 SSD finally died. Reinstalled the OS and that means I need to redo my Windows <-> macOS BT keys. I'm using a Satechi Slim X1 keyboard. Supports BT 5.0 LE, but I am having trouble getting it to connect between macOS and PC. I've tried several times using hackintool. I can now get macOS Monterey to export a .reg file, and I can use psexec to import the file. After importing the file, the keyboard still will not work. I can turn off/on bluetooth. I can turn off/on the keyboard. Rebooted the computer. Nothing works to get the keyboard to connect to both systems. NOTE: in macOS Monterey, the keyboard has a Local and Remote section. I'm wondering if I can write the info from Windows into Monterey instead of from Monterey into Windows. Please help if you can.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>