BrowserInterface-HiLevelRequirements
prof_braino
Posts: 4,313
BrowserInterface-HiLevelRequirements
Hi All
There's a bunch of different projects that may or may not come together shortly.
I figure we can't get what we want if we don't ask for it clearly, so here goes. I do requirements, so this is my thing. If we clearly state the highest level requirements, we can gauge the likelihood of seeing them implemented, and which ones have not been addressed (so we know what else to work on). Then plan accordinly.
There are several projects for compiling prop code; propgcc, open spin, simpleIDE.
There are a couple efforts to compile from a borwser window; I've seen a thread for msrobots and heater.
There are some threads about wireless to communications to various prop configurations.
Here are my highest level requirements "wish list".
Compile prop code from a browser window:
- browser connects to a remote server (remote server compiles my code)
- browser connect to this workstation (my workstation compiles my code, no internet connection)
- compiled results can be downloaded to a prop where the BROWSER is running
- compiled results can be downloaded to a prop where the SERVER is running (code on the road on a rig in the lab)
Browser can also talk to the prop with an arbitrary serial connection:
- browser runs a command line or terminal like tera term or parallax serial term to interface to a serial interface on the prop, if such a serial interface on the prop is implemented
- browser can be controled by user to select an arbitrary external propgram to handle the serial interface.
- serial interface allows pasting text into the winodw, pasted text is sent to the prop.
In my case,
* development always involves a serial connection to the prop after the compiled spin code is loaded to prop RAM or EEPROM.
* we always type stuff into the command line or terminal interface
* we always paste more text into the commanline or terminal interface
* we often highlight and copy output from the terminal or command line.
Presently, we use proptool or propellant to complie
Presently we use teraterm or a custom serial program (goterm, goprowyterm, gomuxterm) to talk to the propgrammed prop
sO, this is what I'm looking for.
Would anyone else find these capabilities useful?
Would anyone find any of these unnecessary of a hinderance in some way?
Developers:
would any of these be impossible for some technical reason?
Are any of these already completed?
Requarding wireless:
We found that bletooth works fine with PC and Android, but is very difficult with Apple/iPhone/iOS.
Now we are looking at stick a wirelss router (DIR505L) on the prop. We connect the prop to the routers local serial port, just as with any other linux pc. We think we can talk to this rig from any browser connected to the internet, from anywhere in the world. This permitts Apple/iPhone/iOS and only costs $30. We just need the browser work to be completed.
Comments?
Hi All
There's a bunch of different projects that may or may not come together shortly.
I figure we can't get what we want if we don't ask for it clearly, so here goes. I do requirements, so this is my thing. If we clearly state the highest level requirements, we can gauge the likelihood of seeing them implemented, and which ones have not been addressed (so we know what else to work on). Then plan accordinly.
There are several projects for compiling prop code; propgcc, open spin, simpleIDE.
There are a couple efforts to compile from a borwser window; I've seen a thread for msrobots and heater.
There are some threads about wireless to communications to various prop configurations.
Here are my highest level requirements "wish list".
Compile prop code from a browser window:
- browser connects to a remote server (remote server compiles my code)
- browser connect to this workstation (my workstation compiles my code, no internet connection)
- compiled results can be downloaded to a prop where the BROWSER is running
- compiled results can be downloaded to a prop where the SERVER is running (code on the road on a rig in the lab)
Browser can also talk to the prop with an arbitrary serial connection:
- browser runs a command line or terminal like tera term or parallax serial term to interface to a serial interface on the prop, if such a serial interface on the prop is implemented
- browser can be controled by user to select an arbitrary external propgram to handle the serial interface.
- serial interface allows pasting text into the winodw, pasted text is sent to the prop.
In my case,
* development always involves a serial connection to the prop after the compiled spin code is loaded to prop RAM or EEPROM.
* we always type stuff into the command line or terminal interface
* we always paste more text into the commanline or terminal interface
* we often highlight and copy output from the terminal or command line.
Presently, we use proptool or propellant to complie
Presently we use teraterm or a custom serial program (goterm, goprowyterm, gomuxterm) to talk to the propgrammed prop
sO, this is what I'm looking for.
Would anyone else find these capabilities useful?
Would anyone find any of these unnecessary of a hinderance in some way?
Developers:
would any of these be impossible for some technical reason?
Are any of these already completed?
Requarding wireless:
We found that bletooth works fine with PC and Android, but is very difficult with Apple/iPhone/iOS.
Now we are looking at stick a wirelss router (DIR505L) on the prop. We connect the prop to the routers local serial port, just as with any other linux pc. We think we can talk to this rig from any browser connected to the internet, from anywhere in the world. This permitts Apple/iPhone/iOS and only costs $30. We just need the browser work to be completed.
Comments?
Comments
An excellent wish list, and one that we are working toward:
1) Browser connects to a remote server (remote server compiles my code)
Currently we have arranged that if the browser knows about your code (i.e. can get it from local files or a server) you can edit it. We then send all the source text to a "web worker" process to compile with openspin. There is no reason we could not send it back to the server for compilation instead.
2) Browser connect to this workstation (my workstation compiles my code, no internet connection).
This only requires that you have a web server running on your local machine. This can be done using node.js in not many lines of code.
3) Compiled results can be downloaded to a prop where the BROWSER is running
Again this requires a webserver process running on your local machine. Again ths can be done in not many lines of code that connect browser to loader of your choice.
4) Compiled results can be downloaded to a prop where the SERVER is running (code on the road on a rig in the lab)
Same as above except that little web server process is now running on some remote machine.
Basically if your user interface is a web browser and your Propeller interface is a serial port the solutions for local or remote Propeller are the same. You need that web server process somewhere.
5) Browser runs a command line or terminal like tera term or parallax serial term to interface to a serial interface on the prop, if such a serial interface on the prop is implemented
My vision for this is that the browser runs a VT100 terminal emulator screen (google tty.js) that has a serial byte stream to the web server running over a web socket connection (google web sockets). That web server process has, in turn, a serial port connection to the Propeller. All the server has to do is relay characters between browser and Propeller. If VT100 emulation is not what you want it can be hacked to do whatever the Propeller Terminal does.
6) Browser can be controled by user to select an arbitrary external propgram to handle the serial interface.
No. This is not going to happen. For security reasons browsers cannot run any old program at the hit of a button. Besides it defeats the whole pount of going all "webby" and working in the browser.
7) Serial interface allows pasting text into the winodw, pasted text is sent to the prop.
This can be done with an in browser terminal like tty.js. No idea, but I find the concept so attractive that I have spent hundreds of hours on it already, just to prove it can be done. As has msrobots. Who cares? Just roll up your sleeves and get on with it.
I have no idea about the Bluetooth, WIFI, iPhone, Android problems. As my old boss used to say "Don't worry about that, its a networking issue."
P.S. All of the above looks quite doable for Spin programming so far. I don't see that we are ever going to get propgcc running in the browser but that idea of a remote compiler is possible. Just send the source to the server and have it run propgcc for you.
P.P.S. Currently I can program an ARM chip in JavaScript using nothing more than a Chrome browser and the Espruino JavaScript IDE running as a "Chrome App". Chrome Apps can access the serial port directly. I'd like to see the web based Spin compiler doing that as well.
between 5 & 6, what if instead of "arbitrary program" we put "my custom program that does vt100 emulation"?
If we could configure the java script to call our program to handle the connection we are golden.
JavaScript in a Browser has no direct access to system resources. NO file access, NO serial, NO USB/Bluetooth, nothing. So NO way to start any program on your local computer direct from the Browser.
What you can do is access the internet or a local webserver (spinneret, Node, Apache, IIS, PropForth, Tachyon, does not matter.)
You also can upload files from your local file system, and you can download files to your local file system. You are doing things like that here in the forum every day.
The funny thing @Heater was able to do, is to simplify ONE aspect of it. Normally (this forum for example) you need some webserver with a scripting language (Apache+php / IIS+aspx) to build 'web applications' used by people in their browser. This needs some serious installation and maintenance. What @Heater. and me are doing is different. The whole shebang is just a couple of text files running directly in the browser.
If you are using windows and Internet Explorer you even can download the 3 text files to you local hard drive and start I directly from there. Chrome needs some command line switch to allow it to run from a local file system. same issue as above, security, the html page needs access to the other 2 files and chrome does not allow it by standard.
I do not know how MAC and Linux handle local html files, I do not own any of them.
There are tricks around the problem with local file and serial access. @Heater is exploring Chrome Apps. Some sort of special html pages just for Chrome. This is should work, but neither of us has tried it. IE has something like that called HtmlApplication (.hta file), I have never tried that either.
I am doing some work with the spinneret, but have some roadblock there. I need to solder one resistor on that db-adapter board for the spinneret to build a PropPlug so I can use the spinneret to program another propeller from it. But I cant find that stupid db-adapter board (I have at least 3) fitting that header on the spinneret. The schematic is as simple as it gets. 3 pins from the spinneret, one of them pulled down by 1Mohm to keep the reset of the second prop low while booting the spinneret. the other two for rx/tx.
Mike G. adapted @Chips PropellerLoader to load a file from the sd-card of the spinneret and program it into the second propeller. This would be a PropPlug with IDE in quite compact form since the editor/compiler we have now can run from it also. But be warned: FAT32 file system with 8.3 filenames on the spinneret.
of course if you have a local (or remote) webserver it is possible to write php/aspx/whaterver web services running whatever you allow them to run. But this need installation and we want to avoid that. This is what PropGCC, SimpleIDE, SpinIDE and all those other projects do. You need to install something on your computer/Webserver.
Our 'Plan' is to avoid that and just run from the browser. see here http://parallax.msrobots.net/Editor14.htm
No installation needed. Just runs in your browser. 3 text files.
Enjoy!
Mike
Have you, msrobots, and Heater checked out the FileSystem API?
However you can make file upload and download easier for by dragging and dropping files from your operating systems file system File Manager into a web page and vice versa. Point is there has to be user control of what goes in and out.
See this nice demo here. http://html5demos.com/file-api
After that is same old AJAX requests to get files up and down from the server.
to send files you need to implement PUT requests. See spinneret-msrobots. Easy to do and works perfect.
Enjoy!
Mike