• Well, it:

    • Initialises the device if it's not done already (I think jshUSARTSetup may get called for Bluetooth)
    • Outputs -> Bluetooth to the old device
    • Sets the console deviec
    • Outputs '<- OldDevice` to the new device
    • Prints the JS console characters (>)

    It's all here: https://github.com/espruino/Espruino/blo­b/master/src/jsinteractive.c#L168

    I can't remember anything else offhand, but you'd have to look at the source of jsiSetConsole.

    I guess it could be the Bluetooth serial write IRQ that's crashing? You need to have a way of taking data out of the txBuffer and transmitting it via Bluetooth from an IRQ - if you don't have that then the txBuffer will just get full and things will stall.

    Does just doing Bluetooth.write("sometext") cause problems, or does that work?

About

Avatar for Gordon @Gordon started