-
• #2
BTN1 is mapped to pin D0 https://github.com/espruino/Espruino/blob/master/boards/MDBT42Q.py#L80
However there is also easy but destructive way, you can clear bootloader settings page containing firmware validity flag and checksum making the firmware invalid and then reboot. It should stay in DFU forever when there is no valid firmware.
E.setFlags({unsafeFlash:1}); var f=require("Flash"); f.erasePage(0x7f000); E.reboot()
Make sure you know how to upload new firmware over BLE before trying.
-
• #3
Thank you, have found the note on how to reset the device meanwhile.
So by connecting D0 to VDD shortly, the module goes into DFU mode, right?
I plan on connecting to it via iOS nRF Connect ... DFU mode times out after 30-60 seconds I have read? -
• #4
connected shortly when rebooting or attaching power, yes, as as per https://www.espruino.com/MDBT42Q#firmware-updates
-
• #5
Excuse me for the next stupid question: where do I apply power to the module?
Upper right corner?
1 Attachment
-
• #6
Dxx are gpio pins, VDD is voltage, GND is ground
See also https://www.espruino.com/MDBT42Q#powering -
• #7
of course, thank you
-
• #8
I am having a hard time getting this thing into DFU mode. Meanwhile I have connected / disconnected power and D0 many times I don't even know in what state it is now. The device is showing up in nRF Scanner as MDBT42Q.
Just to make sure: do I have to connect all GND to minus of the battery or just one?
This is how I have it now: GND is connected to the upper left pin. D0 is connected to VDD.
I then connect power to VDD and right after that disconnect D0.
That's correct, isn't it? -
• #9
in dfu mode device is named DFUTARG, what you do looks correct, you can keep D0 pulled up for a bit longer, one second or two could still trigger dfu mode
-
• #10
Yes, that all sounds good - ideally you'd attach all the GND pins but the module is fine without it.
Remember D0 is the second from the edge (the first is GND).
I know it's fiddly but if you can connect D1 to a LED you might get an idea if it thinks it's in bootloader mode or not. If it's booting normally you'll get a single flash, but if in bootloader the LED should light.
-
• #11
I have tried again and again ... doesn't seem to work. I see the module in the scanner app showing up as MDBT42Q, when I connect D0 it gets offline and returns as soon as I disconnect D0. So I believe the connecting works, powering as well, otherwise it wouldn't show up at all. Very annoying.
I'll try to attach an LED.
1 Attachment
-
• #12
Even if you keep D0 pulled up all the time it should boot into espruino after ~3 seconds so if it does not start at all then maybe you are shorting something.
If it is too annoying I'd suggest workaround mentioned in post #2, clearing validity flag forces it into DFU after reboot. If you want to update it anyway you probably don't care about keeping current version.
-
• #13
when I connect D0 it gets offline and returns as soon as I disconnect D0
What do you mean by that? When it is already running as MDBT42Q connecting D0 breaks the connection and device is not visible? That looks like shorting VDD and GND by mistake, otherwise there is no reason.
And BTW when device switches to DFU and advertises as DFUTarg the MAC address last number is changed by one so you won't see same device with same MAC => you can't connect to it by using same MAC as when it is named MDBT42Q. But I guess that is not an issue here.
-
• #15
Thank you both, I understand the shortage sounds plausible, but I am very sure there is no connection between D0 and GND. After connecting battery (LFP having 3.24v) I disconnect the lower right red clamp. A zoomed image shows that the upper clamp only touches D0.
Maybe the voltage is too high for D0?
2 Attachments
-
• #16
Ha! Now it worked! Must have been a weird shortage on the back due to my soldering ... man, this thing is tiny. Thank you both for assisting!
-
• #17
No worries, glad it's going!
man, this thing is tiny.
You seen these yet? :D https://shop.espruino.com/mdbt42v-module
1 Attachment
-
• #18
Yes, I did, beautiful!
:-)
Firmware update page says ...
... but the module has no buttons, no LED. Please advise.