Avatar for opichals

opichals

Member since Jun 2014 • Last active Feb 2018
  • 4 conversations
  • 57 comments

Most recent activity

  • in JavaScript
    Avatar for opichals

    @allObjects While putting the credentials into a module is a possible way of 'hiding' it from the application module it still logically doesn't belong there. It forces people using or deriving the application code to have such module as well or to change the code which is not clean.

    There is also security aspect which we might want to think of. The configuration API should be done so that the sensitive information could be stored encrypted in a safe place and not in flash memory (something the BigClown core module would support).

  • in JavaScript
    Avatar for opichals

    @Gordon Thanks for the 'Storage' module! Its use should to be a great way of not having to duplicate the serialization (JSON.stringify should suffice?) and flash access in the jswrap_wifi_save/restore methods. I would still vote for a .wifiauth file (or a more generic .config perhaps?) which would get loaded and wifi connected after every reset independently of the E.setBootCode stuff.

    BTW What would you think of using a leading dot (or perhaps some other character of your liking) in the filename as a nice way of distinguishing internal files.

    Also thank you for the onInit() { on('connected', ...) } note, I haven't noticed that before for some reason.

    @Ollie I somehow didn't spend too much time but I think I could not find a way to pass arguments/env variable values to the espruino npm's cli .js script.

  • in JavaScript
    Avatar for opichals

    I find it quite a good feature of not having to include the SSID and credentials to the actual device code. It doesn't belong there. I use onInit() { wifi.on('connected', function() {}) }.

    I wish I could do something like espruino -e 'wifi.connect($SSID, { password: $PASS }, () => wifi.save()) where I would be prompted to type in the password which would be sent to the board but I have yet to find a way which would not require saving the script to a file first.

  • in Interfacing
    Avatar for opichals

    Finally I got it working. The wiring based on the schematics is as follows

               SHIELD      Espruino
    MOSI   ICSP4          B5
    MISO   ICSP1          B4
    SCK    ICSP3          B3
    CS     JHIGH3 (10)    B2
    3V3    ICSP2          3V3
    GND    ICSP6          GND
    

    The shield worked with 3.3V as well as 5V wiring with level shifters.

  • in Interfacing
    Avatar for opichals

    So I managed to resurrect the Espruino board with serialflash.

    However I didn't have much luck so far with the current master. I tried using 3.3V as well as with level shifters to 5V (according to the shield spec).

    >var eth = require("WIZnet").connect();
    =Ethernet {  }
    >eth.getIP()
    ={
      "ip": "0.0.0.0",
      "subnet": "0.0.0.0",
      "gateway": "0.0.0.0",
      "dns": "0.0.0.0",
      "mac": "00:00:00:00:00:00"
     }
    >eth.setIP({ "ip": "10.0.5.3", "subnet": "255.255.255.0",
    : "gateway": "10.0.5.1", "dns": "8.8.8.8", "mac": "aa:bb:cc:dd:ee:ff"
    : });
    =true
    >eth.getIP()
    ={
      "ip": "0.0.0.0",
      "subnet": "0.0.0.0",
      "gateway": "0.0.0.0",
      "dns": "8.8.8.8",
      "mac": "00:00:00:00:00:00"
     }
    
  • in Interfacing
    Avatar for opichals

    Thank you Gordon! Got it flashing correctly...

    After few experiments though I closed the flashing dialog during a running flash and pressed RST on the board which bricked it. Now I need do learn how to do the serialflash procedure I guess ;)

    So no real W5100 success on my side yet.

  • in Porting to new Devices
    Avatar for opichals

    Hey!

    There is a running campaign for BigClown make kit here https://www.indiegogo.com/projects/bigcl­own-the-iot-kit-for-makers-for-you-diy#/­ .

    Their core module is 19EUR (192k flash, 20k RAM, ARM Cortex M0+ 32-bit MCU STM32L083CZ (ST)... so similar to Olimexino STM32) or 29EUR for the same thing with an RF chip for wireless communication. It all comes with great support, security chip on board, an async API based SDK and a warranty.

    What would you think of porting Espruino to it? Any interest?

    Best Regards
    Standa

  • in Interfacing
    Avatar for opichals

    Ah, I guess I got it. As documented in README_Building.md I need to build bootload+firmware image using scripts/create_espruino_image_1v3.sh. Will try tomorrow.

  • in Interfacing
    Avatar for opichals

    I've got two of the W5100 Arduino Ethernet Shield 05 (at least according to this page) so I plan on testing those as I get to it.

    However for now there seems to be something wrong on my side. Perhaps the PR reported .bin size issues are not valid as I found that my vagrant created VM is not delivering a working .bin. I also tried to compile master even w/o wiznet myself and tried flashing it through the 'Advanced Flashing' in the EspruinoIDE and it failed the same way (EspruinoBoard v1.3). It doesn't come up after RST, after a seemingly successful flash procedure. It is not present in the connectable USB devices after that. The official travis-built master from http://www.espruino.com/binaries/travis/­master/espruino_1v95.153_espruino_1r3.bi­n works fine though.

    Here are the steps I do this to build the firmware .bin

    vagrant up
    vagrant ssh
    cd /vagrant
    source scripts/provision.sh ESPRUINOBOARD
    RELEASE=1 BOARD=ESPRUINOBOARD make
    

    Any idea why this could be broken?

Actions