Homebrew [POC] 3DS Websocket server demo for homebrew utilities

TheCruel

Developer
OP
Banned
Joined
Dec 6, 2013
Messages
1,350
Trophies
2
XP
3,131
Country
United States
Testers needed. This is mainly a proof of concept for developers, but I would like others to test it too so I can better refine it with more browser/system support. Let me know if you have difficulties/bugs.

This technology can allow developers to make applications in web browsers that can interface with the 3DS console. A lot of possibilities.

Demo: http://ws3ds.cruels.net/

Server source: https://github.com/Cruel/websock3ds/
Web source: https://github.com/Cruel/websock3ds/tree/gh-pages



@MarcusD and @zaksabeast I would've pinged you guys about this in discord server, but I think some moralfag banned me.
 
Last edited by TheCruel,

umbjolt

Wild jolteon
Member
Joined
Sep 15, 2016
Messages
558
Trophies
0
Age
27
Location
Magnolia, Fiore
XP
316
Country
Does it just keep giving that over and over or does it eventually work? Because it will occasionally fail, but should keep retrying.

I left it try about 2-3 minutes but suddenly 3ds "console" stopped writing (I don't mean freeze, just it stopped printing new text), and after that, using the IP it works at first try. I've tested about 3 times. The two first times were like that. The third time, it only wrote that "error" text 4 times and stopped printing new text.
 
  • Like
Reactions: TheCruel

TheCruel

Developer
OP
Banned
Joined
Dec 6, 2013
Messages
1,350
Trophies
2
XP
3,131
Country
United States
I left it try about 2-3 minutes but suddenly 3ds "console" stopped writing (I don't mean freeze, just it stopped printing new text), and after that, using the IP it works at first try. I've tested about 3 times. The two first times were like that. The third time, it only wrote that "error" text 4 times and stopped printing new text.
Thanks, that gives me a better idea of what's going on. I think I might know what it is.
 
Last edited by TheCruel,
  • Like
Reactions: umbjolt

shutterbug2000

Cubic NINJHAX!
Member
Joined
Oct 11, 2014
Messages
1,088
Trophies
0
Age
29
XP
4,878
Country
United States
Can this interface with other websocket-based applications? Like, say I wanted to make a 3DS client for, idk, slither.io(just as an example). Would this work for that?
 

TheCruel

Developer
OP
Banned
Joined
Dec 6, 2013
Messages
1,350
Trophies
2
XP
3,131
Country
United States
Can this interface with other websocket-based applications? Like, say I wanted to make a 3DS client for, idk, slither.io(just as an example). Would this work for that?
It currently runs as a websocket server and not a client, but yeah you could use it as a websocket client too with slight changes. I was thinking about making a agar.io client for 3ds, but have other things to do atm.
 

Quantumcat

Dead and alive
Member
Joined
Nov 23, 2014
Messages
15,144
Trophies
0
Location
Canberra, Australia
Website
boot9strap.com
XP
11,119
Country
Australia
If you send text/pictures does it send it to every console that has installed the app? Or is it a unique installation per console somehow?

Edit: After seeing the code, I get it, it runs locally.

Would there be any chance of demonstrating uploading files from the 3DS to the server, and downloading files and saving them to the console's SD card?
 
Last edited by Quantumcat,

TheCruel

Developer
OP
Banned
Joined
Dec 6, 2013
Messages
1,350
Trophies
2
XP
3,131
Country
United States
If you send text/pictures does it send it to every console that has installed the app? Or is it a unique installation per console somehow?
This is only communication between your browser and the 3DS, nothing more. So nothing is stored on another server or going through any other server. The 3DS console is the websocket server and the browser is connecting to it.

My demo is hosted via github pages, so anyone can make their own too. Only problem is that it currently doesn't have SSL support. Or rather, most popular browsers reject self-signed certs over secured websocket, so I didn't bother figuring it out.
 
Last edited by TheCruel,

Quantumcat

Dead and alive
Member
Joined
Nov 23, 2014
Messages
15,144
Trophies
0
Location
Canberra, Australia
Website
boot9strap.com
XP
11,119
Country
Australia
This is only communication between your browser and the 3DS, nothing more. So nothing is stored on another server or going through any other server. The 3DS console is the websocket server and the browser is connecting to it.

My demo is hosted via github pages, so anyone can make their own too. Only problem is that it currently doesn't have SSL support.
Thanks, I was looking at the code, edited my post at the same time you replied :-)

Another edit, I realise no download/upload is possible, because it's javascript, not PHP. Is that right?
 

TheCruel

Developer
OP
Banned
Joined
Dec 6, 2013
Messages
1,350
Trophies
2
XP
3,131
Country
United States
Thanks, I was looking at the code, edited my post at the same time you replied :-)

Another edit, I realise no download/upload is possible, because it's javascript, not PHP. Is that right?
Sure, the code is already there for transferring images. Instead of just copying it to the framebuffer, you could save it to file. Likewise simple for sending from 3DS to browser.

At the moment, any binary data of the right size is considered an image to copy to framebuffer:
https://github.com/Cruel/websock3ds/blob/dcdb2036acb661fe55f13aeb50f92302576fc788/src/main.c#L97

But currently the browser client doesn't do anything with binary data sent to it since the title data the 3DS sends to it atm is a JSON string:
https://github.com/Cruel/websock3ds/blob/aec054c3c08a02d49fb6ad2da6e2122e6f1cd4ac/js/main.js#L33

EDIT: there are some security issues with browsers saving to disk, but it's possible you just need to add a button or something to trigger the saving. Guess it could be useful to show how to do that if anyone wants it.
 
Last edited by TheCruel,

Quantumcat

Dead and alive
Member
Joined
Nov 23, 2014
Messages
15,144
Trophies
0
Location
Canberra, Australia
Website
boot9strap.com
XP
11,119
Country
Australia
Thanks Cruel :-)

I made it into a sort of incredibly crappy chat room just for fun: http://quantumc.at/websoc/
It saves the text sent to a file and displays it in the browser and also sends it to the 3DS. I haven't actually tested it on my 3DS yet as I am in the library with wifi, that requires a sign-on page, so can't connect my 3DS to download the app. If it is broken I'll fix it in a couple of hours when home.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Materia_tofu @ Materia_tofu:
    im not a very bright individual, but we live and we learn
  • SylverReZ @ SylverReZ:
    @Materia_tofu, We do learn a lot from plenty of talented individuals.
  • Materia_tofu @ Materia_tofu:
    this is true! i learned how to make soundfont remixes from a friend back in 2021
    +1
  • BakerMan @ BakerMan:
    Update on my brother: He's home now, tired and hungry, obviously, but other than that, seems to be doing fine.
    +2
  • Veho @ Veho:
    That's a relief to hear. Do you know what happened?
  • SylverReZ @ SylverReZ:
    @BakerMan, Any idea what happened? I hope that your brother's doing good.
  • BakerMan @ BakerMan:
    Well, from what I've heard from my parents, he had a seizure last night, perhaps an epileptic episode, fucking died, had a near death experience, my dad called the paramedics, they showed up, took him to the hospital, and he woke up covered in tubes, and started complaining.
  • BakerMan @ BakerMan:
    He couldn't eat until after his MRI, when he had a bomb pop.
  • BakerMan @ BakerMan:
    What matters now is that he's doing alright.
  • Veho @ Veho:
    But you still don't know what it was?
  • Veho @ Veho:
    Has he had seizures before?
  • The Real Jdbye @ The Real Jdbye:
    apparently stress can cause seizures, my brother had one during a test once
  • The Real Jdbye @ The Real Jdbye:
    never had one before that, and never had one since
  • Redleviboy123 @ Redleviboy123:
    Question about game texture chanching Do i need an own game id?
  • The Real Jdbye @ The Real Jdbye:
    @Veho for those that want to
    experience being sonic the hedgehog
  • Veho @ Veho:
    Ah, you mean
    furries.
  • The Real Jdbye @ The Real Jdbye:
    well, sonic fans are a whole separate thing from furries
  • The Real Jdbye @ The Real Jdbye:
    like bronys
  • The Real Jdbye @ The Real Jdbye:
    sonic porn is too weird even for me
  • Dumpflam @ Dumpflam:
    bruh
  • Dumpflam @ Dumpflam:
    guys how do i delete a post
  • The Real Jdbye @ The Real Jdbye:
    you don't
  • The Real Jdbye @ The Real Jdbye:
    you can report it and request deletion
    The Real Jdbye @ The Real Jdbye: you can report it and request deletion