Receiving serial stream from P1 on Raspi, need web page GUI
potatohead
Posts: 10,261
in Propeller 1
Actually, it's bidirectional. Send command to P1 via web GUI, display data received.
My question is what software stack do I use on the Pi to provide the page in web browser?
What is out there that isn't a pig to learn, and looks current and is stable?
My question is what software stack do I use on the Pi to provide the page in web browser?
What is out there that isn't a pig to learn, and looks current and is stable?
Comments
With Javascript under node.js you can:
1) Create a web server in 10 or so lines of code. Especially if you use nodes Express module to help https://expressjs.com/
2) Send and receive data to your serial port, hence P1, in another ten lines of code. Use the node serialport module for that https://www.npmjs.com/package/serialport
3) Communicate in real time, streaming both ways, in another ten lines of code using web sockets. I use the socket.io module to make that even easier: https://socket.io/
All this is dead easy to learn and use and pretty damn stable. I have systems using this stack that have been running in production for years now. We push data from sensors and such in real-time to graphs and status indicators in web dashboards.
Of course that leaves the issue of actually creating the web page you want. That is a whole other can of worms. There are now a billion libraries and frame works for creating user interfaces in the page. I'm coming to the conclusion that the easiest thing to do, at least to start with, is ignore all that and just use JS in the browser to talk directly to the browsers DOM API.
Except, I recommend bootstrap to take care of styling. Saves most of that messing around with the monster that is CSS: https://getbootstrap.com/docs/4.0/getting-started/introduction/
As far as I can tell, if you really want to communicate with a client at a browser and a device (P1) attached to a server, both ways, in real-time, node.js is a much easier solution than dealing with traditional web servers, like Apache, and crusty old scripts in PHP.
I started working on a Propeller Loader in Javascript, for node.js, a while back : https://github.com/ZiCog/propeller-loader.js Derived from your PLoadLib.c as it happens. Thank you.
It did actually communicate with the Propeller boot loader but did not get as far as loading a binary. I had to put it aside under pressure of work at the time. And then well, other things came along.
Perhaps I should get back to it.
Where is he by the way?
I resemble that remark!
Suffice to say with my other idea in the general microcontroller functions closed, I figure I'd wander past and see what others are doing and since I've got a something or other in the water with the Prop 1 business especially since I need to come up with something amazing for this Winter's Demo Day meet with Hack A DAY-NYC. One of them involves the TRS-80 Model 102 I've got here. And it runs out from there......
Model 102? I have one of those. What are you doing with it?
Two things. One is to have it work as a terminal for program that pretends to be a PDP-11 running one of their operating systems. For the Prop 1, the device would be emulating a specific model PDP-11.
The other is my ongoing project of having the Model 102 talk to the Raspberry Pi and do a convincing job of it.
The really big problem here is outdoing myself. That Hack A DAY-NYC is convinced I'm e-mail address's namesake and once that happens it is difficult to keep up. The crowd keeps expecting the near impossible.
Or Prop-8, and run your PDP-11 emulator on it!
Hello!
Close. I was originally thinking of having the Prop 1 emulate a specific PDP-11 model. However I remembered that I had one firm's product here, and one group's collection of emulators.
Visit D-BIT that's the company.
The second one is SIMH currently the active site isn't really being there so the Owner has it pointing to the site belonging to the great people at Bit-Saver's current address. Pick the mirror for SIMH that you want.
Basically there you go.
Hello!
Excellent question. XXDP to confirm for my needs that the emulation works. It's a diagnostic that DEC wrote to confirm that the lucky machine was unpacked correctly. Then it's a toss up between a variety of UNIX, or if I can figure out how to get networking to work, BSD.
--
But why are you wearing that ball cap, and why is that cat next to you flipping through a magazine of questionable meaning? The bot in back of you has been watching you and is posting its video streams.
My 8080/Z80 simulators for the Prop relied on SIMH AltairZ80 project for CP/M, bootloader etc.
A phew, Peter Schorn still has his Altair pages : http://schorn.ch/altair.html
Every things seems to me intact.
I suspect they are in hibernation whilst the site is updated with fresh stuff. However Peter's site is not effected because it is not connected. And people are told to visit his site or another one if they want more of anything else for CP/M.
Besides, for my efforts I typically argue with SIMH on the Raspberry Pi, and the DBIT application for DOS and Linux.
I still haven't worked out how to restore a nice set of disk images that the fellow who provided the domain name originally for SIMH. That is the hosting functions and the portion after the SIMH beginning. These are from the TUHS site.
----
That's strange. Did you know Heater you wrote that one wearing a baseball hat advertising of all things a cricket club that plays in and around Arsenal, and with a big gray tom of a cat. Note the wiggle motions of the camera device of the bot in the corner.
Good to hear there is an effective SIMH salvage operation going on.