|
Wordle 391 5/6*
β¬β¬π¨β¬β¬
β¬β¬β¬π¨π©
π¨π©β¬β¬π©
β¬π©π©π©π©
π©π©π©π©π©
|
|
|
|
|
Wordle 391 6/6
Just made it!
β¬π©β¬π¨β¬
β¬π©β¬π¨β¬
β¬β¬π¨π¨π¨
β¬π©π©β¬π©
β¬π©π©π©π©
π©π©π©π©π©
Get me coffee and no one gets hurt!
|
|
|
|
|
Wordle 391 6/6*
β¬β¬β¬β¬π©
β¬β¬β¬β¬π©
β¬β¬π¨β¬π©
β¬π©β¬β¬π©
β¬π©π¨β¬π©
π©π©π©π©π©
Sheesh! I don't know why I didn't see this earlier. Fortunately I ran out of letters in time.
|
|
|
|
|
Wordle 391 6/6
β¬β¬β¬π¨β¬
β¬β¬β¬β¬π©
β¬β¬β¬β¬π©
π¨β¬β¬π¨π©
β¬β¬π©π©π©
π©π©π©π©π©
Just made it
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
A few years ago I wanted to see if I could activate my garage door motor from my phone.
I knew if I could remotely just close the switch on the two wires of the garage door motor I could do it.
I knew nothing about Arduino but knew it might be an option.
I figured I could get it to activate a relay to close the switch.
Next I contemplated how to send a signal wirelessly.
I had a smart phone (Android) and I knew it supported a wireless protocol named Bluetooth.
>BOOM< Bluetooth was trending.
Enter "Classic" Bluetooth
These were the days before a thing called BLE (Bluetooth Low Energy -- which is a marketing ploy).
Anyways, I searched for a component which would allow me to send a signal from my Android phone to the component which would be connected to an Arduino.
Here's the Bluetooth module that hobbyists use: HC-05 Wireless Bluetooth RF Transceiver[^]
These BT components vary wildly by manufacturer are very cranky & often don't work to proper specs. But once you learn all that, you're on the inside. I got mine working.
Security Protocol
Since this would be opening my garage door I knew it would be important that no one else be able to connect to the device.
Here's the really cool thing. Bluetooth is a secure transmission type which includes pairing & bonding functionality.
The HC-05 allows you to set a 4-digit passcode and forces the user to enter the passcode to pair & bond (create a lifetime connection).
HC-05 Stores Secret
So, if you wanted to open my garage door you had to know the passcode to pair. Only once properly paired could you send the transmission which would activate the garage door motor.
The bonding causes the HC-05 to store a secret that only the newly paired phone knows.
For each phone that successfully enters passcode it would store a new secret for that new phone.
iPhone User: BLE Only
I have used an Android phone for 10 years, but I finally gave in and became a iPhone user (2 weeks ago).
iPhones do not support Classic Bluetooth*. They only support BLE.
I knew I needed to replace the HC-05 with one that supports BLE.
I had worked with a replacement component named a HM-10 (DSD TECH HM-10 Bluetooth 4.0 BLE iBeacon UART Module with 4PIN Base Board[^]).
Blithely I Roll On
I had great success using the component. Wrote a new iOS app (Swift) for my iPhone, tested and it sent the same data over BLE to the newly added HM-10 which activates the garage door motor.
It was a lot of work & I was glad it actually worked. Now my family members who had iPhones could get the (now 6-digit passcode) and use my app to open my garage door if I allowed it.
The Problem
I paired my wife's iphone and it worked great.
I went to open the garage door and discovered it didn't work on my phone. Hmmm???
I had to add all kinds of logging into the iOS app and was back and forth with her phone and mine.
1 Phone Only
Finally I discovered -- very painfully -- that the HM-10 will only store 1 Secret for one phone.
As soon as you pair a new phone, it removes the secret to the old phone and that phone will no longer work.
User has to go into Bluetooth settings and remove the device and repair it. !!!!
Got So Lucky (but could'a been bad luck)
So all those years of having multiple Android phones paired to the HC-05 and it worked great and I never knew how lucky I was that it worked. It all depends upon this little device.
Tried Numerous Other BLE Devices
Arduino Nano 33 BLE -- doesn't support security protocol, anyone can connect & send data.
EMB1082 Seeed Studio cheap BLE module[^] - Won't pair with iPhone.
Another cheap knock off Arduino with BLE -- no security protocol.
It's amazing how difficult this very simple thing is to solve.
You can also read an extensive article here on codeproject about my garage door opener solution[^].
Just had to kind of get that out of my system.
I'll be receiving yet another BLE module today and I'll test it to see if it will work (uses security protocol and allows multiple connections).
|
|
|
|
|
Have you tried posting this as a Tip/Trick instead?
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Maybe I should've marked it with the Rant icon??
|
|
|
|
|
You didn't use an ESP32?
They have embedded bluetooth and BLE into the MCU SoC, and it's like half the price of an arduino board with way more power.
You can write your own pairing negotiation with it.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Thanks for reading my rant and replying.
I was hoping you might offer some adivce.
honey the codewitch wrote: You can write your own pairing negotiation with it.
I don't really want to write my own pairing negotiation. I mean the basic "Phone"-based pairing is super simple. It just works. It forces the user to provide the passcode & then stores the secret that will be used in future.
However, would you mind showing me the code that would run on the ESP32?
I haven't been able to determine if ESP32 will force the pairing or not, but if there is just some ESP32-based code that I call to insure the pairing runs (requests passcode & stores secret) that would be really great.
I thought the Arduino Nano 33 BLE would definitely include that, but Arduino libraries don't support the pairing yet. Which I thought was crazy.
Thanks again for reading.
|
|
|
|
|
I've never actually used the secure/encrypted pairing feature myself, as I've never needed the security feature.
I just know there's a callback for handling it in the NimBLE stack.
The code you are asking for is more appropriate for an article than it is for a comments section. One of the reasons I haven't written any bluetooth articles is frankly, bluetooth doesn't actually work, and I like it when my code works.
Maybe bluetooth 6 will finally work? Until then I use it only at gunpoint and when I do I wave a dead chicken over it and pray to gods I normally don't dare name.
Anyway, I found this.
Pairing or bonding from ESP32 Central using NimBLE stack - ESP32 Forum[^]
This doesn't cover everything, but their problem hints that I could be wrong. The problem hints that the stack itself is storing credentials, which in your case is not what you want. It might be possible to change that by digging into the HAL, as the entire thing is open source, but YMMV.
Never mind, I misunderstood your initial post. Forgive me, I'm a bit slow right now. Yes, the ESP32 should do what you want. I just don't use that feature but involves creating a callback and handling the key validation at which point i believe encryption is enabled.
I'm not a bluetooth expert though. Frankly, I think whoever designed it should be forced to use it.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Thanks for the ideas. I will check it out in the coming days.
|
|
|
|
|
|
I'd keep the pairing as simple as possible and keep any secret codes or passwords in the Arduino (or whatever device you use). Can make a pretty trivial app on the mobile device with MIT app inventor.
|
|
|
|
|
Buy a second (and third?) HM-10 and/or have multiple relays across the switch in parallel. Either device could close the switch. I am not sure if you would need a second microcontroller or if you could manage with one.
Minor update to phone app to allow selection of target device when pairing.
Might be able to leave the old HC-5 in the mix as well for your old user base.
You might need a mini-rack if you take this approach.
Find a simple solution with stuff that already works.
|
|
|
|
|
englebart wrote: Buy a second (and third?) HM-10
Great minds!!
I walked out to the garage and took this picture[^] of the two HM-10s connected to the garage door opener.
It's not the most elegant solution, but it does work.
I have a 5V / 1amp power supply (salvaged from a old (2002) PocketPC device) that I am using to power the device.
When I added the 3rd HM-10 the power supply couldn't provide the amps it needed to activate the relay so I can only have two.
Next, I will replace the relay [^] with a MOSFET [^] & see if I can power more HM-10s.
Thanks for reading the thread and chiming in.
|
|
|
|
|
Sweet!
Thanks for the update.
If you want two factor auth, then hook them in serial! You trust two neighbors to go into your garage, but only if they are both present! James Bond level Q-ery .
|
|
|
|
|
Why is it that so many sites - the latest being AWS's portal - refuse to understand that the only country in the world that uses MM/DD as a date format is the US. OK, and Belize. And Canadians when they are being accomodating and polite.
But no one else. The rest of the world is looking at 07/03 thinking "7th of March?".
I honestly don't understand why companies do this other than they straight out don't realise no one else does does dates like this. I've banned ambiguous dates at CodeProject and DeveloperMedia because when we need to get dates nailed down and the conversation includes an American, a Canadian and an Australian (not walking into a bar) the conversation falls apart quickly if we can't trust the date that's been written on the contract.
Can we please, each of us, take a quick look at our code and maybe, just maybe, rethink how dates are presented. Here are some options:
- IF you're tight on space then 3Jul is better than 03/07 and 07/03. And sure, we then run into language issues, but if your site is predominately english then your readers have far bigger issues.
- 2022-07-03 is universal. Everyone gets that, even SQL.
- 3-Jul-2022 is friendly and obvious. 3-Jul-'22 is shorter if you really need s pace.
- 1656806400000 is accurate, unambiguous, precise to the millisecond. And fairly useless. Don't do this.
cheers
Chris Maunder
|
|
|
|
|
I feel your pain.
Since a long time, I am using the 3 Jul 2022 format.
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
Why not make it crystal clear and use the ISO format 2022-07-03.
Not possible to make mistakes reading it and as far as computer goes, this format sorts just perfectly fine...
|
|
|
|
|
Let's all just agree to use the Stardate: 75999.6
Except that's Apr 10 2401 in the NextGen Stardate system.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Insularity, much like the State Department's map featuring "Here be dragons" almost everywhere outside the US.
|
|
|
|
|
|
Greg Utas wrote: the State Department's map featuring "Here be dragons"
At least the rest of the Western world hasn't (yet) allowed the insane to take over the asylum. One of the reasons that I refuse to visit the US any more is that with all the "woke-ism" and other nonsense, no one (including the locals) knows what the proper standards of behavior are any more.
I say nothing of the physical danger of going into many (most?) major cities.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Visit Canada and you'll be disabused of the notion that the rest of the West hasn't allowed the insane to take over. Or New Zealand or Australia, for that matter. And that's not even mentioning the EU, which is almost beyond hope.
|
|
|
|
|
Well, there are still plenty of places in Israel that I haven't visited yet...
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|