Created
July 8, 2016 23:13
-
-
Save SonoSooS/c3c2b77e630e0d7824735b2ca44c68e1 to your computer and use it in GitHub Desktop.
Resets the WiFi on the new3DS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <3ds.h> | |
int main() | |
{ | |
Handle nwmEXT_handle; | |
aptMainLoop(); | |
if(R_FAILED(srvGetServiceHandle(&nwmEXT_handle, "nwm::EXT"))) return 1; | |
u32* cmdbuf = getThreadCommandBuffer(); | |
cmdbuf[0] = 0x00080040; | |
cmdbuf[1] = 1; | |
if(R_FAILED(svcSendSyncRequest(nwmEXT_handle))) goto ded; | |
svcSleepThread(1000000000ULL); | |
cmdbuf[0] = 0x00080040; | |
cmdbuf[1] = 0; | |
if(R_FAILED(svcSendSyncRequest(nwmEXT_handle))) goto ded; | |
ded: | |
svcCloseHandle(nwmEXT_handle); | |
aptMainLoop(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome stuff!!!! Good for future projects too :)