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
  • K3Nv2 @ K3Nv2:
    These are actual implants to dentures though
  • cearp @ cearp:
    Well once it's all done I'm sure you'll be happy with the result
  • K3Nv2 @ K3Nv2:
    Just a flappity denture would probably be 5k
  • mthrnite @ mthrnite:
    sold
  • K3Nv2 @ K3Nv2:
    I got some faith implants are going to justbe included with a crown cost
  • K3Nv2 @ K3Nv2:
    Procedures bullshit wait 4 months for graft to heal wait another four months the post to heal then get crown
  • SylverReZ @ SylverReZ:
    Only 1 tempycoin.
    +1
  • K3Nv2 @ K3Nv2:
    Got kfc for dinner fucking dinner box is a joke
  • BigOnYa @ BigOnYa:
    Just go gummy, ancientboi would like you better that way anyways, and you save money on toothbrushes/toothpaste
  • cearp @ cearp:
    @Sicklyboy I agree, but also it's about self control and realistic thinking. We wouldn't feed a dog soda, so why feed it to ourselves? Eating unhealthy food because it's cheap is one thing, but I'm sure you know people who drink soda routinely when they should be drinking water which is free.
    I get it can feel mean to say "no treat sweet beverage for you anymore" but for many people it's just in their way of life.
  • K3Nv2 @ K3Nv2:
    I drink soda twice out of the week
  • K3Nv2 @ K3Nv2:
    Plus decay can start as young as 15 tons of factors
  • cearp @ cearp:
    Even sugar free isn't good, as the acid is bad enough.
  • cearp @ cearp:
    oh earlier than 15 Ken, babies, children can get decay
  • K3Nv2 @ K3Nv2:
    So dentists give. Us these caps that'll last a few years to fight thrm
  • K3Nv2 @ K3Nv2:
    Yeah but babies get a new set
  • K3Nv2 @ K3Nv2:
    Screw godfor not giving us a new adult set after we mess up
    +1
  • cearp @ cearp:
    "You listening up there big guy?"
  • BigOnYa @ BigOnYa:
    Just smoke meth, all your dental problems will go away.
    +2
  • K3Nv2 @ K3Nv2:
    Even steven
  • cearp @ cearp:
    I wonder why edibles haven't caught on for meth
  • K3Nv2 @ K3Nv2:
    Locked down from government to dispensary
  • BigOnYa @ BigOnYa:
    In India it has, can't remember what its called yuka I think,
  • K3Nv2 @ K3Nv2:
    That's why we need regulation :teach:
  • SylverReZ @ SylverReZ:
    @BigOnYa, Speak to Psi, he'll offer you some in Tempycoin. :tpi:
    SylverReZ @ SylverReZ: @BigOnYa, Speak to Psi, he'll offer you some in Tempycoin. :tpi: