-
Yes, I was suprised as well, as previously doing lots of work with these including updating firmware and I've had to problems. Hmm, now I think about it and based on your comment, I may have done the update previously on a Winbows box, not Mac. Might try that as well. I'll also try your suggestion later today.
Thanks. -
Hi All,
I come back to my MDBT42Q project after quite a few months break.
I attempted to update to the latest firmeware but I seemed to have bricked both the MDBT42Q modules I have. I'm using the Web IDE and it seems to go fine but immediately return with this error..."Sorry, the firmeare update has failed.
The rror was: Error: Data object does not match the firmware and hardware requirements, the signature is wrong, or the parsing command failed"I've attached a screen shot.
Note, they connected fine before I tried to flash them. I'm sure I must be doing something silly.
Anyone know how to recover from this.
By the way, I'm on Mac, in case that matter.Regards,
Marco -
-
I'm using a MDBT42.
I have an iphone app which connects over BLE and can receive data from the MDBT42 over UART.
On the MDBT42 I use the print statement to send a load of byte in ASCII format, i.e. I send literal 'FF' for 255. In the iphone app I have to decode the ASCII characters received to generate a byte array which is then decoded again into a set of glucose readings.This all works fine, but there must be a better way to send just a big byte array without having to decode ASCII characeters in the iphone app.
Any ideas? I'm sure I've missed something obvious here.
Thanks,
Marco -
Thanks for this tips. I'll certainly take a look at these suggestions.
I'm using the BM019, http://www.solutions-cubed.com/bm019/Yes, I do intend to share it soon.
-
Hi, thanks, yes I was thinking about controlling the power to the NFC reader using the Espruino.
Yes, for the prototype I am using MDBT42Q breakout board, but don't intend to use this in the final product because the NFC card has it's own voltage regulator which I will use to supply the bare module. -
-
Hi All,
I've managed to get a prototype working that reads from a NFC enabled glucose sensor attached to someone (Freestyle Libre to be exact) and sends the readings to an iPhone app. The idea is to turn the glucose sensor that requires the user to place the phone next to it, into a continuous glucose sensor by overlaying the device I have made and sending reading over bluetooth to the phone.Works great, the problem is it really needs to last at least a week, and tests so far show I'm not getting even close to this. Because it's wearable the battery supplying the power must be small.
So far I have the iphone polling every 15 minutes. I scan for the device, subscribe to the characteristic, read the data then disconnect. I'm also putting the NFC reader card into hibernate to save power as well. I thought these measures might minimise power usage however it's not good enough.
It's probably worth mentioning that I am supplying power from a LiPoly battery via the breakout board's voltage regulator. On the final product I will not be using the breakout board, but just the core device, supplying 3.3V via a voltage regulator on the NFC device I am using, so perhaps that will help.
I've read quite a few other posts but nothing has helped so far.
Is there anything else I can do on the Espruino side? Have I missed something?
Thanks,
Marco -
Hi All,
I solved this problem in the end and got the Espruino working with the Solutions Cubed BM019 Serial to NFC Converter.
To be honest, I'm not absolutely sure what I did to fix because I started over directly converting C code from the Arduino example here, http://blog.solutions-cubed.com/near-field-communication-nfc-with-the-arduino/ to Javascript.
I think the trick was that I declared the RXBuffer as a global varaible as follows.var RXBuffer=new Uint8Array(200);
-
I agree with what you have said. In fact I have already implemented the code you are drawing my attention to, but because it didn't work I decided to try to at least get something basic working,i.e. an echo 0x55.
I have an Arduino on order so I'll give that a try and see what turns up.
Thanks again for your help. -
Results...
Using this code...
function echo(){ var r=spi.send(0x55,SS_PIN); print("echo response:",r); }
Gives me this...
echo response: 6 echo response: 0 echo response: 0 echo response: 0 echo response: 0 echo response: 0 echo response: 85 echo response: 85 echo response: 255 echo response: 255 echo response: 255 echo response: 255 echo response: 255
Tried the inventory function as written above and got lots of these (while scanning a tag)...
Got data new Uint8Array(0)
I think it might be necessary to set the NFC protocol before doing this.
Anyway, you have helped in confirming I haven't been doing anything really silly, which is really want I wanted. Fresh eyes. -
Thanks for getting back to me. Really appreciate your help.
Interesting points. I've tried a few of your suggestions, nonetheless happy to try again.
To answer your questions first.- I do have SS_0 pulled high.
- Yes, I think I have tried the wrapper and I think that for sending command to the tag via the NFC. But I will try that again.
- Also tried the inventory stuff, but will again, try again.
Will get back to you soon with results...
- I do have SS_0 pulled high.
-
So, here's the problems I am having with interfacing by SPI to BM019.
Before I show the code and output here are some points of note;- The code is just for test to see if I can get consistent communications going.
- I'm sending 0x55 (85) because the BM019 documentation says this should just echo back 0x55.
- I have tried just about every permutation and combination I can think of in terms of pins high/low, implementing in different ways to make it faster etc. I've spend quite some hours on this so this is my last shot before I switch to Arduino.
- I've checked my wiring loads of times and haven't spotted anything wrong there.
- It seems odd that I sometimes get a 0x55 response, which is why I suspected a timing issue.
- The BM019 documentation says I have to do a wake-up pulse so that' what I do first.
- I am using software SPI here, but I find the same result on hardware SPI.
- The output follows the code below. Note, inconsistency of output.
If anyone has any suggestions they will be most grateful received :-)
Here's the code...
print("Setting up SPI"); var spi=new SPI(); spi.setup( { sck:D19, miso:D22, mosi:D20, mode:0, order:'msb' } ); var WAKEUP_PIN=D17; var SS_PIN=D18; var LOW=0; var HIGH=1 var d=digitalWrite; function echo(){ "compiled"; d(SS_PIN, LOW); r=spi.send(0x55,SS_PIN); d(SS_PIN, HIGH); } // Send wake upfirst after giving Espruino time to load code. d(WAKEUP_PIN, HIGH); setTimeout(function(){ setTimeout(function(){ d(WAKEUP_PIN, LOW); setTimeout(function(){ d(WAKEUP_PIN, HIGH); setTimeout(function(){ setInterval(function(){ echo(); },1000); },1000); },10); },1000); },2000);
Here's the output...
| __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v01 (c) 2018 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate >Setting up SPI echo response: 12 echo response: 0 echo response: 0 echo response: 0 echo response: 0 echo response: 5 echo response: 85 echo response: 85 echo response: 85 echo response: 85 echo response: 85 echo response: 85 echo response: 85 echo response: 85 echo response: 85 echo response: 85 echo response: 85 echo response: 85 echo response: 20 echo response: 0 echo response: 0 echo response: 0 echo response: 0 echo response: 0 echo response: 0 echo response: 0 echo response: 0 echo response: 0 echo response: 1 echo response: 85 echo response: 85 echo response: 85 echo response: 85 echo response: 245 echo response: 255 echo response: 255 [etc. ...]
- The code is just for test to see if I can get consistent communications going.
-
-
-
-
Thanks for sorting that out, although I haven't had a chance to test yet, I will so as soon as I can.
Interesting what you say. I will do as you suggest when I'm back in the office.
My suspicions have been raised because of the intermittement nature of the reponse from the BM019 board. Anyway, I'll get an update to you soon as I am keen to sort this out.
-
-
From what I can see I can setup Serial on any pins. Folowing this page https://www.espruino.com/USART
I generated this codevar s=new Serial();
s.setup(9600, {rx:D25, tx:D26});
s.on('data', function (data) { print(" "+data); });Expecting a response when I execute this code
s.print("Hello World");
I get nothing, no output at all.
So far I have had little success with this product in terms of interfacing.
Anyone know what I am doing wrong.
P.S. I am on Firmware version 2v01.Thanks
-
Hi,
I am trying to interface an Espruino MDBT42Q to a BM019 NFC reader
(http://www.solutions-cubed.com/bm019/)
but can't get it to work. I think it's because JavaScript is too slow.
I attempted to use the C compiler but get the message "Only official Espruino boards are supported..."
I bought the Espruino is good faith from Cool Components and had no reason to believe it was anything other than official.Am I missing something here.
Thanks,
Marco
Ah, ha. Works fine using my Windows 10 machine. In fact, it did fail once with the same error but a lot further along in the process. Next try was successful. Mac fails almost immediately.
So for information, I see this issue on a Macbook Pro running Catalina, Version 10.15.4.
Thanks for your help.