What's new

New-ish NAOMI netboot web interface

Sega isn't making any money, but I'm also not interested in making an entire arcade's worth of netbooted units highly manageable for free, as it's going to be misused the second I do so.
I don't know about that. Arcades are going to want to set something up so that it boots automatically to the same game every single day. Most arcades that are running "pirated" NAOMI setups are running CF for that reason and would probably go to the orange pi setup if they moved away from CF to net boot.
the people that your setup would benefit are those guys that bring cabs to events where they want to boot a different set of games every event.
You do have a point there...... I will give some more thought as to how I can discourage undesired use.
 
Last edited:
Well anyways, I just made a bunch of changes/upgrades/cleaning and I think it might work again. Added in a state machine for loaders.
Turns out a lot of the annoyance I was dealing with was due to multiprocessing so I tossed a lot of that out and put in a single-thread ticker for loaders, and split out the web ui to its own thread instead of its own process, which allows a bit more flexibility in what data can be passed between them, since multithreading in python isn't actually multithreading.

If it works, it'll display the current status and upload percentage.
I need to dig out my netboot setup to test it, however I have a fair degree of confidence that it will at least boot a game.

My code is nowhere near as elegant as @DragonMinded's, but I do have a feeling this is going to end up being my python-learning project (the thing I rewrite constantly as I learn more about advanced features of the language and its various quirks). I expect I will be looking to their code for inspiration in this regard as well.

Feedback always welcome.
 
I've just done some testing and debugging with my N2 netboot rig. I can confirm that it works.

I have no way to test GPIO as of present (it should work though).
I'm not sure how efficiently it will handle multiple nodes, however it should work with more than one without issue.

Shifting work to Adafruit LCD UI.
 
Is this in a usable state? I have the old non-web setup with the Adafruit LCD, but I want to switch to a web version. I checked out the GitHub, but couldn't figure out how to load this onto the Pi.
 
It's probably usable.
I've got a few things I'd want to test and improve (database work blehhhh) (also network configuration interface) before I build an image, but it should be more than good enough for a single-node, web-only setup.
 
How do I get this on to the Pi? I’m used to just writing an iso to the sd card. Do I just write your git master to the card?
 
it's a bit more complicated than that, you'd need some linux knowledge.

essentially what you would need to do is get a stock raspibian image, throw that onto an sd card, boot the pi up, install the necessary python packages via pip, copy/clone the git repo wherever and set it up as a systemd service.

I'll see if I have time this week to do something, but I can't make any promises. I've got my day job, and I'm flying out for a day of interviews later this week.
 
Got it. I see your notes on the README now. I should be able to figure this out, will try to take notes. Hopefully this will work on the latest Pi 4.
 
I can't seem to get hashlib and threads installed. Running Pi 4 Model B with latest Raspbian Buster Lite. I may just wait for the iso.
 
I just finished up with this round of interviews today, might have some time tomorrow or Sunday to mess with it.
 
I tried getting this setup again from scratch today, still can't seem to get it going. Here is the output when I try to start it. I don't think I have all the dependencies.

File "./src/main.py", line 68, in <module>
nodeman.loadNodesFromDisk(prefs['Directories']['nodes_dir'])
File "/ACNTBoot/src/NodeManager.py", line 113, in loadNodesFromDisk
self.nodes.loadNodes(nodes_dir)
File "/ACNTBoot/src/NodeList.py", line 67, in loadNodes
elem.setup()
File "/ACNTBoot/src/NodeDescriptor.py", line 72, in setup
self.node_id = hashlib.md5((self.hostname+self.ip+str(self.port)).encode()).hexdigest()
File "/ACNTBoot/src/NodeDescriptor.py", line 62, in hostname
return self._hostname
AttributeError: 'NodeDescriptor' object has no attribute '_hostname'
 
I tried getting this setup again from scratch today, still can't seem to get it going. Here is the output when I try to start it. I don't think I have all the dependencies.

File "./src/main.py", line 68, in <module>
nodeman.loadNodesFromDisk(prefs['Directories']['nodes_dir'])
File "/ACNTBoot/src/NodeManager.py", line 113, in loadNodesFromDisk
self.nodes.loadNodes(nodes_dir)
File "/ACNTBoot/src/NodeList.py", line 67, in loadNodes
elem.setup()
File "/ACNTBoot/src/NodeDescriptor.py", line 72, in setup
self.node_id = hashlib.md5((self.hostname+self.ip+str(self.port)).encode()).hexdigest()
File "/ACNTBoot/src/NodeDescriptor.py", line 62, in hostname
return self._hostname
AttributeError: 'NodeDescriptor' object has no attribute '_hostname'
That looks like something I did wrong.

I'm feeling not-sick for the first time since the Wednesday after my last post, so let me take a look
 
I tried getting this setup again from scratch today, still can't seem to get it going. Here is the output when I try to start it. I don't think I have all the dependencies.

File "./src/main.py", line 68, in <module>
nodeman.loadNodesFromDisk(prefs['Directories']['nodes_dir'])
File "/ACNTBoot/src/NodeManager.py", line 113, in loadNodesFromDisk
self.nodes.loadNodes(nodes_dir)
File "/ACNTBoot/src/NodeList.py", line 67, in loadNodes
elem.setup()
File "/ACNTBoot/src/NodeDescriptor.py", line 72, in setup
self.node_id = hashlib.md5((self.hostname+self.ip+str(self.port)).encode()).hexdigest()
File "/ACNTBoot/src/NodeDescriptor.py", line 62, in hostname
return self._hostname
AttributeError: 'NodeDescriptor' object has no attribute '_hostname'
That looks like something I did wrong.
I'm feeling not-sick for the first time since the Wednesday after my last post, so let me take a look
Okay yeah, I remember running into that myself a couple weeks ago. It looks like I forgot to commit my changes that fixed it. I just pushed up to master, you should be able to pull that and be good to go, I think.

I'm going to see if I can get an image together right now also.
 
Last edited:
Grabbed the latest, getting syntax error below. Note: I do not currently have the Adafruit LCD attached, but I don't think that matters at this point.

DEBUG:main:init logger
DEBUG:main:CFG_DIR=./cfg
Traceback (most recent call last):
File "./src/main.py", line 103, in <module>
from ui_adafruit import UI_Adafruit
File "/ACNTBoot/src/ui_adafruit.py", line 52
if message.payload = "donelol":
^
SyntaxError: invalid syntax
 
Grabbed the latest, getting syntax error below. Note: I do not currently have the Adafruit LCD attached, but I don't think that matters at this point.

DEBUG:main:init logger
DEBUG:main:CFG_DIR=./cfg
Traceback (most recent call last):
File "./src/main.py", line 103, in <module>
from ui_adafruit import UI_Adafruit
File "/ACNTBoot/src/ui_adafruit.py", line 52
if message.payload = "donelol":
^
SyntaxError: invalid syntax
For now disable the adafruit ui in the config, that should prevent it from loading that module. It doesn't work yet anyways. I've included that and fixed that error in a fresh push. sorry for the hassle.

Good to know that the platform detection works though :D
The fact that it's trying to load that means it has detected it's running on a raspberry pi.
 
No hassle for me, I'm glad to troubleshoot where I can. I'll try that and let you know how it goes. Thanks again.
 
I cloned the latest repo. Looks like we have some progress. I assume it is running, but the wireless might not be working. I don't see the SSID when searching. Not sure how to troubleshoot the wireless. Here's the output:

DEBUG:main:init logger
DEBUG:main:CFG_DIR=./cfg
DEBUG:DIMMLoader 3053797424:set fa9c9a736653041a27c48c4adf64b75c state to LoaderState.WAITING
Bottle v0.12.18 server starting up (using WSGIRefServer())...
Listening on http://0.0.0.0:8000/
Hit Ctrl-C to quit.
 
I cloned the latest repo. Looks like we have some progress. I assume it is running, but the wireless might not be working. I don't see the SSID when searching. Not sure how to troubleshoot the wireless. Here's the output:

DEBUG:main:init logger
DEBUG:main:CFG_DIR=./cfg
DEBUG:DIMMLoader 3053797424:set fa9c9a736653041a27c48c4adf64b75c state to LoaderState.WAITING
Bottle v0.12.18 server starting up (using WSGIRefServer())...
Listening on http://0.0.0.0:8000/
Hit Ctrl-C to quit.
if you're starting with the base raspibian image, you'll need to configure that.

https://pimylifeup.com/raspberry-pi-wireless-access-point/

up through step 16 has relevant information.

I'm going to tackle a bit today after work hours.
 
I used these instructions to get the access point working: https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md

I successfully connected to the wifi and browsed to the netboot page. I'm trying to load games into a games directory now.

A few questions:
  1. Does the settings.cfg wlan settings do anything? It seems all the settings are handled when you configure hostapd
  2. Is it supposed to auto redirect any web traffic to the site? I thought I remember seeing that somewhere. This is not happening, I have to manually enter the IP w/ port 8000.
 
I used these instructions to get the access point working: https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md

I successfully connected to the wifi and browsed to the netboot page. I'm trying to load games into a games directory now.

A few questions:
  1. Does the settings.cfg wlan settings do anything? It seems all the settings are handled when you configure hostapd
  2. Is it supposed to auto redirect any web traffic to the site? I thought I remember seeing that somewhere. This is not happening, I have to manually enter the IP w/ port 8000.
Nope, the settings.cfg stuff for wlan/eth0 doesn't do anything yet.

the web redirect was handled in the image I had previously made using iptables and configuring dnsmasq to set the gateway for clients to itself.
 
Back
Top