Avatar for lluisrovira

lluisrovira

Member since Nov 2021 • Last active Jan 2022
  • 2 conversations
  • 6 comments

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for lluisrovira

    Hi,

    Yes, this what I think it's happening. Unfortunately I didn't have time to create a testbench to test it yet. I want to do it, as soon as possible, for sharing with you and try to discover where is the problem.

    • 5 comments
    • 317 views
  • in Puck.js, Pixl.js and MDBT42
    Avatar for lluisrovira

    Hi,

    As part of my research I seen this part of code, so I was confident that the indications will work. The problem appeared when I needed to communicate with the above mentioned device(Xiaomi Mi Scale 2).

    The characteristic that I need to use has only set as true the indicate parameter. I've written some code to subscribe using the startNotifications() function, the problem is that I only received one packet of data, after that it seems that the device get stuck as is waiting for the ACK packet necesary to finish the indication reading procedure.

    I will try to create using 2 espruino devices an example to do it more reproducible without buying a Scale.

    Thank you for your fast response.

  • in The Place for Patreon Patrons
    Avatar for lluisrovira

    Hello,

    I'm not a experienced devOps but you can use cloudflare as DNS server, then you don't need to configure any certificate. You could use their proxy and configure a rule to connect to your server using http.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for lluisrovira

    Hello,

    I have a Xiaomi MI Scale 2 and I want to read the weight using an MDBT42Q using it's BLE. I've found the protocol defined here: https://github.com/oliexdev/openScale/wi­ki/Xiaomi-Bluetooth-Mi-Scale

    For reading the weight I need to subscribe to the 00002a9d-0000-1000-8000-00805f9b34fb Gatt Characteristic. This characteristic enables me to subcribe to it using indications (not notifications).

    I wolud like to know if it's posible to subscribe to indications in a similar way that is used for notifications (startNotifications function).

    Thank you in advance.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for lluisrovira

    Hi Gordon,

    Thank you for your fast response.

    I've checked using the process.memory().usage. Finally I found that there were a pin that was not pulled up or down and it was used in a setWatch. This pin was also near to another pin used for I2C communication, so it receive a lot of electrilcal noise. The state of the pin was changing extremly fast and uncontrollable, filling the buffer. After removing the setWatch the error has disapeared.

    Thank you for all.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for lluisrovira

    Hello, I have been working with the MDBT42Q, I want to control it using the USART1 (pins D8 and D6). I use the REPL console to send the code, after that I use the REPL to check some pin status using directly the analogRead function or modify the value of a pin using digitalWrite.

    The device works as expected, but after some time (random) it become unstable.

    After checking the communication logs I've been able to found some errors that are appearing randomly.

    This errors are:
    1.- Execution Interrupted during event processing.\r\n
    2.- New interpreter error: MEMORY\r\n
    3.- ERROR: Ctrl-C while processing interval - removing it.\r\n
    4.- New interpreter error: CALLBACK\r\n
    5.- New interpreter error: MEMORY_BUSY\r\n
    6.- Execution Interrupted\r\n
    7.- New interpreter error: FIFO_FULL\r\n

    I've been searching for detailed information about it and I couldn't find any reason to have this unexpected behaviour. It seems that this kind of errors are related on execution conditions (if there are a lot of calls to a big function, etc)

    I would like to know if there is any function that helps me to debug this errors, allow me to check the free RAM memory or the setWatch queue status.

    A part of that I would like to know if it's posible to enable software or hardawre flow control on the USART1? Is it posible to disble the BLE console?

    Thank you in advance

Actions