Microbit build issues

Posted on
  • I've put 1.99 on a Microbit. I'm having issues connecting over serial - I can't - from a Macbook with OSX 10.11.6

    I can connect over Web Bluetooth, but can't upload anything. Though the same code pasted into the console works fine over Web BT.

    On upload an example error response is :

    >Uncaught Error: Function "setTimeZone" not found!
     at line 1 col 27
    setTime(1530126694.283);E.setTimeZone(1)
                              ^
    New interpreter error: FIFO_FULL
    
  • I've just checked and I can connect fine over serial and Web Bluetooth and can upload code, for example:

    var n=0;
    setInterval(function() {
      n=(n+1)%5;
      show(1<<n);
    },500);
    

    However I do get the "setTimeZone" not found, and it seems if you're trying to upload a larger amount of code over Web Bluetooth then you get FIFO_FULL because Espruino was still busy trying to write the error message while code was being uploaded.

    I've now added setTimeZone and if you use a cutting edge build now then the code should upload fine. Unfortunately things are getting extremely tight memory-wise in the micro:bit build now so it's always a bit of a struggle. I had to lower the space reserved for saved code this time as it seems it was overlapping with the actual program code.

  • Thanks. Wanted to play with the accelerometer. Appreciate there’s not much room. I best look at my serial again. Thanks again

  • I had to bring the baud right down to 9600 to get connected over serial. Anything higher and I have no console and get the prompt not detected error on upload. Is this the standard baud rate for Microbit - I didn't see it in the docs and I will add it if thats an omission?

    Code upload great over Web BT and serial now.

  • I had to bring the baud right down to 9600 to get connected over serial.

    Yes, this is the standard baud rate for literally every single board running Espruino apart from ESP8266/ESP32 - it might be an idea to add it to the docs, but nobody will have trouble unless they've been trying to use ESP32/etc :)

  • Guilty as charged. Sorry to waste your time on that one :/

  • @Gordon - it might make sense to put a note of that in the IDE settings screen "9600 is used by all boards except ESP8266 and ESP32, which use 115200"

    I find the switch annoying enough that I never connect to ESP8266 and ESP32 by the IDE - I just go in with hterm, set up the wifi, then connect by telnet.

  • :) I'm actually considering just moving ESP8266/ESP32 back to 9600 baud by default. It's caused so much pain, and the boards can't actually handle 115200 baud without flow control so the IDE has to artificially throttle transmission anyway.

    If the IDE could avoid throttling there's a good chance that communications at 9600 baud may actually be faster than the current 115200 baud one

  • Yes, lets switch to 9600.

  • If this is better yes why not, it would save my embarrassment like above - but why can we flash the ESP8266 at speeds of 115k upwards though? Is it unfair to say the boards can't handle it? Or is it firmware limited?

  • The problem is that it will break everyone's existing configs. And anyone coming from the esp32/esp8266 world expects the board rate to be 115200, as this the the default for the device.

    The issue initially was with microbit. Is it possible to attempt a connection via the set rate - and no command prompt is detected, drop to 9600 and test the connection then?

  • why can we flash the ESP8266 at speeds of 115k upwards though?

    You can, just not for anything more than very simple code. Basically there's no flow control so we don't know if commands that are being sent are being executed in time or if the data is just getting thrown away. If you send something that takes a while (even if that's loading a module) then it can cause data loss.

    I am looking at adding some kind of flow control into the upload process, but I'm not sure when that will land.

    @Wilberforce To be fair, it seems 9600 baud is used for ESP8266 as well. Pretty much everyone new uses the IDE not a serial terminal, and for them the change in baud rate seems to be the biggest stumbling block. It's so bad that if you google 'ESP8266 baud rate', the 7th hit is a post on the Espruino forums complaining about the baud rate being different to normal boards!

    The other slightly irritating thing is it makes it super painful if anyone wants to try using different Espruino boards, since you're always in the settings trying to flip between baud rates.

    It'd be a very minor upset for existing users who will be aware of the baud rate issues anyway - but at the end of the day they'd probably appreciate having faster more reliable comms with the board.

  • @Gordon is 9600 the transfer rate the IDE switch to when setting to slow communication?

  • No, slow communication is the 'throttling' I'm taking about - it splits everything into 19 char chunks and waits for a while after sending each one. However it does that over whatever the current serial baud rate is.

  • Throtteling is not used for Pico and EspruinoWifi (afaik), is there still a need to use it for ESPs when baud is set to 9600?

  • No, I don't think there would be a need. The throttling is basically there only because it's not running at 9600

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Microbit build issues

Posted by Avatar for Ollie @Ollie

Actions