Avatar for voodooless

voodooless

Member since Oct 2019 • Last active Jan 2020
  • 1 conversations
  • 5 comments

Most recent activity

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

    That's very cool.

    Some more questions: is there a way to actually detect that there is a BLE uart connection present at all? Are there any events for connect or disconnect?

    Furthermore, it all seems to be based on string data? How does it work with binary data? can I safely convert the string data to binary and the other way around?

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

    Not really - Bluetooth data will get reliably to the Bluetooth stack, but if it's not handled by Espruino fast enough it'll get lost (however a FIFO_FULL error flag gets set in that case).

    Can one handle this error within the application code? I've tried overflowing by sending loads of data in a loop, but it seems be be fine. At least that is encouraging!

    Having said all that the datarate over BLE is pretty low with the standard MTU and there's a big input buffer, so it's entirely possible that you could write your code such that it can always handle data as fast as can come over BLE.

    Yes, it looks like it works for now. That's something we can work with at least.

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

    I believe some level of retransmit/error correction is done by the Bluetooth stack - it seems pretty reliable for code uploads anyway
    Not yet, so you'd have to implement your own. Espruino itself can implement software XON/XOFF flow control on Serial, but so far that hasn't been extended for use with Bluetooth.

    These things are a bit contradictory, aren't they? I was actually meaning flow control over the BLE uart connection. I'm pretty sure that if I'm sending data to fast It will choke at some point..

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

    Thanks, that helps a lot! Another (set of) question(s): how is delivery of data guaranteed (if it is at all)? Is there any sort of flow control available that can he used for this? Maximum characters that can be send at once is 20 I think? Is there a way to increase the MTU at the moment?

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

    Hi there,

    I'm looking for an example to use the Bluetooth serial port. I don't seem to get it working, probably because the console is still bound to it. I've tried looking for examples, but I can't find any. To be clear, I mean this one: https://www.espruino.com/Reference#l__glĀ­obal_Bluetooth
    A println seems to output some data to the console, but the "data" event gets never posted..

Actions