First time user - how to seup BLE message on my MDBT42Q,2v04? #3335
Replies: 18 comments
-
|
Posted at 2020-04-13 by @MaBecker What about using the EspruinoHub for this? A BLE -> MQTT bridge for Raspberry Pi and other Embedded devices |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-13 by Robin Mon 2020.04.13 Hi @david1234321, Here is a really quick way to demo how Espruino BLE devices interact with web pages. Just did this as a quick reminder of how to find the link and do the web page button click watch the LED remotely function: purposely not pasting link so as to inform where to find in future Hunt for 'Go to the Puck.js site' beneath 'Once Web Bluetooth is set up' heading. make sure the MDBT42Q is not connected with an existing WebIDE Use that page to to find the 'Try Me' buttons to the lower right of code blocks Has a simple deployed web page : Also check out the myriad of tutorials: |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-14 by David1234321
maybe there is a very simple even "dumb" guide ? Thanks, maybe I didn't understand the using of the BLE Thanks , |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-14 by @gfwilliams
No.
Yes, it can work on its own just fine.
No. However you told us "I want to create a simple BLE that will "post" my website". Bluetooth LE devices don't magically connect to the internet. It's like complaining that your Laptop can't view websites when you have no WiFi router.
If you want the MDBT42Q to connect to the internet then you need something to act as a 'bridge' between bluetooth and the internet - like you need a WiFi router to connect your Laptop to the internet. That's what we're suggesting the Pi is for, but it's by no means the only thing you could use. For instance using Web Bluetooth on a phone/tablet/laptop is super quick and easy: https://www.espruino.com/Web%20Bluetooth will show you how to create a website which will communicate with the MDBT42Q - but only when that webpage is open. Still, that may be what you want? This is just a super simple webpage which will output whatever text your MDBT42Q decides to print. You can then do with that what you want. |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-14 by Robin Tue 2020.04.14 Good Morning David @david1234321,
Thank you for your feedback. Is it possible there is a bit of mis-communication here as we sense a bit of frustration on that end? The post title indicated 'First time user' and the desired project goal is quite a bit narly! We made the assumption that many skills had previously been acquired, thus only a bit on getting started with Espruino was all that was needed. I provided the links in post #3 in order to perform the ideas that were presented using just a browser to load and interact with, rather than connecting and coding the PI hardware solution, which could be time consuming. We need a bit a bit more about your PC, tools and knowledge, so please respond with those items as listed here: The first post pinned at the top of the Forums category:
containing loads of recommended reference links along with detail that would assist us in getting a user up and running quickly. Q: Are we working with the MDBT42Q breakout board, or a project connected to the module itself? But maybe that was a bit overkill, and some videos will trigger some more appropriate questions: this is five years old and uses a USB connection but is a good introduction This video demos writing code that is sent over BLE: |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-16 by David1234321 OK what I want to do is :
now I have some questions:
hope now my project is more understanble and you can help me continue working on it , Thanks , |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-16 by Robin Thr 2020.04.16 re: steps 1 and 2
Success @david1234321 !!
I was with you up until that statement. I'm not sure if this is a technology misundetanding, or a language misunderstanding.
Regarding post #7 "data as BLE" and post #4 "see my BLE" and "using of the BLE" I would have expected something like post #7 "my own data using BLE" instead. BLE B_luetooth L_ow E_nergy is a technology not a web server, as the choice of words leads me to believe there lies the misunderstanding. The simple post #3 load the web page and click a button is the easiest demo to show how a web page communicates with the MDBT42Q. What is the result of clicking on that 'Try Me' button? Load the page using a BLE equipped phone, should the PC not support BT. With that response, we'll be able to answer the questions in #7 post. B.T.W. are we using the breakout board as I inquired back in post #6? |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-17 by @gfwilliams Hi,
Yes, but in Android Google turned automatic scanning for them off by default because it was being abused for advertisements Effectively what you're asking for is a QR code over Bluetooth?
Yep: You basically broadcast a URL/ID and the title comes from the website you link to.
You can add a unique ID to the URL - much like how you'd track any other visit on the web.
Usually the text comes from the website's title, so you can change that easily.
Actually I think for what you want, there's a good chance you don't need an internet connection at all. |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-19 by David1234321 I think this is a language misunderstanding. I will try to make my project simpler and in 2 steps : step 1: I think this is a very simple and easy example for what I want to do , and after I will do this I will understand better what to do and do other steps. and this is what I have upload the blinking part - just to see it's working .... and now it's working what about
said? how can I "save" the user MAC that saw the message ? and what does this line do?
If I understand correctlly (which I guess I didn't :-) ) this is what I have uploud : also how can I add more information in the message ? another small message?20 chars? Thank you for the time and the patience that you give me :-)! |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-19 by Robin Sun 2020.04.19 Hi @david1234321 glad to see the progress. Did you get the quick demo link #3 post transfering data back and forth to the MDBT42Q working?
Please check out the functions here that make up the NRF class, then once the desired data has been collected, we'll work on the save part. Just yesterday, a link resurfaced to what @AkosLukacs previously published, but using the magnometer on a Puck, which the MDBT42Q doesn't have. Please read over what is a close working example to what I believe you are after. > [Dynamic reading of BLE characteristic?](http://forum.espruino.com/conversations/346038/#comment15218965) code in post #5 link there
See heading 'An Example' for instructions on URL shortening: or are you after appending values as information to that URL? > 'I don't want QR code' Is it possible what is really desired is how NFC works as the indication is to use a phone to pull floor detail from each device?
|
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-23 by David1234321 Hello Robin
Thank you for the help |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-23 by Robin Thr 2020.04.23 Hi David, I'm near my limit on NRF understanding at the moment as I'm still trying to get tinyMQTT and a MQTT broker running on Windows10 to assist further with the advertising questions. With success with that ~1 week? I hope to do exactly what you are doing. In the mean time, lets get a few questions confirmed and maybe some others may assist.
So, do you want those 100 people to be able to see, or do you want to block all but the five or so you give a secret key to?
I'm not sure, but I don't see why not. In the EddyStone example, that device is a Beacon, and it's purpose is to advertise a URL, when another Android device is in close proximity. As EddyStone is mentioned a lot, and there is a reference in the link above, is the intent to make your MDBT42Q behave exactly like an EddyStone beacon then? As you mention Beacons several times, we can safely say we are not dealing with NFC and rule that out then? |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-23 by David1234321 yes I'm only intresting in using Bluethoot beacon not NFS . I don't need anyone to connect to the Bluethoot (there will be nothing to connect to...), just want to advertide using it . I saw I can advertise URL , but I want to add myown text - not just URL .this is my big question ? Thanks , |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-23 by Robin
Confirming, the above is just a typo and 'NFC' was intended?
I'm not 100% sure, but as you will need to write the receiving code part in order to detect that text, it will be easy enough to try. What does the EddyBeacon spec say? Please provide link and reference when that is found, as the setAdvertise() data attribute does make the URL distinction, for it's corresponding value, meaning that there might be a text attribute if a URL string is not intended. |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-24 by @gfwilliams How do you want the text to be displayed? Next to the URL? The text comes from the web page at that URL's title I believe. I did actually have an example where I did It might be that you can actually have a script on there that changes the page's title based on the text in the link. Otherwise if you only have a limited set of text you want to display you could just change the url: |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-27 by David1234321 I understand another related question: how do I do this? |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-27 by @gfwilliams
Just call http://www.espruino.com/Reference#l_NRF_findDevices and it'll call back with the devices that are found. It's worth supplying a filter though as if you run it somewhere busy you can potentially get so many BLE devices it uses up your available memory :) |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2020-04-27 by David1234321 great Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2020-04-13 by David1234321
Hello,
I want to create a simple BLE that will "post" my website
I have connected the device using a serial-usb and I can see it on the "ESPRUINO WEB IDE"
"Found MDBT42Q,2v04"
now what ?
I have look at the tutrial , and mange to make LED1 blink
but now what?
how do I write a code to it the will publish my website "www.myWeb.com" ?
Thanks ,
Beta Was this translation helpful? Give feedback.
All reactions