Skip to content

Instantly share code, notes, and snippets.

@SonoSooS
Created July 8, 2016 23:13
Show Gist options
  • Save SonoSooS/c3c2b77e630e0d7824735b2ca44c68e1 to your computer and use it in GitHub Desktop.
Save SonoSooS/c3c2b77e630e0d7824735b2ca44c68e1 to your computer and use it in GitHub Desktop.
Resets the WiFi on the new3DS
#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;
}
Copy link

ghost commented Jul 10, 2016

Awesome stuff!!!! Good for future projects too :)

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