Avatar for Ollie

Ollie

Member since Jul 2014 • Last active Feb 2017
  • 25 conversations
  • 389 comments

Most recent activity

  • in Espruino on ESP8266
    Avatar for Ollie

    When you wrote this

    http.createServer(pageHandler).listen(80­80);
    

    You're setting up the server to listen on port 8080 i.e http://ip address :8080. It is distinct from port 80. 80 is the default for http - so the only one you don't have to explicitly call in the URI if your server is listening on port 80. Similarly 443 is the default for a server offering SSL/TLS via HTTPS

    You need to contact the server using the port it is listening on - if that is port 80 you can omit it.

    Beyond that you need to have a response handler - your pageHandler function that can output the correct response that a browser can use/understand. The Espruino page on Internet has numerous examples that will help you write the handler function.

    Edit:
    Re Telnet. Once you have Wifi setup and you are connected. If you know the IP address of your board, and set that up on the communications page as x.x.x.x:23, you should be able to establish a Telnet connection - unless the build of Espruino you are using has had Telnet option turned off. Standard builds should have Telnet enabled.

  • in Espruino on ESP8266
    Avatar for Ollie

    Test Telnet. Connect on port 23 from
    IDE. If works, check or post up your http response handler function code - problem most likely in there

  • in General
    Avatar for Ollie

    Your average person can't build C binaries and benefits enormously from being able to run interpreted languages where they have prior experience, or which are easy to pick up from scratch if they don't. Otherwise the ESP8266/32 boards are useless to them and they're not able to join in the fun.

    ESP8266/ESP32 are capable micro controllers which, given their price, are difficult to complete with. That battle might not be worth fighting.

    So, looking at software side, strategically, I think you're in the middle of a land-grab. In the long term, is it better that Espruino is the goto solution for coding on ESP8266/32, or that one of the alternatives like MicroPython, Lua or, ESP8266 Basic, has become it?

    One could see more opportunity to earn revenue from initiatives like paid support or premium access channels in the above scenario, than if Espruino was used only by folk who bought an official Espruino board, while the ESP crowd ran something else.

    Of course, many won't subscribe, and will get more value than they give - as is the case now - but with scale/volume it doesn't matter as much, or feel quite as personal :)

    I don't think you even need to understand how to monetise in the short term (providing you can support yourself) if you get the distribution and Espruino becomes a/the standard, these things should fall into place.

    If nobody is using Espruino, but the owners of official boards, you don't have quite the same opportunity, if any.

  • in General
    Avatar for Ollie

    but I'd be earning a lot more and working less if I got a normal job.

    My wife has often said "why can't you just get a normal job?"

    For me, running a business is a "random walk" - the trick seems to be to keep at it. This random walk can meander upwards with care and/or effort.

    Couple of ideas:

    1) Paid support for non-espruino boards - ESP8266/32 in particular. Proliferation will lead to more support calls, so monetise it?

    2) Actively engage with, and market to, ESP8266/32 users. It's going that way, the stats suggest it. Your main product is software. So feed the proliferation required for 1) above?

  • in General
    Avatar for Ollie

    In 'Other' are there more Linux/Pi builds or more unspecified boards in general - it is more significant in the last quarter? Great to see the impact Puck.js has made though!

  • in Interfacing
    Avatar for Ollie

    Someone was attempting it on here. The approach seemed to be to run the ESP8266 as an Access Point and Station (the default).

    In AP mode the IP address is a known 192.168.4.1.

    A simple webserver hosts a form to accept SSID and password credentials, which can be used as an input to connect to the main Wifi network as a station, if I can find the thread I'll update here.

    Edit: Nothing jumps out in the forum, it might have been a discussion on gitter. But that was the approach taken

  • in Espruino on ESP8266
    Avatar for Ollie

    Ah ok, I need to look to some newer versions. It was only the issue with the SDK and bootloader than kept me on 1.87. Thanks

  • in Espruino on ESP8266
    Avatar for Ollie

    Mac - and I used a nodeMCU with ESP8266-12 onboard. How are you powering your ESP8266-12, is it standalone?

  • in Espruino on ESP8266
    Avatar for Ollie

    My command string is very similar. Have you run erase_flash as suggested? That wipes everything and is a good idea when moving between versions.

  • in Espruino on ESP8266
    Avatar for Ollie

    See edit at foot of this post... not sure if this is a bug but same in 1.87 when I replicate the process.

    There is a regression in that build, a memory leak, maybe Wifi or socket related? I don't know at what point it may have been introduced, since I'm on 1.87, but there's a steady reduction in process.memory().free when I review. Reverting to 1.87 and stable again.

    The sample code I tried.

    var wifi = require("Wifi");
    var mqtt = require("https://github.com/olliephillip­s/tinyMQTT/blob/master/tinyMQTT.min.js")­.create("iot.eclipse.org");
    var topic = "/op/test";
    var message = 0;
    
    mqtt.on("connected", function(){
      setInterval('mqtt.publish(topic, "test" + message);', 2000);
    });
    
    mqtt.on("published", function(){
      console.log("message sent");
    });
    
    mqtt.on("disconnected", function(){
      console.log("disconnected");
      mqtt.connect();
    });
    
    wifi.connect("SSID", {"password":"password"}, function(err){
      if(!err){
        console.log("Connected"); 
        mqtt.connect();
      } else {
        console.log(err); 
      }
    });
    

    Edit: Actually, you only get this on saving code, and in 1.87 too. Upload the code, let it start running, save() in the console on left, and then free starts to decline. Maybe this is not an issue since I only did this for the purpose of the test above.

    Normally, code will be wrapped by E.on("init", ...) at upload before save().

    Am interested to know what could be happening here though

Actions