Avatar for Ollie

Ollie

Member since Jul 2014 • Last active Feb 2018
  • 26 conversations
  • 418 comments

Most recent activity

  • in JavaScript
    Avatar for Ollie

    @opichals you could wrap that in a bash file and pass in flags, no? I use a small Go utility for ESP8266 which does exactly this - and returns IP address so subsequently can connect via IDE over Telnet

  • in General
    Avatar for Ollie

    Here is snippet that may help. You could use port 80 if wished.

    servePage is a function which serves a simple html page, but you could use this function for more complicated router type logic.

    var server = require('ws').createServer(servePage);
          server.listen(8000);
          server.on("websocket", function(ws) {
            ws.on('message', function(evt){
            // handle the message
            });
          });
    
    
  • started
    • 8 comments
    • 392 views
  • in ESP8266
    Avatar for Ollie

    Mine run from Mac USB power. These and the NodeMCU have always been pretty reliable on USB power. Only when I've been using the 01 and 12 directly have I needed to use a capacitor and maybe supply power from a source other than the USB FTDI adapter. Are yours genuine D1s? You don't think you could have got a bad batch? The quality varies with the cheap boards and I've bought ESP8266 boards that don't do what they should before now (Wifi Node-M).

  • in ESP8266
    Avatar for Ollie

    I use the D1 Mini - well I think they're clones. I'm behind on versions but I flashed 1.91 recently and could connect via Espruino IDE no issues. Have you tried an older version out of interest?

    Edit: espruino_1v95.4819_esp8266.tgz works fine. I didn't set 4M-C1 I used 32m in the esptool command as normal. Not sure what that's for? Otherwise flash command is same including 115200 baud, but not port I'm on Mac.

    When started with these I needed a different serial driver (wchusbserial1410) it took a bit of finding. I wonder if that's relevant? Though if you've flashed it ok I'd guess not.

  • in ESP8266
    Avatar for Ollie

    @tempos It is possible. Many have run it on bare boards even the ESP 8226-01.

    It is a while since I have used on ESP8226 (certainly I've not tried any >1.9 binaries) so can't offer much constructive help.

    But, things to try if you have not already:-

    1) Run "erase_flash" first. This always seemed to help get a clean flash of the binaries.
    2) Wiring. A couple of gotchas for me: "CH_PD" needs to be pulled high (3.3v) and GPIO 0 needs to be high for normal use but pulled low (GND) for the purpose of flashing. Also your need that capacitor you say you will try. Otherwise the power to the board from your FTDI style adapter just is not stable enough. These are a couple of annoyances you don't need to consider with Node MCU.

    You may have all this hand, but if not hope it helps.

    • 5 comments
    • 176 views
  • in JavaScript
    Avatar for Ollie

    Thanks @opichals I'd come to that conclusion re the SDK.

    Re use-case - honestly? It started out as a learning exercise, but I've found it to be very useful and reliable. Re performance, I don't have any benchmarks, my apps are sending at 50ms intervals with no problems, but I appreciate that's not particularly fast when compared to MQTT QoS 0 which I think is the best comparison. That's not to say the interval can't be much smaller. I haven't tried.

    I could run Mosquitto locally, and may end up doing, but this has fewer moving parts to achieve (or at least emulate) the same thing. That was the attraction really.

    I'll look into CoAP though since I've no experience with that. Thanks again.

  • in JavaScript
    Avatar for Ollie

    From what I've gathered frames are lower level than UDP. And yes it's nothing like real pub/sub, the client basically filters the frames based on a list of subscriptions it holds in memory and discards everything else.

    Just checked out that module - I wouldn't have the first idea what to do with that :) so I think I'll look further at your suggestion on UDP. Thanks @Gordon.

  • in JavaScript
    Avatar for Ollie

    Could network enabled Espruino devices communicate using Ethernet frames?

    I ask as I've been using some MQTT style code written atop a Go Ethernet Frames library on Raspberry Pi. The broadcast option means you can achieve something very like MQTT pub/sub, but without data ever leaving your network and/or the need for a broker to relay via ( I always rely on the free insecure ones)

    It's worked well on a couple of projects I've done, so, I'm now wondering could I get Raspberry Pi talking to Espruino over same protocol?

Actions