The HTTP spec. calls for a "content-type" field in the header to describe the format of the data in the body. See section 7.2.1
We can return a JSON object describing a directory and just set the mime type to "application/json" in the HTTP header.
This is a very normal practice.
If you want a nicely formatted HTML listing for reading in a web page and a convenient JSON listing for use by javascript then one can do "content negotiation" with the "accept" header field. Browsers will ask for "text/html", your javascript code on the page will ask for "application/json"
Any chance you have 2 versions installed and the wrong one is in your Path?
Yes, unfortunately installing Java is not as simple as it should be on Mac OS X. When you install Java from java.com (http://www.java.com/en/download/mac_download.jsp?locale=en), you just get the web plugin. You still need to install the Java JDK to get further.
But, even then, I get an error, which states the OS is not supported...
[COLOR=#000080]
[/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000080]$ java -version[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000080]java version "1.7.0_55"[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000080]Java(TM) SE Runtime Environment (build 1.7.0_55-b13)[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000080]Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)[/COLOR]
[/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000080]$ java -jar propeller-web-loader-1.0-SNAPSHOT.jar [/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000080]Apr 28, 2014 5:56:55 PM eu.creatingfuture.propeller.webLoader.WebLoader main[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000080]WARNING: This OS is currently not supported: MacOS[/COLOR][/FONT][/COLOR]
As far as "Attention: the compiler and propeller-load are not provided for mac. Only Windows and Linux."
I already have openspin and propeller-load installed as I use them from propgcc and SimpleIDE!
dgately
If you could provide me with the Mac versions of openspin and propeller-load I can add them to the server and write the code that uses them. It doesn't use installed versions but it provides it's own executables.
I don't have a Mac, so if I write the code for it, it will be untested.
If you could provide me with the Mac versions of openspin and propeller-load I can add them to the server and write the code that uses them. It doesn't use installed versions but it provides it's own executables.
I don't have a Mac, so if I write the code for it, it will be untested.
I've added the MacOS versions of the binaries you provided, as well as the code that uses them. Can you give this a try and let me know if it works?
On linux you have to make the binaries executable before it works. There's a good chance the same is required on Mac. They're located in 'propeller-tools/mac'.
I've added the MacOS versions of the binaries you provided, as well as the code that uses them. Can you give this a try and let me know if it works?
On linux you have to make the binaries executable before it works. There's a good chance the same is required on Mac. They're located in 'propeller-tools/mac'.
Tried this...
Test #1
1. Made the binaries executable (chmod 751 openspin; chmod 751 propeller-load)
2. Opened "Editor18.htm" in the web content directory (opened in Safari by default)
3. I could load a .spin file, but none of the buttons resulted in any built binary or eeprom (kind of expected that)
Test#2
1. Opened "Editor18.htm" in Google Chrome web browser
2. I could load a .spin file, but building binary or eeprom results in new tabs, but no logging to let me know of success
3. Tried "Run RAM" & "Burn EEPROM", nothing happens (no log, no activity from Activity Board)
4. Tried "Save Result (DOWNLOAD) on both binary & eeprom TABs, nothing happens, no files are saved to my file system
5. Tried "Save Result (PUT) on both binary & eeprom TABs, get the following Alert:
Test#3
1. Opened "Editor18.htm" in FireFox web browser
2. I could load a .spin file!
3. Built an eeprom file with success!
4. Built a binary file with success!
5. Tried "Run RAM" on binary, nothing happens (no log, no activity from Activity Board)
6. Tried "Burn EEPROM" on eeprom, nothing happens (no log, no activity from Activity Board)
7. Tried "Save Result (DOWNLOAD) on both binary & eeprom TABs, nothing happens, no files are saved to my file system
8. Tried "Save Result (PUT) on both binary & eeprom TABs, get the following error dialog:
Have not yet tried "Send to S6B" as I'm not sure what I need to have loaded and configured on the Activity Board (I do have the WiFi module, so am open to trying).
So, looks like FireFox allows the compile process to success (at some level) on Mac OS X! Good news!
Chrome may also allow building, but there's no log to tell if the build was a success (new TAB shows up for binary & eeprom, so it's possible that there was a good build)
Looks like there are issues with loading to RAM or EEPROM on Mac OS X (no logs that I could see, so I'm unsure what happens) on all browsers that I tried.
=EDIT=
WebKit (Safari's core) actually gets a crash when I attempt to "Save Result (DOWNLOAD)"
And, gets an Alert when I try to "Save Result (PUT)" on binary and eeprom TABs
Test #1
1. Made the binaries executable (chmod 751 openspin; chmod 751 propeller-load)
2. Opened "Editor18.htm" in the web content directory (opened in Safari by default)
3. I could load a .spin file, but none of the buttons resulted in any built binary or eeprom (kind of expected that)
Test#2
1. Opened "Editor18.htm" in Google Chrome web browser
2. I could load a .spin file, but building binary or eeprom results in new tabs, but no logging to let me know of success
3. Tried "Run RAM" & "Burn EEPROM", nothing happens (no log, no activity from Activity Board)
4. Tried "Save Result (DOWNLOAD) on both binary & eeprom TABs, nothing happens, no files are saved to my file system
5. Tried "Save Result (PUT) on both binary & eeprom TABs, get the following Alert:
Test#3
1. Opened "Editor18.htm" in FireFox web browser
2. I could load a .spin file!
3. Built an eeprom file with success!
4. Built a binary file with success!
5. Tried "Run RAM" on binary, nothing happens (no log, no activity from Activity Board)
6. Tried "Burn EEPROM" on eeprom, nothing happens (no log, no activity from Activity Board)
7. Tried "Save Result (DOWNLOAD) on both binary & eeprom TABs, nothing happens, no files are saved to my file system
8. Tried "Save Result (PUT) on both binary & eeprom TABs, get the following error dialog:
Have not yet tried "Send to S6B" as I'm not sure what I need to have loaded and configured on the Activity Board (I do have the WiFi module, so am open to trying).
So, looks like FireFox allows the compile process to success (at some level) on Mac OS X! Good news!
Chrome may also allow building, but there's no log to tell if the build was a success (new TAB shows up for binary & eeprom, so it's possible that there was a good build)
Looks like there are issues with loading to RAM or EEPROM on Mac OS X (no logs that I could see, so I'm unsure what happens) on all browsers that I tried.
=EDIT=
WebKit (Safari's core) actually gets a crash when I attempt to "Save Result (DOWNLOAD)"
And, gets an Alert when I try to "Save Result (PUT)" on binary and eeprom TABs
Thanks for working on this,
dgately
dgately,
don't forget that to use Load RAM or Load Eeprom, you need to start the java server and use the editor served by the embedded server. In your screenshot I can see that you opened: file://. It should be [url]http://localhost:xxxxx[/url]
it is a start. No clue why chrome on Mac does not work. It does on windows. can you open the debug console on Chrome and look for error messages? It seems to me that chrome is not starting the webworker.
HA. You did not open the page from the webserver (aka [URL]http://localhost:xxxx/Editor.18.htm[/URL]) where xxxx is the port provided by Michel L.'s server!
Open from the normal File System will block Chrome from accessing the other files besides the Editor18.htm.
so you need to start Michel L.'s Server via commandline:
java -jar propeller-web-loader-1.0-SNAPSHOT.jar
this should open a browser window with a URL like [URL]http://localhost:xxxx/[/URL]. in your default browser. use this url to open the editor in any browser to test...
Run RAM and Burn EEPROM should work then also.
Save... (PUT) is there to save files on a webserver supporting PUT requests. Michel L has not done that yet.
Save...(Download) should open a dialog on your MAC to ask you where to save the file, like it does when you download something from the forum or so.
don't forget that to use Load RAM or Load Eeprom, you need to start the java server and use the editor served by the embedded server. In your screenshot I can see that you opened: file://. It should be [URL]http://localhost:xxxxx[/URL]
Then, I loaded "http://localhost/Editor18.htm" into Google Chrome. I compile my .spin file to binary & eeprom files/TABS. AND, I'm able to "Save Result (DOWNLOAD)" with success! (yay!) Run RAM/Burn EEPROM don't do anything that I can see to the Activity Board. Save Result (PUT) does not seem to do anything either.
When I run these commands, while watching the results of "top" in the Terminal, I do not see an invocation of propeller-load. But, several of Google Chrome's processes do pump-up in activity for a moment or so.
What is the setup for the Activity Board with an S6B attached? What program should I load onto the board? I'll test that feature, next If I can figure that out. When I invoke "Send to S6B", I do see some activity in 'top'. httpd perks-up for a moment, then I get:
Binary sent
2014-04-29 21:39:43 . execute s6bww.js - sendload_s6b
2014-04-29 21:39:43 w Send and Load S6B Worker started - consoleID: 2
2014-04-29 21:39:43 w root: null
2014-04-29 21:39:43 w filesize: 76
2014-04-29 21:39:43 w chunkSize: 512
2014-04-29 21:39:43 w eepromOffset: 32768
2014-04-29 21:39:43 w delay: 500
2014-04-29 21:39:43 w sending 76 bytes from file 0 to eeprom 32768 - PUT nulleeprom/32768
2014-04-29 21:39:43 w Method Not Allowed
2014-04-29 21:39:43 w root: null
2014-04-29 21:39:43 w filesize: 76
2014-04-29 21:39:43 w eepromOffset: 32768
2014-04-29 21:39:43 w sending 0 bytes - PUT nullload/32768/76
2014-04-29 21:39:43 w Method Not Allowed
2014-04-29 21:39:43 . Worker terminated itself correctly.
EEPROM sent:
2014-04-29 21:40:33 . execute s6bww.js - sendload_s6b
2014-04-29 21:40:33 w Send and Load S6B Worker started - consoleID: 3
2014-04-29 21:40:33 w root: null
2014-04-29 21:40:33 w filesize: 32768
2014-04-29 21:40:33 w chunkSize: 512
2014-04-29 21:40:33 w eepromOffset: 32768
2014-04-29 21:40:33 w delay: 500
2014-04-29 21:40:33 w sending 512 bytes from file 0 to eeprom 32768 - PUT nulleeprom/32768
2014-04-29 21:40:33 w Method Not Allowed
2014-04-29 21:40:33 w sending 512 bytes from file 512 to eeprom 33280 - PUT nulleeprom/33280
...
... LOTS OF SIMILAR OUTPUT
...
2014-04-29 21:40:39 w Method Not Allowed
2014-04-29 21:40:39 w sending 512 bytes from file 32256 to eeprom 65024 - PUT nulleeprom/65024
2014-04-29 21:40:39 w Method Not Allowed
2014-04-29 21:40:39 w root: null
2014-04-29 21:40:39 w filesize: 32768
2014-04-29 21:40:39 w eepromOffset: 32768
2014-04-29 21:40:39 w sending 0 bytes - PUT nullload/32768/32768
2014-04-29 21:40:39 w Method Not Allowed
2014-04-29 21:40:39 . Worker terminated itself correctly.
open the debug console on Chrome and look for error messages? It seems to me that chrome is not starting the webworker.
HA. You did not open the page from the webserver (aka [URL]http://localhost:xxxx/Editor.18.htm[/URL]) where xxxx is the port provided by Michel L.'s server!
Open from the normal File System will block Chrome from accessing the other files besides the Editor18.htm.
so you need to start Michel L.'s Server via commandline:
java -jar propeller-web-loader-1.0-SNAPSHOT.jar
this should open a browser window with a URL like [URL]http://localhost:xxxx/[/URL]. in your default browser. use this url to open the editor in any browser to test...
Run RAM and Burn EEPROM should work then also.
Save... (PUT) is there to save files on a webserver supporting PUT requests. Michel L has not done that yet.
Save...(Download) should open a dialog on your MAC to ask you where to save the file, like it does when you download something from the forum or so.
Thanks Mike!
I'll bring up Chrome's debug console for future attempts!
Got that I need to actually run this from within a web server
Can't start Michel's server on Mac OS X (10.9.2) as I get:
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#4b0082]Apr 29, 2014 9:22:56 PM eu.creatingfuture.propeller.webLoader.WebLoader main[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#4b0082]WARNING: This OS is currently not supported: MacOS[/COLOR][/FONT][/COLOR]
He said that I should be able to just run it from Apache with the content of the Web content directory put into my web files directory.
Yeah, Save (PUT) does nothing as you state.
Save (DOWNLOAD) just saves to my Downloads directory as it does for other web downloads!
So, compiling works! Download works! Send to S6B may work once I figure out the prop side of that...
I'll bring up Chrome's debug console for future attempts!
Got that I need to actually run this from within a web server
Can't start Michel's server on Mac OS X (10.9.2) as I get:
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#4b0082]Apr 29, 2014 9:22:56 PM eu.creatingfuture.propeller.webLoader.WebLoader main[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#4b0082]WARNING: This OS is currently not supported: MacOS[/COLOR][/FONT][/COLOR]
He said that I should be able to just run it from Apache with the content of the Web content directory put into my web files directory.
Yeah, Save (PUT) does nothing as you state.
Save (DOWNLOAD) just saves to my Downloads directory as it does for other web downloads!
So, compiling works! Download works! Send to S6B may work once I figure out the prop side of that...
Thanks again, for all the help!
dgately
dgately,
I never said that you could run it using Apache. What I said was that you had to start my application and open the page that the embedded server serves you. Embedded server = the server inside my application.
But because of your response I went back to my code and had a look at it. In the block where I initialize depending on you os, I've forgotten a line, it actually did initialize for MacOS, but it continued with the code for when it's a not supported os.
(In technical terms; I'd forgotten the 'break' inside my switch/case).
But thats fixed now, and here's the new build. Give it a try and let me know if it works. (As previously stated, I don't have a Mac to test it on)
I never said that you could run it using Apache. What I said was that you had to start my application and open the page that the embedded server serves you. Embedded server = the server inside my application.
But because of your response I went back to my code and had a look at it. In the block where I initialize depending on you os, I've forgotten a line, it actually did initialize for MacOS, but it continued with the code for when it's a not supported os.
(In technical terms; I'd forgotten the 'break' inside my switch/case).
But thats fixed now, and here's the new build. Give it a try and let me know if it works. (As previously stated, I don't have a Mac to test it on)
Thanks Michel!
This new version gets the server up & running! Now when it starts, it opens the "http://localhost:nnnnn" page... That's good!
But, I do get errors trying to run RAM or Burn EEPROM:
Server output:
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]java -jar propeller-web-loader-1.0-SNAPSHOT.jar [/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000][main] INFO org.eclipse.jetty.server.Server - jetty-9.1.0.RC2[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000][main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /webapp, did not find org.apache.jasper.servlet.JspServlet[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000][main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@592ed60d{/webapp,file:/Users/altergator/Downloads/propeller-web-loader-1-3.0-SNAPSHOT/src/main/webapp/,AVAILABLE}[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000][main] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@6ecbd0a2{HTTP/1.1}{0.0.0.0:64853}[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Open url: http://localhost:64853[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]15956[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]16384[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]428[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Apr 30, 2014 1:12:13 AM eu.creatingfuture.propeller.webLoader.propeller.PropellerLoad loadIntoEeprom[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]SEVERE: Unexpected exit value: 1[/COLOR][/FONT][/COLOR]
Editor18.htm output in the .eeprom TAB:
2014-04-30 01:17:23 . upload to propeller-web-loader - program EEPROM
2014-04-30 01:17:23 . propeller-web-loader - 2
2014-04-30 01:17:23 . propeller-web-loader - 3
2014-04-30 01:17:23 . propeller-web-loader - 4
2014-04-30 01:17:23 . propeller-web-loader - done
2014-04-30 01:17:23 . success:false code:1
2014-04-30 01:17:23 . message:
usage: openspin
[ -h ] display this help
[ -L or -I <path> ] add a directory to the include path
[ -o <path> ] output filename
[ -b ] output binary file format
[ -e ] output eeprom file format
[ -c ] output only DAT sections
[ -d ] dump out doc mode
[ -t ] output just the object file tree
[ -f ] output a list of filenames for use in archiving
[ -q ] quiet mode (suppress banner and non-error text)
[ -v ] verbose output
[ -p ] disable the preprocessor
[ -a ] use alternative preprocessor rules
[ -D <define> ] add a define
[ -M <size> ] size of eeprom (up to 16777216 bytes)
[ -s ] dump PUB & CON symbol information for top object
<name.spin> spin file to compile
Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2013 Parallax Inc. DBA Parallax Semiconductor.
Version 1.00.70 Compiled on Mar 11 2014 09:30:36
This new version gets the server up & running! Now when it starts, it opens the "http://localhost:nnnnn" page... That's good!
But, I do get errors trying to run RAM or Burn EEPROM:
...
dgately
dgately,
I've been looking through my code on github and the paths to the executables are wrong for linux and mac. Those that should point to propeller-load actually point to openspin. I'm currently at the office, so I won't be able to create a corrected version until this evening. (in about 9 hours).
I've been looking through my code on github and the paths to the executables are wrong for linux and mac. Those that should point to propeller-load actually point to openspin. I'm currently at the office, so I won't be able to create a corrected version until this evening. (in about 9 hours).
Well, setting up & running a maven build was not so hard!
Built a new version of propeller-web-loader-1.0-SNAPSHOT.jar and Run RAM and Burn EEPROM now work correctly!
OK, so mostly the web editor/compiler/loader is working for me (Thanks, everyone here!).
S6B load is now my next effort. What do I need to have running on the Activity Board? I ran make config from xbee-loader and the S6B shows up with an IP on my gateway/router. Is that all I need for Send S6B to work?
S6B load is now my next effort. What do I need to have running on the Activity Board? I ran make config from xbee-loader and the S6B shows up with an IP on my gateway/router. Is that all I need for Send S6B to work?
Don't forget to program the xbee-server to EEPROM. It should print the IP address to use for downloads after power on reset.
The address for loading in the dialog should match of course. It's set to 10.N.N.N something in the Editor right now. Too bad that can't be automated ....
Don't forget to program the xbee-server to EEPROM. It should print the IP address to use for downloads after power on reset.
That's the part that is missing! I never get an IP back from the server, though I do know the IP because my router admin page shows me that it's 10.0.0.nn...
Could it be how I get the server onto the board?
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]$ propeller-load -e -r xbee-abserv.elf -t[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Propeller Version 1 on /dev/cu.usbserial-DAWIJ6AJ[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Loading xbee-abserv.elf to EEPROM via hub memory[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]11004 bytes sent [/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Verifying RAM ... OK[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Programming EEPROM ... OK[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Verifying EEPROM ... OK[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000][ Entering terminal mode. Type ESC or Control-C to exit. ][/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Starting frame driver[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Getting our IP address[/COLOR][/FONT][/COLOR]
[COLOR=#000000][FONT=Monaco]Listening for frames[/FONT][/COLOR]
I've also tried side server.side from SimpleIDE, but get the same basic result in the SimpleIDE console:
Starting frame driver
Getting our IP address
Listening for frames
Well, setting up & running a maven build was not so hard!
Built a new version of propeller-web-loader-1.0-SNAPSHOT.jar and Run RAM and Burn EEPROM now work correctly!
OK, so mostly the web editor/compiler/loader is working for me (Thanks, everyone here!).
S6B load is now my next effort. What do I need to have running on the Activity Board? I ran make config from xbee-loader and the S6B shows up with an IP on my gateway/router. Is that all I need for Send S6B to work?
dgately
Nice, congrats. For the others I've made a new build.
Now I'm going to work a bit on the system to provide a working directory.
That's the part that is missing! I never get an IP back from the server, though I do know the IP because my router admin page shows me that it's 10.0.0.nn...
Looks like the server was loaded correctly.
Can you re-run xbee-config and post the output here? xbee-config must successfully obtain an IP address.
Can you re-run xbee-config and post the output here? xbee-config must successfully obtain an IP address.
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]$ make config[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Propeller Version 1 on /dev/cu.usbserial-DAWIJ6AJ[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Loading xbee-config.elf to hub memory[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]12264 bytes sent [/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Verifying RAM ... OK[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000][ Entering terminal mode. Type ESC or Control-C to exit. ][/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Encryption type (none, wep, wpa, or wpa2)? wpa2[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]SSID? [I]myWirelessSSID[/I][/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Password? [I]mySSIDPassword[/I][/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Entering AT command mode[/COLOR][/FONT][/COLOR]
It stops there and after several minutes of waiting, I type ESC to end the process else nothing else ever happens. No IP is given. Is there a way to get more verbose output?
Is it possible that my S6B is miss-configured and needs to be reset to factory defaults?
EDIT-- I just noticed that the xbee-config.c source defines "#define XBEE_RTS 11", while David's README only states that DI & DO need to be wired. Could that be the problem? I'll wire-up RTS and test again...
EDIT2-- With RTS wired, I get:
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]$ make config[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Propeller Version 1 on /dev/cu.usbserial-DAWIJ6AJ[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Loading xbee-config.elf to hub memory[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]12264 bytes sent [/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Verifying RAM ... OK[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000][ Entering terminal mode. Type ESC or Control-C to exit. ][/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Encryption type (none, wep, wpa, or wpa2)? wpa2[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]SSID? [/COLOR][/FONT][/COLOR][I]myWirelessSSID[/I]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Password? [/COLOR][/FONT][/COLOR][I]mySSIDPassword[/I]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Entering AT command mode[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 00 00 D0 7E 00 02 8A 02 73 7E 00 02 8A 0E 67 4F 4B 0D[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got ''[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]failed to enter AT command mode[/COLOR][/FONT][/COLOR]
Looks like EDIT3 got somewhere. Strange that it's so unruly. The only time I had such trouble was given a conflict on the pins ...
I have RTS connected on my bot. I also use P7,8,9. P12+ are not the best choice for a bot with the encoders and servos connected - I wasted half a day on that once.
Looks like EDIT3 got somewhere. Strange that it's so unruly. The only time I had such trouble was given a conflict on the pins ...
I have RTS connected on my bot. I also use P7,8,9. P12+ are not the best choice for a bot with the encoders and servos connected - I wasted half a day on that once.
ARG! When I switched between my Activity Board and my Activity Bot, I forgot about pins 12 & 13 (a bonehead move on my part)...
Trying again...
OK, here's all of the "important" log stuff that I get, but I still cannot load the EEPROM or RAM via S6B:
make config (never gives me an IP, but says "Configuration Successful!"):
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]$ java -jar propeller-web-loader-1.0-SNAPSHOT.jrr[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000][main] INFO org.eclipse.jetty.server.Server - jetty-9.1.0.RC2[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000][main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /webapp, did not find org.apache.jasper.servlet.JspServlet[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000][main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@5c2f925d{/webapp,file:/Users/altergator/Downloads/propeller-web-loader-1-3.0-SNAPSHOT/src/main/webapp/,AVAILABLE}[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000][main] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@12768ace{HTTP/1.1}{0.0.0.0:54702}[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Open url: http://localhost:54702[/COLOR][/FONT][/COLOR]
[COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]76[/COLOR][/FONT][/COLOR]
Nice, congrats. For the others I've made a new build.
Now I'm going to work a bit on the system to provide a working directory.
Hi Michel L.
good work on supporting Mac's.
Maybe I am confused (and misunderstand you), or you are. As far as I am concerned your directory support is already done and working. Even with subdirectories of '/' (webcontent/). What you are missing with your server is supporting write (PUT) requests to the server side File System. (and MAYBE a added header on every response stating 'Access-Control-Allow-Origin: *' to allow CORS requests originating from other servers/XMLhttp requests)
@Heater.'s Node Server was missing directory support, but he added some and I am on my way to support this also. Unfortunately I am still not able to run @Heater.'s Version local since he never really published one, yet. And he is missing that header also so I am not able to access his server from a Editor running on my server. We will get there.
All of you CAN access all files on my server via CORS but there is no write access allowed, since it is a placeholder for a Parallax hosted 'central' Library. see http://parallax.msrobots.net/Library/
But I am currently refactoring the Editor, testing the abilities of the spinneret-msrobots driver to deliver more then one file at a time without chocking.
I guess I might be able to at least separate htm, css and js into 3 different files, and the spinneret webserver can still keep up with the parallel requests from the browser.
The only reason I keep all stuff in Edditorxx.htm is the spinneret and this guy is the main reason I am dong this at all.
So the basic goal is to support as much as different web-server solutions as possible, but include the spinneret. Even with short filenames.
I am currently reworking the spinneret code also. It may provide the same service (interface?) as you do at /webapp/propeller.action?xxx, Not sure if I can do that...
IMHO it would be nice if BlockyProp and the editor/compiler/loader I am building here could use the same server interfaces and deployment options.
You are already doing your part there very well with your Java Server, me and @Heater. have to do some work to catch up. We will see.
Maybe I am confused (and misunderstand you), or you are. As far as I am concerned your directory support is already done and working. Even with subdirectories of '/' (webcontent/). What you are missing with your server is supporting write (PUT) requests to the server side File System. (and MAYBE a added header on every response stating 'Access-Control-Allow-Origin: *' to allow CORS requests originating from other servers/XMLhttp requests)
...
Back to work!
Enjoy!
Mike
Mike, I've been working on the propeller-web-loader yesterday evening and today. I've not touched your javascript code, so, you'll have to implement it yourself.
Whats new:
I've added the cross origin header to all functions.
I added another servlet, mapped under: '/webapp/workingdirectory.action': Get gives you a directory listing, while put permits you to write to the disk using the same url as the get request.
The path from the workingdirectory is set using the parameter 'path'.
The working directory is now set when you start the server. If you get a listing from the get method, you won't be able to go outside that directory. If you click cancel when selecting the working directory, the users home directory will be used.
I didn't want to allow you to write inside the webcontent directory for a couple reasons:
I don't have any control over the serving of those files. I just added a simple resource handler for this directory:
ResourceHandler webcontentHandler = new ResourceHandler();
webcontentHandler.setDirectoriesListed(true);
webcontentHandler.setWelcomeFiles(new String[]{"index.html"});
webcontentHandler.setResourceBase("./webcontent");
As far as I found I can't enable the put action for these, nor add headers.
A second reason is because want to keep the code from the users outside the application directory. Otherwise you could lose all your code if you don't take caution when getting a new version.
I hope everything works as expected, if you want any changes, just let me know.
great work. I have some playtime right now and am looking thru the things you have done in between. Gosh you are quite busy in PropellerWorld.
I really like your scribbler demo thing. Had to play with. It is very cool. I feel more and more ashamed of the visual look of the Editor Project.
As far as I found I can't enable the put action for these, nor add headers.
This is sad as we - sort of - waste a complete webserver. But it is just a deployment container anyways.
A second reason is because want to keep the code from the users outside the application directory. Otherwise you could lose all your code if you don't take caution when getting a new version.
I had to think about it for a while, and can agree with your reason.
So I will tread '/' as the root of the working directory and replace access to the original root '/' in the Editor for PUT and GET by /webapp/workingdirectory.action?path=/' in case of the Editor being started from your Java Server.
I already tried GET and PUT with your working directory in the Editor and it works just fine, loading and saving. Perfect.
This is a quite cool access to the local File System. Thanks @Michel L. It makes fun to work along wit you.
So no changes needed there, I can assimilate that. (already working more or less)
You do know that the whole CORS (cross origin blabla) is just a issue within JavaScript inside of a browser using XMLhttprequests, right?
So - could you maybe provide a simple xxx.action doing a GET request to a provided URL and simply return the resulting response? Maybe even POST?
For example:
I can open any file from within my JavaScript XMLhttprequest from my OWN domain, or from servers explicitly allowing CORS. If not, not.
So no access to the OBEX. NO raw.gitub.com. no www.google.com?q=xxx. Not from within the browser in JavaScript using XMLhttprequest.
BUT your Java Server has no problems to do a request to www.google.com and get a result. The whole CORS thing just applies to BROWSERS.
Would you, could you, may you provide something like this ?
You can call webrequest.action also as a post request. It will still do a get request to the desired page, but you don't have to put the request url in the url. But instead you can put in in the parameters.
Sadly, Google doesn't like requests from anything else then browsers. And my webrequest code doesn't work. As a fix I've included a reverse proxy servlet.
I could use the reverse proxy for everything, but I have to configure each domain on it's own. So, unless you have another request that doesn't work with the webrequest.action, I won't add any other domains.
I have implemented the working directory as File System '/' now and tested it. works nicely.
Even if I not yet have implemented your webrequest feature I package the editor with your zip from above.
Now the editor is fully workable, access to working directory does load and save and provides also access to files needed while compiling.
You can call the editor with a parameter containing path/filename of a file to be opened as in ...Editor19.htm?a=/path/myfile.spin if you need to call the editor from some other page...
As before the Editor does not NEED to be run from @Michel L.'s server, it will run from any webserver, in case of windows and IE even without webserver. But load RAM and burn EEPROM just work if started inside of the Java Server from @Michel L.
But if run from this server, it will detect that and use your working directory instead of the real '/'.
Since I am still behind implementing my last request to you, I am sort of shy to ask for another one. (But I have some on my list...)
Comments
The HTTP spec. calls for a "content-type" field in the header to describe the format of the data in the body. See section 7.2.1
We can return a JSON object describing a directory and just set the mime type to "application/json" in the HTTP header.
This is a very normal practice.
If you want a nicely formatted HTML listing for reading in a web page and a convenient JSON listing for use by javascript then one can do "content negotiation" with the "accept" header field. Browsers will ask for "text/html", your javascript code on the page will ask for "application/json"
https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation
If you could provide me with the Mac versions of openspin and propeller-load I can add them to the server and write the code that uses them. It doesn't use installed versions but it provides it's own executables.
I don't have a Mac, so if I write the code for it, it will be untested.
Michel Lampo
openspin-propeller-load.zip
You can definitely try!
dgately
I've added the MacOS versions of the binaries you provided, as well as the code that uses them. Can you give this a try and let me know if it works?
On linux you have to make the binaries executable before it works. There's a good chance the same is required on Mac. They're located in 'propeller-tools/mac'.
openspin-propeller-load.zip
Tried this...
Test #1
1. Made the binaries executable (chmod 751 openspin; chmod 751 propeller-load)
2. Opened "Editor18.htm" in the web content directory (opened in Safari by default)
3. I could load a .spin file, but none of the buttons resulted in any built binary or eeprom (kind of expected that)
Test#2
1. Opened "Editor18.htm" in Google Chrome web browser
2. I could load a .spin file, but building binary or eeprom results in new tabs, but no logging to let me know of success
3. Tried "Run RAM" & "Burn EEPROM", nothing happens (no log, no activity from Activity Board)
4. Tried "Save Result (DOWNLOAD) on both binary & eeprom TABs, nothing happens, no files are saved to my file system
5. Tried "Save Result (PUT) on both binary & eeprom TABs, get the following Alert:
Test#3
1. Opened "Editor18.htm" in FireFox web browser
2. I could load a .spin file!
3. Built an eeprom file with success!
4. Built a binary file with success!
5. Tried "Run RAM" on binary, nothing happens (no log, no activity from Activity Board)
6. Tried "Burn EEPROM" on eeprom, nothing happens (no log, no activity from Activity Board)
7. Tried "Save Result (DOWNLOAD) on both binary & eeprom TABs, nothing happens, no files are saved to my file system
8. Tried "Save Result (PUT) on both binary & eeprom TABs, get the following error dialog:
Have not yet tried "Send to S6B" as I'm not sure what I need to have loaded and configured on the Activity Board (I do have the WiFi module, so am open to trying).
So, looks like FireFox allows the compile process to success (at some level) on Mac OS X! Good news!
Chrome may also allow building, but there's no log to tell if the build was a success (new TAB shows up for binary & eeprom, so it's possible that there was a good build)
Looks like there are issues with loading to RAM or EEPROM on Mac OS X (no logs that I could see, so I'm unsure what happens) on all browsers that I tried.
=EDIT=
WebKit (Safari's core) actually gets a crash when I attempt to "Save Result (DOWNLOAD)"
And, gets an Alert when I try to "Save Result (PUT)" on binary and eeprom TABs
Thanks for working on this,
dgately
dgately,
don't forget that to use Load RAM or Load Eeprom, you need to start the java server and use the editor served by the embedded server. In your screenshot I can see that you opened: file://. It should be [url]http://localhost:xxxxx[/url]
it is a start. No clue why chrome on Mac does not work. It does on windows. can you open the debug console on Chrome and look for error messages? It seems to me that chrome is not starting the webworker.
HA. You did not open the page from the webserver (aka [URL]http://localhost:xxxx/Editor.18.htm[/URL]) where xxxx is the port provided by Michel L.'s server!
Open from the normal File System will block Chrome from accessing the other files besides the Editor18.htm.
so you need to start Michel L.'s Server via commandline:
java -jar propeller-web-loader-1.0-SNAPSHOT.jar
this should open a browser window with a URL like [URL]http://localhost:xxxx/[/URL]. in your default browser. use this url to open the editor in any browser to test...
Run RAM and Burn EEPROM should work then also.
Save... (PUT) is there to save files on a webserver supporting PUT requests. Michel L has not done that yet.
Save...(Download) should open a dialog on your MAC to ask you where to save the file, like it does when you download something from the forum or so.
Enjoy!
Mike
Arg! Of course...
So, I started up Apache and loaded "http://localhost/Editor18.htm" into FireFox. Got basically the same results as before...
Then, I loaded "http://localhost/Editor18.htm" into Google Chrome. I compile my .spin file to binary & eeprom files/TABS. AND, I'm able to "Save Result (DOWNLOAD)" with success! (yay!) Run RAM/Burn EEPROM don't do anything that I can see to the Activity Board. Save Result (PUT) does not seem to do anything either.
Log for Run RAM:
Log for Burn EEPROM:
When I run these commands, while watching the results of "top" in the Terminal, I do not see an invocation of propeller-load. But, several of Google Chrome's processes do pump-up in activity for a moment or so.
What is the setup for the Activity Board with an S6B attached? What program should I load onto the board? I'll test that feature, next If I can figure that out. When I invoke "Send to S6B", I do see some activity in 'top'. httpd perks-up for a moment, then I get:
Binary sent
EEPROM sent:
I hope this helps!
dgately
Thanks Mike!
I'll bring up Chrome's debug console for future attempts!
Got that I need to actually run this from within a web server
Can't start Michel's server on Mac OS X (10.9.2) as I get:
He said that I should be able to just run it from Apache with the content of the Web content directory put into my web files directory.
Yeah, Save (PUT) does nothing as you state.
Save (DOWNLOAD) just saves to my Downloads directory as it does for other web downloads!
So, compiling works! Download works! Send to S6B may work once I figure out the prop side of that...
Thanks again, for all the help!
dgately
dgately,
I never said that you could run it using Apache. What I said was that you had to start my application and open the page that the embedded server serves you. Embedded server = the server inside my application.
But because of your response I went back to my code and had a look at it. In the block where I initialize depending on you os, I've forgotten a line, it actually did initialize for MacOS, but it continued with the code for when it's a not supported os.
(In technical terms; I'd forgotten the 'break' inside my switch/case).
But thats fixed now, and here's the new build. Give it a try and let me know if it works. (As previously stated, I don't have a Mac to test it on)
Thanks Michel!
This new version gets the server up & running! Now when it starts, it opens the "http://localhost:nnnnn" page... That's good!
But, I do get errors trying to run RAM or Burn EEPROM:
Server output:
Editor18.htm output in the .eeprom TAB:
dgately
dgately,
I've been looking through my code on github and the paths to the executables are wrong for linux and mac. Those that should point to propeller-load actually point to openspin. I'm currently at the office, so I won't be able to create a corrected version until this evening. (in about 9 hours).
If you know how to build a maven project you could build a version for yourself, you'll have to edit this file: https://github.com/michel-cf/propeller-web-loader/blob/master/src/main/java/eu/creatingfuture/propeller/webLoader/propeller/MacPropellerLoad.java
Michel
Thanks Michel!
I can wait as I am not familiar with maven and would probably spend much more than 9 hours getting a build done
dgately
Built a new version of propeller-web-loader-1.0-SNAPSHOT.jar and Run RAM and Burn EEPROM now work correctly!
OK, so mostly the web editor/compiler/loader is working for me (Thanks, everyone here!).
S6B load is now my next effort. What do I need to have running on the Activity Board? I ran make config from xbee-loader and the S6B shows up with an IP on my gateway/router. Is that all I need for Send S6B to work?
dgately
Don't forget to program the xbee-server to EEPROM. It should print the IP address to use for downloads after power on reset.
The address for loading in the dialog should match of course. It's set to 10.N.N.N something in the Editor right now. Too bad that can't be automated ....
That's the part that is missing! I never get an IP back from the server, though I do know the IP because my router admin page shows me that it's 10.0.0.nn...
Could it be how I get the server onto the board?
I've also tried side server.side from SimpleIDE, but get the same basic result in the SimpleIDE console:
dgately
Nice, congrats. For the others I've made a new build.
Now I'm going to work a bit on the system to provide a working directory.
Looks like the server was loaded correctly.
Can you re-run xbee-config and post the output here? xbee-config must successfully obtain an IP address.
It stops there and after several minutes of waiting, I type ESC to end the process else nothing else ever happens. No IP is given. Is there a way to get more verbose output?
Is it possible that my S6B is miss-configured and needs to be reset to factory defaults?
EDIT-- I just noticed that the xbee-config.c source defines "#define XBEE_RTS 11", while David's README only states that DI & DO need to be wired. Could that be the problem? I'll wire-up RTS and test again...
EDIT2-- With RTS wired, I get:
EDIT3-- Tried once more and got:
dgately[/COLOR]
Looks like EDIT3 got somewhere. Strange that it's so unruly. The only time I had such trouble was given a conflict on the pins ...
I have RTS connected on my bot. I also use P7,8,9. P12+ are not the best choice for a bot with the encoders and servos connected - I wasted half a day on that once.
ARG! When I switched between my Activity Board and my Activity Bot, I forgot about pins 12 & 13 (a bonehead move on my part)...
Trying again...
OK, here's all of the "important" log stuff that I get, but I still cannot load the EEPROM or RAM via S6B:
make config (never gives me an IP, but says "Configuration Successful!"):
The server:
Compile of my simple .spin file:
Send to S6B (I happen to know that this S6B has an IP of: 10.0.0.44, because my router tells me):
dgately
What is the output of the Activity Board (xbee-server) when it boots?
thanks for chiming in here. I do not have any of those SB6 modules, so I would have been helpless on those questions from Dennis.
Hi Michel L.
good work on supporting Mac's.
Maybe I am confused (and misunderstand you), or you are. As far as I am concerned your directory support is already done and working. Even with subdirectories of '/' (webcontent/). What you are missing with your server is supporting write (PUT) requests to the server side File System. (and MAYBE a added header on every response stating 'Access-Control-Allow-Origin: *' to allow CORS requests originating from other servers/XMLhttp requests)
@Heater.'s Node Server was missing directory support, but he added some and I am on my way to support this also. Unfortunately I am still not able to run @Heater.'s Version local since he never really published one, yet. And he is missing that header also so I am not able to access his server from a Editor running on my server. We will get there.
All of you CAN access all files on my server via CORS but there is no write access allowed, since it is a placeholder for a Parallax hosted 'central' Library. see http://parallax.msrobots.net/Library/
But I am currently refactoring the Editor, testing the abilities of the spinneret-msrobots driver to deliver more then one file at a time without chocking.
I guess I might be able to at least separate htm, css and js into 3 different files, and the spinneret webserver can still keep up with the parallel requests from the browser.
The only reason I keep all stuff in Edditorxx.htm is the spinneret and this guy is the main reason I am dong this at all.
So the basic goal is to support as much as different web-server solutions as possible, but include the spinneret. Even with short filenames.
I am currently reworking the spinneret code also. It may provide the same service (interface?) as you do at /webapp/propeller.action?xxx, Not sure if I can do that...
IMHO it would be nice if BlockyProp and the editor/compiler/loader I am building here could use the same server interfaces and deployment options.
You are already doing your part there very well with your Java Server, me and @Heater. have to do some work to catch up. We will see.
Back to work!
Enjoy!
Mike
Hmm... Maybe I'm mistaken on the complete configuration of software for this process.
After running the "make config" command, do I also run xbee-server.elf on the Activity Board?
Dennis
Follow the address example in the Editor dialog.
Mike, I've been working on the propeller-web-loader yesterday evening and today. I've not touched your javascript code, so, you'll have to implement it yourself.
Whats new:
I've added the cross origin header to all functions.
I added another servlet, mapped under: '/webapp/workingdirectory.action': Get gives you a directory listing, while put permits you to write to the disk using the same url as the get request.
The path from the workingdirectory is set using the parameter 'path'.
The working directory is now set when you start the server. If you get a listing from the get method, you won't be able to go outside that directory. If you click cancel when selecting the working directory, the users home directory will be used.
I didn't want to allow you to write inside the webcontent directory for a couple reasons:
I don't have any control over the serving of those files. I just added a simple resource handler for this directory: As far as I found I can't enable the put action for these, nor add headers.
A second reason is because want to keep the code from the users outside the application directory. Otherwise you could lose all your code if you don't take caution when getting a new version.
I hope everything works as expected, if you want any changes, just let me know.
Michel
great work. I have some playtime right now and am looking thru the things you have done in between. Gosh you are quite busy in PropellerWorld.
I really like your scribbler demo thing. Had to play with. It is very cool. I feel more and more ashamed of the visual look of the Editor Project.
This is sad as we - sort of - waste a complete webserver. But it is just a deployment container anyways.
I had to think about it for a while, and can agree with your reason.
So I will tread '/' as the root of the working directory and replace access to the original root '/' in the Editor for PUT and GET by /webapp/workingdirectory.action?path=/' in case of the Editor being started from your Java Server.
I already tried GET and PUT with your working directory in the Editor and it works just fine, loading and saving. Perfect.
This is a quite cool access to the local File System. Thanks @Michel L. It makes fun to work along wit you.
So no changes needed there, I can assimilate that. (already working more or less)
You do know that the whole CORS (cross origin blabla) is just a issue within JavaScript inside of a browser using XMLhttprequests, right?
So - could you maybe provide a simple xxx.action doing a GET request to a provided URL and simply return the resulting response? Maybe even POST?
For example:
I can open any file from within my JavaScript XMLhttprequest from my OWN domain, or from servers explicitly allowing CORS. If not, not.
So no access to the OBEX. NO raw.gitub.com. no www.google.com?q=xxx. Not from within the browser in JavaScript using XMLhttprequest.
BUT your Java Server has no problems to do a request to www.google.com and get a result. The whole CORS thing just applies to BROWSERS.
Would you, could you, may you provide something like this ?
/webapp/webrequest.action?get=http://www.google.com&q=blabla
or
/webapp/webrequest.action?get=http://www.raw.github.com?xxxxx
and just return the resulting response ?
This would open up the whole web as file System...
Anyways, Thanks again.
I will play now fore some hours and report back.
yay - Propeller Time !
Enjoy!
Mike
as requested, i've added a webrequest servlet:
You can call webrequest.action also as a post request. It will still do a get request to the desired page, but you don't have to put the request url in the url. But instead you can put in in the parameters.
Sadly, Google doesn't like requests from anything else then browsers. And my webrequest code doesn't work. As a fix I've included a reverse proxy servlet.
I could use the reverse proxy for everything, but I have to configure each domain on it's own. So, unless you have another request that doesn't work with the webrequest.action, I won't add any other domains.
Any other requests?
Michel
You are way to fast for me.
I have implemented the working directory as File System '/' now and tested it. works nicely.
Even if I not yet have implemented your webrequest feature I package the editor with your zip from above.
Now the editor is fully workable, access to working directory does load and save and provides also access to files needed while compiling.
You can call the editor with a parameter containing path/filename of a file to be opened as in ...Editor19.htm?a=/path/myfile.spin if you need to call the editor from some other page...
As before the Editor does not NEED to be run from @Michel L.'s server, it will run from any webserver, in case of windows and IE even without webserver. But load RAM and burn EEPROM just work if started inside of the Java Server from @Michel L.
But if run from this server, it will detect that and use your working directory instead of the real '/'.
Since I am still behind implementing my last request to you, I am sort of shy to ask for another one. (But I have some on my list...)
Enjoy!
Mike
lol
Trying to create a cliffhanger? You make me curious. I've yet to find something to do this weekend, so I welcome a challenge.
Michel