Skip to content

Instantly share code, notes, and snippets.

@HeySora
Last active June 3, 2024 12:38
Show Gist options
  • Save HeySora/d720554aa5564a7800de8eca45403ef7 to your computer and use it in GitHub Desktop.
Save HeySora/d720554aa5564a7800de8eca45403ef7 to your computer and use it in GitHub Desktop.
WWAN SSDT for ThinkPad T490s (Fibocom L850-GL)
// This SSDT is essentially sending "CAP_EXP+10.w=0052" as well as a RST() call
// in order to switch the Fibocom WWAN card to USB mode.
// This is fully working on my ThinkPad T490s (20NX*), but I cannot guarantee
// that this code will work for you as well. Read below for instructions for other brands.
// There might be issues when going out of sleep mode? I vaguely recall
// having rare issues in these cases. Going in sleep mode and going out fixed it.
// There are probably better ways to do something like this...
// Please note that you need to remove the FCC Lock of your card!
// -HeySora <@HeeySora / heysora.net>
// FOR OTHER BRANDS / OTHER MODELS
// "CAP_EXP+10", on my system, is located at the PCI address "@80", which is 0x50 in hex.
// This is the 0x50 you see in the OperationRegion declaration below.
// In order to find your actual PCI address (which should NOT be different, but just in case...),
// you first need to use Linux, and find your PCI address (e.g.: 0000:3b:00.0) via `lspci`, and
// then execute this command (replacing "0000:3b:00.0" with your own PCI address!)
// setpci -v -s 0000:3b:00.0 "CAP_EXP+10.w"
// On my end, the result is "0000:3b:00.0 (cap 10 @70) @80 = 0142"
// The interesting info, here, is that "@80", being the address of "CAP_EXP+10".
// Convert that value to hexadecimal (80 => 0x50), then put it in the OperationRegion.
DefinitionBlock("", "SSDT", 2, "HeySora", "WWAN", 0)
{
// WWAN card, at least in my own DSDT. Your mileage may vary.
// If yours is different, simply replace all occurences of "RP07"!
External (_SB.PCI0.RP07, DeviceObj)
External (_SB.PCI0.RP07.PXSX._RST, MethodObj)
// OS Is Darwin?
External (OSDW, MethodObj) // 0 Arguments
Scope(_SB.PCI0.RP07)
{
// Dummy OperationRegion + Field, in order to be able to write to the proper byte.
OperationRegion (AAAA, PCI_Config, 0x50, 0x02)
Field (AAAA, AnyAcc, NoLock, Preserve)
{
BBBB, 16,
}
Method (PINI, 0, NotSerialized)
{
// Only act if it is running on macOS.
If (OSDW ())
{
// Set the actual byte
BBBB = 0x52
// Reset the WWAN card, effectively restarting it into USB mode.
\_SB.PCI0.RP07.PXSX._RST ()
}
}
}
}
@karnadii
Copy link

Screen Shot 2024-05-17 at 03 36 44
Screen Shot 2024-05-17 at 03 37 48
Screen Shot 2024-05-17 at 03 51 41

@karnadii
Copy link

@HeySora I was able to convert my l860-gl from dial up to wwan interface, with wwan interface you can see the modem signal and some modem info, here is the kext, if you want to convert your dial up interface to wwan too, you can take a look how I do it using kext https://github.com/karnadii/FibocomModem, you can try add an entry for l850 gl beside the l860 that i already made. I just purchase l850, I'll try your ssdt once it arrive.

instead of dial up, it recognize as wwan now.
Screen Shot 2024-05-18 at 03 29 09
Screen Shot 2024-05-18 at 03 29 26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment