-
Hi I tried the example at https://www.espruino.com/hmac but on my Ruuvi hashlib is not found. Any idea why? Thanks, Jens
PS: latest version ofespruino -
-
-
Hi All,
I have the following code that does not do what I want:
... NRF.setServices({ 0x180A : { // Device information 0x2A25 : { // Serial Number readable: true, value : [getSerial() + '#' + count_str] }} }); ...
The variable count_str is a counter as string that gets incremented every time I connect in a "NRF.on('connect', function()". I can see that the counter string increments correctly (puck console), but when I check the services and characteristics that the Puck advertises via Android, I see only the initial value of the counter string (#00000 - Serial Number) and not the updated one.
I am not aware if this is maybe a caching problem of Android? Do I have to do anything else to receive the updated counter string?Thanks
-
Ok, I tried the code below:
// Tested on Puck.js var f = new (require("FlashEEPROM"))(); f.erase(); console.log(f); f.write(0, 'Hello Flash.'); console.log(E.toString(f.read(0)));
and got:
1v90 Copyright 2016 G.Williams >Uncaught InternalError: Timeout on jshFlashErasePage at line 1 col 31 this.flash.erasePage(this.addr) ^ in function "erase" called from line 1 col 9 f.erase(); ^ { "flash": function () { [native code] }, "addr": 471040, "endAddr": 475136 } Uncaught InternalError: Timeout on jshFlashWrite at line 1 col 62 ...,a.length,a.length>>8,0]),b);b+=4;4!=a.length&&(c=new Uint8A... ^ in function "_write" called from line 2 col 102 ...ory!";this._write(a.end,b,c) ^ in function "write" called from line 1 col 26 f.write(0, 'Hello Flash.'); ^ ÿÿÿÿÿÿÿÿÿÿÿÿ =undefined >
Am I doing something stupidly wrong or do I have a faulty puck?
Thanks again
-
-
Hi @allObjects, Yep, I used the very simple example from @MaBe and that is what I get instead of his output:
| __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v90 Copyright 2016 G.Williams >{ "flash": function () { [native code] }, "addr": 471040, "endAddr": 475136 } >Uncaught InternalError: Timeout on jshFlashWrite at line 1 col 62 ...,a.length,a.length>>8,0]),b);b+=4;4!=a.length&&(c=new Uint8A... ^ in function "_write" called from line 2 col 102 ...ory!";this._write(a.end,b,c) ^ in function "write" called from line 1 col 26 f.write(0, 'Hello Flash.'); ^ ÿÿÿÿÿÿÿÿÿÿÿÿ =undefined >
-
-
-
-
@allObjects, Hi I tried all that you suggested and still have the timeout problem (in the web console pane as well as a program). Any other ideas? Funny seems that when I write a string with a specific length and read it afterwards I get a length number ox 0xff - so the length seemed to be stored somehow.
Thanks
Jens -
Hi,
Did anyone of you experience the same error?
>var f = new (require("FlashEEPROM"))(); ={ "flash": function () { [native code] }, "addr": 466944, "endAddr": 471040 } =undefined >f.write(0, "Hello"); Uncaught InternalError: Timeout on jshFlashWrite at line 1 col 62 ...,a.length,a.length>>8,0]),b);b+=4;4!=a.length&&(c=new Uint8A... ^ in function "_write" called from line 2 col 102 ...ory!";this._write(a.end,b,c) ^ in function "write" called from line 1 col 19 f.write(0, "Hello");
Thanks
Jens -
-
-
Thanks Gordon, I'll try that.