-
Hello ,
I have try and try but your support and documentation is not so understandble for first use....I'm using MDBT42Q version 2.04 (because I can't update using windows computer).
this is what I want to do :
publish my device using BLE , so whenever people will scan they will se my device
simple as this
I want people will be able to see:- name of the devcie
- battery
- temp
this is what I want to upload to the MDBT42Q (after reading 10 times on the support part)
NRF.setAdvertising([ require("ble_eddystone").get("http://www.david.com"), { name : "David", showName: true, discoverable : true, connectable : false, scannable : true, manufacturer: 0x0590 , 0x180F : NRF.getBattery(), 0x1809 : [Math.round(E.getTemperature())] } ], {interval:100});
but it doesn;t work
I get errorUncaught Error: BLE error 0xc (DATA_SIZE)
at line 13 col 20
], {interval : 100});^
why?
this is as the example you postso when I upload this it is working :
NRF.setAdvertising([ require("ble_eddystone").get("http://www.Mako.co.il"), { name : "David", // showName: true , // discoverable : true, connectable : false, // scannable : true, // manufacturer: "0x0590" , 0x180F : NRF.getBattery(), 0x1809 : [Math.round(E.getTemperature())] } ], {interval : 100});
why?
maybe I'm missing something so this are my questions about the code above:
- did I miss something ? just publish this information - this is whatI want to do.
- what is the different between
discoverable \scannable - isn't all the same?
if I disable showname - I will see every data except the devcie name - right? - maybe I'm using the wrong app on my phone ?
when I just search using bluethhoth scan - I don't see the device at all.
when I search using "BLE Scanner" - I see the device (without any information ) but when I press "Open url" - it redirect my to my site . but no name\temp - nothing.
when I use "nRF Connect" - I don't the name of the device just "Te" and the battery 3% temp 85
so what is wrong?
Thank you for your help!
- name of the devcie
-
-
-
sorry, the firmware update has failed.
The error was: TypeError: Failed to execute 'requestDevice' on
'Bluetooth': required member filters is undefined.Please try again, or check out the Troubleshooting page for what to do
next.I download the zip file - espruino_2v05_mdbt42q.zip
in the IDE selected
FLASHER
Advanced Firmware Update
selected the file
did what the message said
now the device red led is on
but I still get the error
what is wrong? -
-
VERSION: "2v04", GIT_COMMIT: "3956264e", BOARD: "MDBT42Q",
FLASH: 524288, RAM: 65536, SERIAL: "3700071-fa641234", CONSOLE:
"Serial1", MODULES: "Flash,Storage,hea" ... "S,crypto,neopixel",
EXPTR: 536882364 }var res=process.memory(); console.log("Memory free - " + res.free); if(res.free<2000) { LED1.write(true); console.log(ScanResault); require("Storage").write("Test",JSON.stringify(ScanResault)); console.log("write"); GetData = JSON.parse(require("Storage").read("Test")); console.log("JSON.parse"); ScanResault.length=0; console.log("Clear Array finsih"); console.log(ScanResault.length); }
when I run the code
I get error thatUncaught Error: Unable to find or create file at line 35 col 63 ...JSON.stringify(ScanResault)); ^ in function called from system >
but when I run list I can see the file
console.log(require("Storage").list()); [ "Test", ".varimg" ] =undefined
maybe this is my problem?
and how could it be ?
-
-
Hello ,
as I understadn I can use about 40kb~ of memory in the MDBT42
I have code that save into RAM and then move it to the flashrequire("Storage").write("test",JSON.stringify(ScanResault)); GetData = JSON.parse(require("Storage").read("test")); ScanResault.length=0; console.log("Clear Array finsih"); console.log( ScanResault.length);
I can see the RAM is clear without a problem
then I send this information to another devcie and after a while I want to clear the flahs
but I'm unable to do this
this is the command I'm using :require("Storage").erase("test");
but it doesn't work
why?
-
in the manufacturer the number shown is in Decimal ,right ?
so 76 - Creative Technology Ltd.
6 - Microsoft?I read the link - jsut want to be sure
there is no way to know what is the service been send right ?
If I look at the first device
and take look at the second group of 4 digits :"e0e1"
this is the sevice name ? and this is not a standart one ?
it could mean 'sensor value' (for example ....)?
if this I understadn it correct - where is the value of it?also if the 4 digits were "0x2A80" that mean that the service was Age? (according to GATT) , and where was the value of this ?
Thanks ,
-
Hello ,
when I scan the bluetooth , I get this message:BluetoothDevice: { "id": "3c:bd:3e:2f:0f:18", "rssi": -90, "data": new Uint8Array([2, 1, 2, 17, 7, 252, 157, 208, 179, 203, 132, 224, 132, 6, 66, 243, 247, 225, 224, 191, 203]).buffer, "services": [ "cbbfe0e1-f7f3-4206-84e0-84cbb3d09dfc" ] }, BluetoothDevice: { "id": "c8:d0:83:e3:4b:1f public", "rssi": -83, "data": new Uint8Array([2, 1, 26, 2, 10, 12, 10, 255, 76, 0, 16, 5, 1, 16, 239, 212, 67]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([16, 5, 1, 16, 239, 212, 67]).buffer },
for the first devive I see:
why there is no manufacturer number?
and how can I read the services ? what does it mean? can one expalin ?
also , what does "data" mean? how can I understadn what he sending?for the second device:
is there a list of manufacturers? so number 76 is iphone (for example?)
also what does the manufacturerData mean? how can I understand it?the reason I'm asking is - I have a blutooth device I want to write for him application , and I want to see how and I can read from it
Thanks ,
-
OK , I will try it
why it said that it's recommand to use physical pull up resistors?and about the SD card ,
- if I power it using the MDBT42Q (3.3V) meaning the the data ill also work on 3.3V (this is what I know - is this ture? am I correct?
- if the above is true . will you still recomand to use the pullups?
- I found in the SD datasheet , that the operation is 3.3V\10uA - do you know if this really the value of the Amper? can I use this to calculate the neeeded battery?
Thanks ,
- if I power it using the MDBT42Q (3.3V) meaning the the data ill also work on 3.3V (this is what I know - is this ture? am I correct?
-
-
-
I probelly will reboot the unit and remove the battery every few days,
this is why I need the clock.
I looked at the page you link me and saw I need to use this pins:3V3 VCC
GND GND
B6 (SCL) DIO
B7 (SDA) AIOyou rcommand to use pullup resistors , will 10K is good for this job?
also I want to connect an external storage (that way I will be sure that it save me the data even if the power is down\unplug)
and this is the pinout you suggest:
SD Card Espruino
DI/CMD B5
DO/DAT0 B4
SCLK/CLK B3
CD/CS/DAT3 B6
VDD 3.3v
VSS/GND GNDagain will 10K resistors will be good here also? (when I search google ,many examples for pullup 3.3V where 10K ).
another question is can I use RTC and external storage at the same time on the same device?
because I can see that both of them are using B6
can I change one of them to use B8 (for example)?
maybe for the exteranl CS? and then just change it also at the code ?// Wire up up MOSI, MISO, SCK and CS pins (along with 3.3v and GND) SPI1.setup({mosi:B5, miso:B4, sck:B3}); E.connectSDCard(SPI1, B8 /*CS*/); // see what's on the device console.log(require("fs").readdirSync());
Thank you for the answers in all the posts :-) ,
by the way - maybe I'm working too hard and there is another solution for me ?
a bluetooth5 BLE with RTC and SD card device? -
-
-
I read it , and now I guess it "save" me the data.
3 questions:- what is the limit of sapce I can use for this ?
lest say the device work for 2 hours,I got 100 entries - then the battery is unplug.
is the data saved somewhere? or it got lost?let say that I want to transfer the data to my PI ,
how do I do this?
what do I need to write on the PI side ,in order to read the data and then delete the device log?
Thanks ,
- what is the limit of sapce I can use for this ?
-
-
let me explain myself:
0x180f - where this came from ? in the link you sent there is no refernce to this
is this something unique to espruino? or it's a known bluethooth information?I want to be able to scan and advertise my device at the same time .
so if I'm correct I need to use 2 devices , one for scanning all the time , and 1 sending my data
is it true?
or I can use only 1 and do some manipulation in the timing?
I don't need that someone will connect me - just to show I'm alive .
I have try to use this function:NRF.setAdvertising({},{name:"test1",connectable:"false",scannable :"false",interval:1000});
but I;m steel able to connect to "test1" - why?
3 . I want to change my own MAC for testing issue , so I will know which MAC I'm testing,
more easy for me - this is the reason. -
Hello ,
I have read the Reference for the NRF.setAdvertising , and something is missing for me.
For exampleto return battery level at 95%, do: NRF.setAdvertising({ 0x180F : [95] }); Or you could report the current temperature: setInterval(function() { NRF.setAdvertising({ 0x1809 : [Math.round(E.getTemperature())] }); }, 30000);
but how do I get this data ?
also where is the lines I can edit ? which options I can use\edit?is there a list of thing I can use?
also
when I scan my device I can see that the MAC is16:17:18:20:ac:a0 random
why is it?
what is the different between
Public,statis,random?
what do I need to use?Thanks,
-
Hello,
I want to scan and save a list of my devices around me
this is what I get :[ BluetoothDevice: { "id": "16:81:e2:2a:3a:21", "rssi": -84, "data": new Uint8Array([30, 255, 6, 0, 1, 9, 32, 2, 50, 141, 254, 49, 137, 64, 152, 204, 169, 29, 27, 46, 84, 132, 252, 5, 163, 119, 196, 51, 11, 17, 122]).buffer, "manufacturer": 6, "manufacturerData": new Uint8Array([1, 9, 32, 2, 50, 141, 254, 49, 137, 64, 152, 204, 169, 29, 27, 46, 84, 132, 252, 5, 163, 119, 196, 51, 11, 17, 122]).buffer }, BluetoothDevice: { "id": "19:28:83:ac:a2:12", "rssi": -88, "data": new Uint8Array([30, 255, 6, 0, 1, 9, 32, 2, 42, 141, 40, 247, 194, 40, 168, 87, 141, 136, 125, 152, 127, 146, 236, 253, 134, 225, 51, 85, 107, 62, 248]).buffer, "manufacturer": 6, "manufacturerData": new Uint8Array([1, 9, 32, 2, 42, 141, 40, 247, 194, 40, 168, 87, 141, 136, 125, 152, 127, 146, 236, 253, 134, 225, 51, 85, 107, 62, 248]).buffer }, BluetoothDevice: { "id": "6f:00:ce:b4:2c:8b", "rssi": -90, "data": new Uint8Array([2, 1, 26, 2, 10, 12, 10, 255, 76, 0, 16, 5, 81, 28, 74, 203, 201]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([16, 5, 81, 28, 74, 203, 201]).buffer } ]
so I see that I have 3 devices around me
I have sevral queesion about it :
- why I don't see the name of the device "david-Iphone", "My-computer" ? like I see when I scan using my phone?
I have try to add time using
getTime()
but he gave me
821.90802001953
the MDBT42Q doesn't have an internal clock? , can I add to it RTC devcie to get the time?
or maybe there is another device that already have rtc inside of it?
4.is there any way I can save the data as text\json ? and then upload it to my device ?- after I save the wanted devcies after scan , is there any way to know how much free space I got left on the devcie?
Thanks ,
- why I don't see the name of the device "david-Iphone", "My-computer" ? like I see when I scan using my phone?
-
-
I understand
I feel now I have more then enough to start,
Thanks for all the help !another related question:
I have another think I want to do -run a scan once every second and get the signal and mac of the around and save it to the device. (and then decide if I want to connect to it or not , by MAC or signal)how do I do this?
-
OK
update the firmware to 2.05
now how to continue?
Thanks,