Homebrew [release] sockfile python

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
I made a new Python version of sockfile that works with the new FBI 2 protocol (so it wont work with FBI 1)
It should work with both Python 2 and Python 3 and it uses the same command line arguments as the official sockfile.
https://github.com/svanheulen/sockfile_python

Edit: I added a new script to the repository!

The "net_installer.pyw" script runs a HTTP server and displays a QR code that can be scanned by FBI to install the specified CIA/TIK file.

You do need to install the "pyqrcode" Python module, which can easily be done by just opening your console/terminal and typing:
Code:
pip install --user pyqrcode

Once that's all set, you can just drag-and-drop a CIA/TIK file (or a folder containing CIA/TIK files) onto the script, then scan the QR code with FBI. (Note: you need to keep the window open until the install on your 3DS finishes)

On Linux and Mac you can also use the "-t" argument to have the QR code display in the terminal if you want :)
Code:
./net_installer.pyw -t /path/to/cia/file.cia

Edit: I renamed the "qr_installer.pyw" script to "net_installer.pyw" and added support for the new network install protocol added in FBI 2.4.5

You can use the new protocol like this:
Code:
./net_installer.pyw --send x.x.x.x /path/to/file.cia
Where "x.x.x.x" if the IP address of your 3DS (displayed by FBI).
If you don't use the "--send" argument (or if you drag-and-drop files onto the script) it will display the QR code.

I also added a script for the old FBI 1.x protocol, just because.


GUI display:
GyDfZ0E.png

Terminal display:
yt9f9jz.png
 
Last edited by moghedien,

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
Excellent job! However I found a minor issue. You can't specify the port.
Yeah, the port is hard-coded to 5000 in FBI so I did the same. If there is an actual use case for needing to specify the port I can certainly add that option.
 

retroguy

Well-Known Member
Member
Joined
Nov 28, 2006
Messages
116
Trophies
1
XP
299
Country
Netherlands
Nice. Can I install a few CIA's at once with the python script? If so, wha'ts the command line? Just a space between the CIA names?

And what is the commandline for showing the transfer speed in the window (I'm using this script with a .bat so I only need to type in the CIA name, and I would like to add the 'show transfer speed' command).
 
Last edited by retroguy,

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
Nice. Can I install a few CIA's at once with the python script? If so, wha'ts the command line? Just a space between the CIA names?
For the sockfile.py script, yes, exactly. For the qr_installer.pyw script it only serves one CIA file.

--------------------- MERGED ---------------------------

There is no way to show the transfer speed
 

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
I updated the QR code installer to allow installing multiple files with a single QR code. Just give it a path to a folder containing some CIA/TIK files. Keep in mind that if there are too many files FBI might have a hard time reading the QR code.
 

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
I renamed the "qr_installer.pyw" script to "net_installer.pyw" and added support for the new network install protocol added in FBI 2.4.5

You can use the new protocol like this:
Code:
./net_installer.pyw --send x.x.x.x /path/to/file.cia
Where "x.x.x.x" if the IP address of your 3DS (displayed by FBI).
If you don't use the "--send" argument (or if you drag-and-drop files onto the script) it will display the QR code.

I also added a script for the old FBI 1.x protocol, just because.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, people who cant download it can still play the game
  • BigOnYa @ BigOnYa:
    If your internet speeds are fast enough. Streaming 4k takes alot. I used to only have 20mb sec, and 4k struggled. Now I have 300mb sec and 4k plays fine.
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, i only have like 1 or 2 mb sec
  • BigOnYa @ BigOnYa:
    Did you feed the hamster in your internet router? It prob died and is running slow now.
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, why did you start saying my pc has a hamster in the first place?
    +1
  • BigOnYa @ BigOnYa:
    Its actua!ly just a old joke, meaning its slow. Was just kidding around with you.
    +1
  • BigOnYa @ BigOnYa:
    I bet @AncientBoi has some hamsters hidden somewhere tho....
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    I think Game streaming should work like this.... Local Hardware able the run the game fine, game engine and common assets stored locally, all FMV and music and textures could be streaming
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Some temporary storage
  • Xdqwerty @ Xdqwerty:
    also @BigOnYa im making some progress on my gdevelop project, implemented various mechanics
  • Psionic Roshambo @ Psionic Roshambo:
    They went all in on streaming, should have been more of a hybrid approach
    +1
  • BigOnYa @ BigOnYa:
    Or free government supplied high speed internet be nice also. Like Obama care. Xdqwerty that's cool, its time consuming but rewarding once done or playable, to see what you've made from scratch. Animations take forever, but worth it.
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, although the bullets are a bit buggy
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Not to mention this would be a massive pain to pirate
  • Xdqwerty @ Xdqwerty:
    @BigOnYa,
    and the visual aspect of the game is quite crude (the sprite that looks best is that of the protagonist just because he is a stickman with sunglasses)
    +1
  • BigOnYa @ BigOnYa:
    There is a bullets behaviour you assign to your character, that makes the code easier, under "behaviours"
  • Xdqwerty @ Xdqwerty:
    i meant that when the character is pointing to the right, the bullets spawn where they should, but when he is on the right, they move to the right but the spawn point is incorrect
  • BigOnYa @ BigOnYa:
    Itch.io has lots of free assets also. Under the bullets behavior tab, there is a "rotate bullets" option, can try that. Or in the code can try
    - fire bullet Player.X(PlayerDirection)
  • Xdqwerty @ Xdqwerty:
    im taking a break for today anyway
    +1
  • BigOnYa @ BigOnYa:
    YEa gotta after a while, looking at code for long periods will bug your eyes.
    +1
  • BigOnYa @ BigOnYa:
    That's cool tho, I'm proud of you going back to it, not giving up. It is difficult at first to learn, but fun once you get the hang of it. I think I've watched every tutorial video there is, but I still struggle sometimes to get stuff to work right. But gotta keep trying dif things, and eventually you will get it right.
    +1
  • K3Nv2 @ K3Nv2:
    Lol McDonald's has a grandma mcflurry
    K3Nv2 @ K3Nv2: Lol McDonald's has a grandma mcflurry