Homebrew [Question] How to Interpret System.getFirmware()?

BringusStudios

Well-Known Member
Member
Joined
Oct 3, 2011
Messages
442
Reaction score
231
Trophies
1
Age
26
Website
bringus.studio
XP
633
Country
United States
I have a LPP app that needs to know your firmware version for something. I ran System.getFirmware(), and it returned 36569088 for a 9.0.0 console... Is there a way to translate the output to a normal firmware version or vice versa, or is there documentation of this somewhere? I've attached an app to output your 'firmware version' below.
 

Attachments

Last edited by BringusStudios, , Reason: added zip
this is the lpp-3ds authors code straight from the library itself:
static int lua_getFW(lua_State *L)
{ int argc = lua_gettop(L);
if (argc != 0) return luaL_error(L, "wrong number of arguments");
u32 fw_id = osGetFirmVersion();
lua_pushinteger(L,GET_VERSION_MAJOR(fw_id));
lua_pushinteger(L,GET_VERSION_MINOR(fw_id));
lua_pushinteger(L,GET_VERSION_REVISION(fw_id));
return 3; }
are you passing something into the function?
cause it seem like you should be doing system.getFirmware(lua_State *L);
and them printing L;

but *disclaimer* I have not used lpp-3ds nor do I know lua. This information was gathered in a short amount of time.
It is still worth trying :-)
 
this is the lpp-3ds authors code straight from the library itself:
static int lua_getFW(lua_State *L)
{ int argc = lua_gettop(L);
if (argc != 0) return luaL_error(L, "wrong number of arguments");
u32 fw_id = osGetFirmVersion();
lua_pushinteger(L,GET_VERSION_MAJOR(fw_id));
lua_pushinteger(L,GET_VERSION_MINOR(fw_id));
lua_pushinteger(L,GET_VERSION_REVISION(fw_id));
return 3; }
are you passing something into the function?
cause it seem like you should be doing system.getFirmware(lua_State *L);
and them printing L;

but *disclaimer* I have not used lpp-3ds nor do I know lua. This information was gathered in a short amount of time.
It is still worth trying :-)
That's very strange, because the documentation says:

u32 System.getFirmware(void) - Returns firmware version.

Sample usage: fw_ver = System.getFirmware()

So I don't think I should be passing anything into it?
 
it says what it does in his post...

Current Revision returns the ID for your firmware without major,minor,revision separation (and getKernel and getFirmware are switched cause an error on old libctru).
The source ones is patched and will come with next release.
 
Current Revision returns the ID for your firmware without major,minor,revision separation (and getKernel and getFirmware are switched cause an error on old libctru).
The source ones is patched and will come with next release.
So it's just a matter of waiting for the next release then?
 
36569088 == 0x022E0000, for the record. That's [02] [2E] [00] [00], or 2.46-0/9.0 FIRM according to the list of kernel versions here. Kernel versions like this are generally only useful for apps that need to be generally compatible with specific FIRM versions, rather than specific service/application versions.
 
36569088 == 0x022E0000, for the record. That's [02] [2E] [00] [00], or 2.46-0/9.0 FIRM according to the list of kernel versions here. Kernel versions like this are generally only useful for apps that need to be generally compatible with specific FIRM versions, rather than specific service/application versions.
Perfect! I'll just write a base 16 to 10 converter into my app, and use that chart to determine the FW version. Thanks a ton!
 
Last edited by BringusStudios,
If you check the firmware in this way, firmlaunch will break it. The best way is to check kernel and cver/nver I think. Yellows8 is checking it this way in his menuhax installer.
 
If you check the firmware in this way, firmlaunch will break it. The best way is to check kernel and cver/nver I think. Yellows8 is checking it this way in his menuhax installer.
Right after I finished the code... crap. What do you mean firmlaunch will break it? What I need to do essentially is determine "if <= 9.2 then true, otherwise false", would that work for various consoles, and give correct results based on what firmware the console is on?
 
It depends on for what you need to check it, to check if you can use libkhax you should check the kernel, if yo need to know which version of a module is installed for example you should check cver and nver.
 
Yes, for this the kernel version needs to be checkt, not the firmware version itself. Also if firmlaunch is active a direct cfw boot without reboot is not possible. So when checking the kernel your application will automaticaly say its not possible to use a cfw, if you use the application in cfws.
 
Yes, for this the kernel version needs to be checkt, not the firmware version itself. Also if firmlaunch is active a direct cfw boot without reboot is not possible. So when checking the kernel your application will automaticaly say its not possible to use a cfw, if you use the application in cfws.
Interesting... Thank's for the help. I'll mess around with it on some different systems for the time being, but If it gets to complicated for me then oh well :wacko:. I guess If you're running a CFW and you run it

EDIT: Yeah, you're right, I tested it on a 9.0.0 with themehax and it said yes, and then tried from a ninjhax .cia from rxTools and it said no. Is there any way to determine if a CFW is currently running on the system (in lpp3ds)?
 
Last edited by BringusStudios,
Interesting... Thank's for the help. I'll mess around with it on some different systems for the time being, but If it gets to complicated for me then oh well :wacko:. I guess If you're running a CFW and you run it

EDIT: Yeah, you're right, I tested it on a 9.0.0 with themehax and it said yes, and then tried from a ninjhax .cia from rxTools and it said no. Is there any way to determine if a CFW is currently running on the system (in lpp3ds)?

You can use System.checkBuild but don't know if R3 ones is good (i recently patched this function also in repository).
 

Site & Scene News

Popular threads in this forum