Uzenet

Topics regarding the Uzebox hardware/AVCore/BaseBoard (i.e: PCB, resistors, connectors, part list, schematics, hardware issues, etc.) should go here.
User avatar
nicksen782
Posts: 667
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: Uzenet

Post by nicksen782 » Fri Jan 25, 2019 9:58 pm

Great! The new bootloader has support for SD writing and the library used has a built-in fallback.

So, I was thinking of a server that would respond to certain requests. Actually, it would be similar to how the Online Player's database works. In fact, I suggest that we use that since it is already working. You can request a specific game by game id and the system returns back a generated remoteload.json file which indicates a couple things. The files to download and which of the files is the "gamefile".

I could probably supply something that has a list of links to each of the games. Then a check can occur to see if you have the game. Further, a simple hash can determine if you have the latest copy and then prompt you for an update. This would be a sort of local game library management system.

The problem that I see has hardest would be to figure out the ram limitations. If I'm downloading a file into what is probably going to be no more than 2k of RAM then I will need to consider something like "gamesList_part_A.json", "gamesList_part_B.json", "gamesList_part_C.json". Of course, if the SPIRAM is available then that's even better.

Also, how to process the data. It's either JSON or CSV or something else that is serialized. I'm open to suggestions.

At this point I would like to start up some sort of demo that at least can send a request to a remote server and get a response. I do not know how to use the ESP wifi at this point.

Should I open up a new thread?

User avatar
nicksen782
Posts: 667
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: Uzenet

Post by nicksen782 » Sat Jan 26, 2019 5:15 pm

I couldn't compile the Uzenet Demo until I commented out #include <time.h> in both UzenetDemo.c and uzenet.c .

Now I can get the .hex or .uze to run on the emulator. However, when I load the .uze into the hardware it just gives a black screen.

I also tried with Tank-Fu. It loaded but when I selected one of the network options my screen went black.

Is my hardware messed up? I know the SPIRAM works on it. Do I need a firmware update on the ESP maybe?

I removed my Uzenet module and loaded the Uzenet Demo again. This time I got the same responses that I got when I used the emulator. A speed detection ending in failure. I tried again with Tank-Fu. It seems that when the Uzenet module is detected something goes wrong.

I have the red Uzenet v2.0 module. On the back it also has the text of 10376A51095 .

I have another identical never used Uzenet v2.0 module and another 2 unbuilt. I tried with my second one but I got the exact same thing.

Interesting to note: When the Uzenet module is triggered a light on it blinks. It is at this time that the screen goes black. It flickers a a bit too.

Help?

User avatar
nicksen782
Posts: 667
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: Uzenet

Post by nicksen782 » Sun Jan 27, 2019 4:24 pm

Maybe it is because I have not configured the ESP for a WiFi connection? Is that done somewhere else? I saw mention of a "setup program" on the wiki but I did not find the program. If such a program exists it looks like I will need it first.

... or could it be done within the game too?

Another question, I have lots of ps/2 keyboards around and I have another SNES extension cable. How do I make a keyboard for Uzenet? It would be very helpful if I could configure the SSID and KEY in-game and then maybe store them in EEPROM or something. It has been previously said that storing it plaintext in a text file would be a bad idea. The EEPROM is a bit more secure in this sense but not perfectly so. Of course, this is a video game and there are better ways to hack into someone's WiFi.

*EDIT* http://uzebox.org/forums/viewtopic.php? ... =10#p13854 has a demo of what I am proposing. The goals match mine. D3thAdd3r, how did you set up the WiFi part?

User avatar
D3thAdd3r
Posts: 2422
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzenet

Post by D3thAdd3r » Tue Jan 29, 2019 1:52 am

I have to find the code I had, but essentially the setup thing was not ready for distribution. It detected the baud rate, set mode stuff, ran the list APs command and dumped that to a window you could choose one from. Then a password screen, that was about all that was finalized. Never got firmware updates to work, so AFAIK there is no real setup tool yet, but it is pretty critical for Uzenet.

The wiki or else schematics section should have the working setup for an ATtiny85 or similar. This setup works well, and it's use is documented in the keyboard demo I believe.

I think you could use the Uzenet demo to get access to the ESP and verify what firmware you have.

User avatar
uze6666
Site Admin
Posts: 4449
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Uzenet

Post by uze6666 » Tue Jan 29, 2019 2:42 am

I have made more work on the uzenet demo lately, hopefully that will fix the compile problems you had. I will commit it this week. And also will test with the uzenet module v2. I didn't do since all the dev was done on the latest PCB with the esp-12 on board. Btw, Do you have that board?

The uzenet demo expects a certain state of the esp-12 in its current state. It must be in station mode with the wifi access point set. You can use the demo to runs those commands one shot. Some are commented. Not so clear afaik. :oops:

Flashing the firmware will be required since I use the passthrough mode. Will need to devise a way to flash the module on the existing PCB. :|

User avatar
uze6666
Site Admin
Posts: 4449
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Uzenet

Post by uze6666 » Tue Jan 29, 2019 3:01 am

I missed the bit about the PS2 keyboard. I totally agree it's very useful to have that interface and i used it a lot for the dev of the uzenet stuff.

I have the small PCB required to build the interface. PM your address and i will send you one with a attiny Flashed with the required software. The schematics are I think on the wiki. If not I will add it.

Btw, no need to use the eeprom for setup since the esp8266 has some. There's command to set it 'permanently', usually start with AT*_DEF.

User avatar
D3thAdd3r
Posts: 2422
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzenet

Post by D3thAdd3r » Fri Feb 01, 2019 9:38 pm

One thought I had, is to utilize ESP8266 EEPROM to the max and avoid as much state handling as possible in games. IDs, passwords, etc. can be stored as MAC addresses for instance, without breaking network operations. If I recall the station and access point have different MACs which can be customized, and maybe there was something else not needing another specific value that can be dual purposed. With 2 MACs there is at least 12 bytes of persistent storage, which likely saves code space in some games which would require an already configured ESP8266 anyway.

User avatar
L4rry
Posts: 239
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: Uzenet

Post by L4rry » Sat Feb 02, 2019 10:43 am

D3thAdd3r wrote:
Fri Feb 01, 2019 9:38 pm
One thought I had, is to utilize ESP8266 EEPROM to the max and avoid as much state handling as possible in games. IDs, passwords, etc. can be stored as MAC addresses for instance, without breaking network operations. If I recall the station and access point have different MACs which can be customized, and maybe there was something else not needing another specific value that can be dual purposed. With 2 MACs there is at least 12 bytes of persistent storage, which likely saves code space in some games which would require an already configured ESP8266 anyway.
Tank Fu relies on the uniqueness of the default MAC address to do it's pairing. (The host is set to AP mode with the NIC part of the mac address forming part of the AP name). So this scheme will likely break that. But that's no train smash. If I can find some other unique device identifier to use instead of the mac, I can update that mechanism easy enough. Iterations will likely be necessary anyway once we reach some kind of standard firmware version and configuration.

User avatar
nicksen782
Posts: 667
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: Uzenet

Post by nicksen782 » Fri Feb 22, 2019 12:38 am

Confirmed!

Code: Select all

sudo avrdude -V -p m644 -P usb -c usbtiny -B 1 -U lfuse:w:0xD7:m -U hfuse:w:0xD2:m -U efuse:w:0xFF:m
That fixed my fuses. My fuses were wrong. Right enough to work with games but wrong enough to not work with Uzenet.

User avatar
nicksen782
Posts: 667
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: Uzenet

Post by nicksen782 » Fri Feb 22, 2019 3:51 am

Right on! towel.blinkenlights.nl on port 23. This is pretty cool!

There are lots of pauses and the cursor jumps around often.

So, yeah... bad fuses. I'll need to complete my Uzebox keyboard adapter once I get the needed components (I have some PCBs.) At least now I can test with this.

I'm in the game! We need some kind of config tool for WiFi, speed, SSIDs, passwords, etc. Configuring the module with my FTDI cable isn't exactly user-friendly and that is what I needed to do to get a connection to my WiFi. It looks like the Uzenet Demo can send any command to the ESP. How about a WiFi AP scanner with the ability to connect to an AP and save the settings in the ESP? Perhaps another for the baud rate?

What about doing ESP firmware updates? I think someone said it could be done through the Uzebox. How could that happen?

Also, is there already some demo code for Uzenet that can do HTTP requests? Telnet is really easy of course but I would like to do HTTP GET.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests