Uzebox and networking capabilities

Discuss general Uzebox topics here: features, wish list. nice to have, etc.
Post Reply
User avatar
abe369
Posts: 4
Joined: Tue Aug 30, 2016 12:56 pm

Uzebox and networking capabilities

Post by abe369 »

Greetings !
First I want to say that I am very exiting about the project,
I remember that longtime ago I had seen this Uzebox project but at the time I didn't have enough skills to do something (even build one), now I may can help ! *I am not promising anything*

When I checked the part list and see that the ATMEGA644 has USART (and that this feature is supported in the kernel), suddenly I said : Hey ! this could be great for a network implementation !
By searching on the forum I found this topic : http://uzebox.org/forums/viewtopic.php?f=1&t=2341
Talking about a future integration of WiFi/Networking so...

I got an idea for a simple way to connect some Uzebox over the internet :
Uzebox USART <-> USART to USB <-> PC <-> Uzebox Client (on the PC )<-> INTERNET <-> Uzebox Server <-> INTERNET <-> Uzebox Client (on the PC ) <-> PC <-> USART to USB <-> Uzebox USART

Worried about not having WiFi option ? No problem !
We can use a Raspberry PI (Yes I know it's not FSF approved but it has USART and can attract some folks form the RPI community )
For this option I think about using USB WiFi who broadcast an Access Point(hostapd) with/without password
(something simple like : "uzebox" just to ensure the user access point password is encrypted over the air),

To input the password without configuring it into conf files, the better way is to use a web interface(Apache2) and ask for user ESSID and password of his WiFi network.
The web page can be accessed by IP or by typing anything in the browser, because of the RPI will run a simple DNS server(bind9) that redirect every url to the web page.
After the user submit his ESSID and password, a script will reconfigure AP to client mode and try to connect. If its work a green LED turn on,
if not red LED and by pushing on a micro switch the RPI reconfigure hostapd to AP mode and user can try again.

So this tow solutions could make Uzebox network compatible without heavy changes just have to soled wires on Tx/Rx.
Wait a minute... You talks about Client and Server what are they ? Oh! Yeah I will explain !
For this I think about coding in Ruby because it is cross platform only require the ruby environment, and don't need to be compiled,
have a lots of gems to implement new functionalities (and of course I know better ruby than C)
Resulting in something like this :
Uzebox USART <-> USART to RPI Client over WiFi <-> User WiFi Gateway <-> INTERNET <-> Uzebox Server <-> INTERNET <-> User WiFi Gateway <-> RPI Client over WiFi to USART <-> Uzebox USART

What can be easy for me :
- Providing the RPI tutorial (I already done those things)
- Ruby Client/Server to make Uzebox communicate through USART over internet ( by looking in my backup files I found that I have a working build (a simple chat)
that make 2 clients communicate through the server but, if more than 2 not all clients receive the message, I have to dig... that was long ago)
- Modifying Client/Server to use USART instead of CLI

Limitations :
- I have average coding skills (can't open sockets in pure C that's why Ruby)
- Security issues
- Money

My questions :
- Does Uzemu log USART Tx/Rx ? (To process them and to simulate connection between two Uzebox)
- If not, is it possible to run the kernel and a hyper basic game to test USART on a ATMEGA644 without assembling the whole Uzebox maybe just the SD to store games ?
(something like auto start a game and simulate 1 or 2 controller button)
- What is better between a server list browser implemented into kernel menu or in game menu (just curious about that)

Feel free to ask !
I want to know your opinion on this :)
User avatar
D3thAdd3r
Posts: 3222
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzebox and networking capabilities

Post by D3thAdd3r »

Hey Abe, glad to have you around!

So for networking unfortunately it is pretty hard to track down all the information in one place at the moment..there is really no reason for that except the whole thing has been in slow development a long time, lots of changes, and no one really made a definitive document for the wiki yet. Multiple solutions have been considered in the past, eventually 1 took off more than others(a few ethernet concepts, RedPine wifi, TI CC3200, maybe more were tried).

Multiple Uzebox have communicated together over the internet using the popular ESP8266 UART<->WiFi device(the service being called "UzeNet"). The thread you linked to contains my rants about all that, or search for uzenet and esp8266 to find more. I don't know what he has on stock, but if do become interested/acquire funds to purchase hardware I would contact Uzebox creator/administrator Alec(Private Message to uze6666) first to make sure you get a network solution.

There is a WIP UzeNet server(port 58000), IRC server(port 6667), FTP server(port 21), and HTTP server(port 80) up at http://uzebox.net. The server is a VPS hosted in New York.The server isn't too useful yet especially since the protocol is being changed. You can simply connect TCP to uzebox.net:58000 with bare sockets interface, then it is expecting the first bytes sent to be an UzeNet ID something like "01:23:45:67:89:AB", without the quotes. If the ID is ok, it immediately sends the username that matches the ID, and in this way games can figure out their user's name or other information, without having to check EEPROM or SD, manual entry, etc. If you do so with sockets in Ruby, it will send "ABE369" back and you know it worked. I PM'ed you an UzeNet ID so you will be able to get on...not much to do with it yet :oops: The server generated the webpage you will see there, that works, but so far the score data needs to be added manually.

The Uzem source in the main branch does not have any UART emulation. There is a version with reasonable ESP8266 emulation that I blabbed about here. I am having issues with the new 2.0 code base and my UART timing is way off now, I will try to put up the latest version that does work based on 1.19(windows only for that version). This will eventually get done and work on all platforms.

Also, the idea that a client(say, ESP8266 only, no '644, emulator for compatibility) could run on a PC(Ruby could do string<->state<->sockets) where the Uzebox hardware connects via UART, could be another solution. There could exist as many solutions as there are people willing to do the work really; the beauty of open source. For games, the best thought I could come up with how to have a game browser, is in a separate rom that can use all it's flash space for a good environment where people can communicate(with keyboard support). It would be impossible to fit a robust environment inside some games that are already tight on flash. I am trying to get that integrated, where an IRC bot listens for user orders, then on behalf of that user works with the server to create a room(and the matching IRC room, moves the user to that room, for users to discuss game settings). Currently some of that works, you can create a room which is scheduled, you can flash a new program that knows nothing about what you just did and the game sends a command "connect to any room I agreed to play in beforehand, else if none, make a new open public one anyone can join". That allows pre-made rooms or simple to avoid the lobby all together and with very little code wait for the first random user from inside the game. Hashed over lots of things, but I am fairly confident that is the best route overall.

These are just some ideas that have some work behind them, ultimately whatever gets done by whoever wants to do it, works well, and is adopted by games, I like.
User avatar
abe369
Posts: 4
Joined: Tue Aug 30, 2016 12:56 pm

Re: Uzebox and networking capabilities

Post by abe369 »

D3thAdd3r wrote:There could exist as many solutions as there are people willing to do the work really; the beauty of open source.
That's why I came here !
D3thAdd3r wrote:It would be impossible to fit a robust environment inside some games that are already tight on flash.
That's what I had guess, no saying that my idea is better than others (especially when it's from those who had experience in this project).
but if the game only send what is going on, like when a character move from left to right it send a number or something through UART and then the PC
do all the dirty job. That must spare some space on the flash.
But yeah, it's not the Uzebox it self.
D3thAdd3r wrote:Also, the idea that a client(say, ESP8266 only, no '644, emulator for compatibility) could run on a PC(Ruby could do string<->state<->sockets) where the Uzebox hardware connects via UART, could be another solution
Clearly Yes ! I didn't get the thing when searching in the forum. More cost saving than that you can't !
With the ESP8266, how will be send the AT commands ?

So in both case having a client/server to process strings send by the Uzebox, could be interesting ?
D3thAdd3r wrote:if do become interested/acquire funds to purchase hardware
On adafruit I can't checkout due to some issue and because they have expensive shipping cost to my country... So I plan to buy components from the part list
and build it my self, a huge project for me but I trust my soldering skills !
and I found this : https://www.digikey.com/product-detail/ ... ND/5014721
That will make the AD725ARZ soldering a LOT more simple ! And also easy to remove without overheating component if something went wrong, I will plug it into a dip socket
I could also tinker a little and add some jumper socket for the UART. http://uzebox.org/wiki/index.php?title=UART baud rate is 57600 ?
User avatar
D3thAdd3r
Posts: 3222
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzebox and networking capabilities

Post by D3thAdd3r »

Are you planning on building a PCB Uzebox or a "breadboard" or "socket" style experimenter board? With the PCB, that SMT->DIP isn't going to line up right with the PCB. You still need to do just as "difficult"(it isn't too hard though really) of soldering to get it on the adapter, but would line up with a "bread board". Just want to make sure you aren't going to get something that you don't need. I would highly recommend buying at least the bare PCB because it makes things much easier, and turns out way better, and the PCB itself is the cheap part. Also, do you have a television that handles NTSC? Else you might need an E/Uzebox.

Let me know if you run into problems tracking down all the parts or getting it shipped reasonable. I have lots of extras, some PCBs that have ESP8266 built in, and can pre-solder anything you feel nervous on, actually I might not have any left that aren't soldered up. If you just want a bare PCB and do all the parts yourself, Alec probably has more of the "experimental" new PCBs that don't require a separate UzeNet module. That's where I got them from, and I will probably be getting more next years whenever I finish a couple Uzebox 128s, for now they are collecting dust :roll:
User avatar
abe369
Posts: 4
Joined: Tue Aug 30, 2016 12:56 pm

Re: Uzebox and networking capabilities

Post by abe369 »

The PCB is a good thing but I am going to use "perf board" like this :
http://www.allelectronics.com/make-a-st ... ard/1.html but a bigger one with 2.54mm (0.1") spacing. If it fail, I will go for the PCB.
Thanks for having notifying me about that, but don't worry I even checked pin and female header diameter to see if that fit ( what would be the world without datasheets :geek: )
D3thAdd3r wrote:You still need to do just as "difficult"(it isn't too hard though really) of soldering to get it on the adapter
Yes I see that today, when I wrote my previous post I was too tired. The good thing is, after I have done the soldering, and combining with female headers on the board,
it can be easily plug/unpluged if that fried !
D3thAdd3r wrote:Also, do you have a television that handles NTSC? Else you might need an E/Uzebox.
Yes, my TV is NTSC 3.58/4.43 capable (one thing that I never cared about before, hopefully it does!)
D3thAdd3r wrote:Let me know if you run into problems tracking down all the parts or getting it shipped reasonable
I have almost every part, using digikey product number to look for the manufacturer parts numbers, so I can buy them in a other online shop that deliver in 2-3 days.
But I need to wait for some things coming from china and essentially the programmer that I didn't had already, will buy this : http://www.goo.gl/wh1s2J (aliexpress)
In the hardware section I see a post from uze6666 that clones are working well, and these are cheap as dirt.

What are Uzebox 128s ? Searching in the forum I found some thing who look like keyboards (with I guess an Uzebox embedded inside ? )
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Uzebox and networking capabilities

Post by uze6666 »

Hey Abe369, how's your uzebox assembly project going on? Post some pics when you're done, we like those over here! :)
Post Reply