Programming over wifi

Posted on
  • Just got my two kickstarter espruino boards...what an awesome product! Congrats.

    I find the ability to program the board using any U(S)ART connection very powerful, especially when used over a wireless protocol i.e. BT, Xbee etc. But what about programming via wifi? Combining wifi and BT is one solution for wireless management of an Espruino, but it would be nice to just use the wifi link. Any thoughts/initiatives on this?

    It might be that it is already possible to something like uploading a file to an sd and run it. But I do not currently have the full overview to see whether this is plausible or not. I'd be happy to contribute to this feature if possible :)

  • Hi ltj, i am working on something like this right now. I added a Adafruit CC3000 WiFi board to the Espruino board and wrote a very basic file server to list, serve and save files to the sd-card. Everything works just fine except for saving files. I always get a "ERROR : Unable to write file : INVALID_NAME". Once i get around this error it should be possible to use the saved files via "require".

    Another thing i want to try is to backup the state of the server to the sd-card if the connection drops and reinitialise the server if the connection is available again.

  • I'm sure this would be pretty simple with the use of eval, but i don't have my cc3000 module yet so i cant test :( Never the less I've got plenty to do with this awesome Espruino.

  • @loopMasta, sounds great. Let me know if I can assist in any way.

  • @loopMasta - what filename are you writing? The issue may be that right now Espruino doesn't support long filenames (only 8.3 format).

    As far as programming over WiFi, you've got two options I guess:

    1. Serve up a textbox, POST back the data, and use eval to execute it.
    2. Loopback the actual console - you can't do this in software right now, but you could physically connect USART1 to USART2, do Serial1.setConsole(), and then use HTTP to send/receive the data from USART2. It might be a bit slower but it'd be pretty awesome to get the whole interactive command prompt via WiFi.
  • @Gordon, It was exactly your second suggestion I was looking for. Thanks. As soon as I get my hands on a CC3000 I will starts looking into this.

  • @loopMasta - did you get your file server working? Would you be able to share the code - I could really use this :)

  • Just to add: any recent version of Espruino supports long filenames now :)

  • Ah, I can rename some files :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Programming over wifi

Posted by Avatar for ltj @ltj

Actions