Shop OBEX P1 Docs P2 Docs Learn Events
A Propeller-WebTool Framework for Compiled Languages? - Page 20 — Parallax Forums

A Propeller-WebTool Framework for Compiled Languages?

11516171820

Comments

  • Heater.Heater. Posts: 21,230
    edited 2014-04-29 01:19
    msrobots,
    Just stay close to RFC 2616.
    Exactly.

    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
  • Michel LMichel L Posts: 141
    edited 2014-04-29 02:00
    dgately wrote: »
    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.

    Michel Lampo
  • dgatelydgately Posts: 1,630
    edited 2014-04-29 10:18
    Michel L wrote: »
    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
  • Michel LMichel L Posts: 141
    edited 2014-04-29 11:54
    dgately wrote: »

    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
  • dgatelydgately Posts: 1,630
    edited 2014-04-29 13:05
    Michel L wrote: »
    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:

    SaveResultAlertChrome.png



    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:

    SaveResultEEPROM.jpg


    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

    SafariAlertOnPUT.png




    Thanks for working on this,
    dgately
    1024 x 387 - 50K
    465 x 179 - 31K
    420 x 154 - 30K
  • Michel LMichel L Posts: 141
    edited 2014-04-29 13:24
    dgately wrote: »
    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:

    SaveResultAlertChrome.png



    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:

    SaveResultEEPROM.jpg


    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

    SafariAlertOnPUT.png




    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]
  • msrobotsmsrobots Posts: 3,709
    edited 2014-04-29 13:36
    OK,

    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
  • dgatelydgately Posts: 1,630
    edited 2014-04-29 21:42
    Michel L wrote: »
    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]

    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:
    2014-04-29 21:33:40 . upload to propeller-web-loader - load RAM
    2014-04-29 21:33:40 . propeller-web-loader - 2
    2014-04-29 21:33:40 . propeller-web-loader - 3
    2014-04-29 21:33:40 . propeller-web-loader - 4
    

    Log for Burn EEPROM:
    2014-04-29 21:34:18 . upload to propeller-web-loader - program EEPROM
    2014-04-29 21:34:18 . propeller-web-loader - 2
    2014-04-29 21:34:18 . propeller-web-loader - 3
    2014-04-29 21:34:18 . propeller-web-loader - 4
    
    

    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.
    


    I hope this helps!

    dgately
  • dgatelydgately Posts: 1,630
    edited 2014-04-29 21:49
    msrobots wrote: »
    OK,

    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 :innocent:

    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
  • Michel LMichel L Posts: 141
    edited 2014-04-29 23:14
    dgately wrote: »
    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 :innocent:

    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)
  • dgatelydgately Posts: 1,630
    edited 2014-04-30 01:24
    Michel L wrote: »
    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:
    [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
    

    dgately
  • Michel LMichel L Posts: 141
    edited 2014-04-30 01:44
    dgately wrote: »
    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:

    ...

    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
  • dgatelydgately Posts: 1,630
    edited 2014-04-30 09:06
    Michel L wrote: »
    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 :smile:


    dgately
  • dgatelydgately Posts: 1,630
    edited 2014-04-30 09:50
    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
  • jazzedjazzed Posts: 11,803
    edited 2014-04-30 10:03
    dgately wrote: »
    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 ....
  • dgatelydgately Posts: 1,630
    edited 2014-04-30 10:45
    jazzed wrote: »
    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
    

    dgately
  • Michel LMichel L Posts: 141
    edited 2014-04-30 11:00
    dgately wrote: »
    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.
  • jazzedjazzed Posts: 11,803
    edited 2014-04-30 11:01
    dgately wrote: »
    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.
  • dgatelydgately Posts: 1,630
    edited 2014-04-30 13:57
    jazzed wrote: »
    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.
    [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]
    

    EDIT3-- Tried once more and got:
    [COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]$ make config[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Propeller Version 1 on /dev/cu.usbserial-DAWIJ6AJ[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Loading xbee-config.elf to hub memory[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]12264 bytes sent                  [/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Verifying RAM ... OK[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000][ Entering terminal mode. Type ESC or Control-C to exit. ][/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Encryption type (none, wep, wpa, or wpa2)? wpa2[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]SSID? [I]myWirelessSSID[/I][/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Password? [I]mySSIDPassword[/I][/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Entering AT command mode[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 4F 4B 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'OK'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Set SSID[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 4F 4B 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'OK'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Disable Soft AP mode[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 4F 4B 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'OK'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Set password[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 4F 4B 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'OK'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Set encryption mode[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 4F 4B 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'OK'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Disable device cloud[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 4F 4B 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'OK'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Set port[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 4F 4B 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'OK'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Set TCP mode[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 4F 4B 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'OK'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Enable RTS[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 4F 4B 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'OK'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Activate settings[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 4F 4B 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'OK'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Connect to AP[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 34 32 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got '42'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]  waiting...[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 34 32 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got '42'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]  waiting...[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 46 46 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'FF'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]  waiting...[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 46 46 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'FF'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]  waiting...[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 46 46 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'FF'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]  waiting...[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 46 46 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'FF'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]  waiting...[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 34 31 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got '41'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]  waiting...[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 34 31 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got '41'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]  waiting...[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 34 31 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got '41'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]  waiting...[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 30 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got '0'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Set API mode[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 4F 4B 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'OK'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Write settings[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 4F 4B 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'OK'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Exit command mode[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] 4F 4B 0D[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000] got 'OK'[/COLOR][/FONT][/COLOR]
    [COLOR=#000000][/COLOR][COLOR=#F5F6C7][FONT=Monaco][COLOR=#000000]Configuration successful![/COLOR][/FONT][/COLOR]
    [COLOR=#000000]
    

    dgately[/COLOR]
  • jazzedjazzed Posts: 11,803
    edited 2014-04-30 15:18
    Hi Dennis,

    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.
  • dgatelydgately Posts: 1,630
    edited 2014-04-30 16:23
    jazzed wrote: »
    Hi Dennis,

    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!"):
    [FONT=Monaco]$ make config[/FONT]
    [FONT=Monaco]Propeller Version 1 on /dev/cu.usbserial-DAWSSR65[/FONT]
    [FONT=Monaco]Loading xbee-config.elf to hub memory[/FONT]
    [FONT=Monaco]12248 bytes sent                  [/FONT]
    [FONT=Monaco]Verifying RAM ... OK[/FONT]
    [FONT=Monaco][ Entering terminal mode. Type ESC or Control-C to exit. ][/FONT]
    [FONT=Monaco]Encryption type (none, wep, wpa, or wpa2)? wpa2[/FONT]
    [FONT=Monaco]SSID? mySSIDName[/FONT]
    [FONT=Monaco]Password? mySSIDPassword[/FONT]
    [FONT=Monaco]Entering AT command mode[/FONT]
    [FONT=Monaco] 4F 4B 0D[/FONT]
    [FONT=Monaco] got 'OK'[/FONT]
    [FONT=Monaco]Set SSID[/FONT]
    [FONT=Monaco] 4F 4B 0D[/FONT]
    [FONT=Monaco] got 'OK'[/FONT]
    [FONT=Monaco]Disable Soft AP mode[/FONT]
    [FONT=Monaco] 4F 4B 0D[/FONT]
    [FONT=Monaco] got 'OK'[/FONT]
    [FONT=Monaco]Set password[/FONT]
    [FONT=Monaco] 4F 4B 0D[/FONT]
    [FONT=Monaco] got 'OK'[/FONT]
    [FONT=Monaco]Set encryption mode[/FONT]
    [FONT=Monaco] 4F 4B 0D[/FONT]
    [FONT=Monaco] got 'OK'[/FONT]
    [FONT=Monaco]Disable device cloud[/FONT]
    [FONT=Monaco] 4F 4B 0D[/FONT]
    [FONT=Monaco] got 'OK'[/FONT]
    [FONT=Monaco]Set port[/FONT]
    [FONT=Monaco] 4F 4B 0D[/FONT]
    [FONT=Monaco] got 'OK'[/FONT]
    [FONT=Monaco]Set TCP mode[/FONT]
    [FONT=Monaco] 4F 4B 0D[/FONT]
    [FONT=Monaco] got 'OK'[/FONT]
    [FONT=Monaco]Enable RTS[/FONT]
    [FONT=Monaco] 4F 4B 0D[/FONT]
    [FONT=Monaco] got 'OK'[/FONT]
    [FONT=Monaco]Activate settings[/FONT]
    [FONT=Monaco] 4F 4B 0D[/FONT]
    [FONT=Monaco] got 'OK'[/FONT]
    [FONT=Monaco]Connect to AP[/FONT]
    [FONT=Monaco] 46 46 0D[/FONT]
    [FONT=Monaco] got 'FF'[/FONT]
    [FONT=Monaco]  waiting...[/FONT]
    [FONT=Monaco] 46 46 0D[/FONT]
    [FONT=Monaco] got 'FF'[/FONT]
    [FONT=Monaco]  waiting...[/FONT]
    [FONT=Monaco] 46 46 0D[/FONT]
    [FONT=Monaco] got 'FF'[/FONT]
    [FONT=Monaco]  waiting...[/FONT]
    [FONT=Monaco] 46 46 0D[/FONT]
    [FONT=Monaco] got 'FF'[/FONT]
    [FONT=Monaco]  waiting...[/FONT]
    [FONT=Monaco] 34 31 0D[/FONT]
    [FONT=Monaco] got '41'[/FONT]
    [FONT=Monaco]  waiting...[/FONT]
    [FONT=Monaco] 34 31 0D[/FONT]
    [FONT=Monaco] got '41'[/FONT]
    [FONT=Monaco]  waiting...[/FONT]
    [FONT=Monaco] 34 31 0D[/FONT]
    [FONT=Monaco] got '41'[/FONT]
    [FONT=Monaco]  waiting...[/FONT]
    [FONT=Monaco] 30 0D[/FONT]
    [FONT=Monaco] got '0'[/FONT]
    [FONT=Monaco]Set API mode[/FONT]
    [FONT=Monaco] 4F 4B 0D[/FONT]
    [FONT=Monaco] got 'OK'[/FONT]
    [FONT=Monaco]Write settings[/FONT]
    [FONT=Monaco] 4F 4B 0D[/FONT]
    [FONT=Monaco] got 'OK'[/FONT]
    [FONT=Monaco]Exit command mode[/FONT]
    [FONT=Monaco] 4F 4B 0D[/FONT]
    [FONT=Monaco] got 'OK'[/FONT]
    [FONT=Monaco]Configuration successful!&#8203;[/FONT]
    

    The server:
    [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]
    

    Compile of my simple .spin file:
    2014-04-30 16:15:09 . execute openspww.js calling: openspin.js -e -v LEDOnOff1.spin...
    2014-04-30 16:15:09 w Worker started - consoleID: 3
    2014-04-30 16:15:09 w OpenSpin run time env. created.
    2014-04-30 16:15:09 . now adding files...
    2014-04-30 16:15:09 . parsing LEDOnOff1.spin ... 
    2014-04-30 16:15:09 . finished all parsing. calling compiler.
    2014-04-30 16:15:09 w Writing LEDOnOff1.spin to MemFS.
    2014-04-30 16:15:09 w Running openspin main
    2014-04-30 16:15:09 + Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2013 Parallax Inc. DBA Parallax Semiconductor.
    2014-04-30 16:15:09 + Compiled on Mar  6 2014 19:58:09
    2014-04-30 16:15:09 + Compiling...
    2014-04-30 16:15:09 + LEDOnOff1.spin
    2014-04-30 16:15:09 + Done.
    2014-04-30 16:15:09 + Program size is 32768 bytes
    2014-04-30 16:15:09 + TYPE: 43   VALUE: 00000408 (00000000)   NAME: _CLKMODE
    2014-04-30 16:15:09 + TYPE: 43   VALUE: 004C4B40 (00000000)   NAME: _XINFREQ
    2014-04-30 16:15:09 + TYPE: 53   VALUE: 00000001 (00000004)   NAME: LEDONOFF
    2014-04-30 16:15:09 + 
    2014-04-30 16:15:09 + Distilled longs: 0
    2014-04-30 16:15:09 + 
    2014-04-30 16:15:09 + OBJ bytes: 100
    2014-04-30 16:15:09 + 
    2014-04-30 16:15:09 + _CLKMODE: 6F
    2014-04-30 16:15:09 + _CLKFREQ: 04C4B400
    2014-04-30 16:15:09 + 
    2014-04-30 16:15:09 + 0000- 00 00 3C 00 3C 00 02 00 08 00 00 00 37 21 38 1A   ..<.<.......7!8.
    2014-04-30 16:15:09 + 0010- 38 1B 3E B6 36 38 1A 3D B4 35 38 1B 3D B4 35 C0   8.>.68.=.58.=.5.
    2014-04-30 16:15:09 + 0020- 37 01 F6 3F 91 EC 23 35 38 1A 3D B4 36 38 1B 3D   7..?..#58.=.68.=
    2014-04-30 16:15:09 + 0030- B4 35 C0 37 01 F6 37 21 F4 3F 91 EC 23 04 55 32   .5.7..7!.?..#.U2
    2014-04-30 16:15:09 + 0040- D4 5F 43 4C 4B 4D 4F 44 45 10 08 04 00 00 5F 58   ._CLKMODE....._X
    2014-04-30 16:15:09 + 0050- 49 4E 46 52 45 51 10 40 4B 4C 00 4C 45 44 4F 4E   INFREQ.@KL.LEDON
    2014-04-30 16:15:09 + 0060- 4F 46 46 00                                       OFF.
    2014-04-30 16:15:09 w Finished openspin main.
    2014-04-30 16:15:09 . call_openspin_done - now retrieving result...
    2014-04-30 16:15:10 w Reading LEDOnOff1.eeprom from MemFS.
    2014-04-30 16:15:10 . Result file size 32768 bytes.
    2014-04-30 16:15:10 . Worker terminated itself correctly.
    

    Send to S6B (I happen to know that this S6B has an IP of: 10.0.0.44, because my router tells me):
    2014-04-30 16:15:24 . execute s6bww.js - sendload_s6b 
    2014-04-30 16:15:24 w Send and Load S6B Worker started - consoleID: 3
    2014-04-30 16:15:24 w root: http://10.0.0.44:80/
    2014-04-30 16:15:24 w filesize: 32768
    2014-04-30 16:15:24 w chunkSize: 512
    2014-04-30 16:15:24 w eepromOffset: 32768
    2014-04-30 16:15:24 w delay: 500
    2014-04-30 16:15:24 w sending 512 bytes from file 0 to eeprom 32768 - PUT http://10.0.0.44:80/eeprom/32768
    2014-04-30 16:16:25 w Exception send_s6b: Error: NETWORK_ERR: XMLHttpRequest Exception 101
    2014-04-30 16:16:25 w Exception send_s6b Stack: send@[native code]
    sendS6B@http://localhost:54702/s6bww.js:102:21
    http://localhost:54702/s6bww.js:138:20
    2014-04-30 16:16:25 w root: http://10.0.0.44:80/
    2014-04-30 16:16:25 w filesize: 32768
    2014-04-30 16:16:25 w eepromOffset: 32768
    2014-04-30 16:16:25 w sending 0 bytes - PUT http://10.0.0.44:80/load/32768/32768
    2014-04-30 16:17:25 w Exception load_s6b: Error: NETWORK_ERR: XMLHttpRequest Exception 101
    2014-04-30 16:17:25 w Exception load_s6b Stack: send@[native code]
    loadS6B@http://localhost:54702/s6bww.js:53:17
    http://localhost:54702/s6bww.js:139:20
    2014-04-30 16:17:26 . Worker terminated itself correctly.
    

    dgately
  • jazzedjazzed Posts: 11,803
    edited 2014-04-30 16:34
    Dennis,

    What is the output of the Activity Board (xbee-server) when it boots?
  • msrobotsmsrobots Posts: 3,709
    edited 2014-04-30 19:36
    @Jazzed,

    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.
    Michel L wrote: »
    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.

    Back to work!

    Enjoy!

    Mike
  • dgatelydgately Posts: 1,630
    edited 2014-04-30 22:41
    jazzed wrote: »
    Dennis,

    What is the output of the Activity Board (xbee-server) when it boots?

    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
  • jazzedjazzed Posts: 11,803
    edited 2014-04-30 22:56
    dgately wrote: »
    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
    Yes. Load it to eeprom. When it boots, it should show the IP address.

    Follow the address example in the Editor dialog.
  • Michel LMichel L Posts: 141
    edited 2014-05-01 06:17
    msrobots wrote: »
    @Jazzed,

    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)

    ...

    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.

    Michel
  • msrobotsmsrobots Posts: 3,709
    edited 2014-05-03 21:00
    Hi @Michel L.,

    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 ?

    /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
  • Michel LMichel L Posts: 141
    edited 2014-05-04 06:23
    Mike,

    as requested, i've added a webrequest servlet:
    http://localhost:nnnnn/webapp/webrequest.action?get=http://obex.parallax.com
    

    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.
    http://localhost:nnnnn/webapp/proxy/google/search?q=Parallax
    

    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
  • msrobotsmsrobots Posts: 3,709
    edited 2014-05-07 19:47
    @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
  • Michel LMichel L Posts: 141
    edited 2014-05-08 04:52
    msrobots wrote: »
    @Michel,

    You are way to fast for me.

    :) lol
    msrobots wrote: »
    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...)

    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
Sign In or Register to comment.