How to Turn on unpaired BLE device (BT-low energy)? - bluetooth

I have a bluetooth energy air purifier. The button to turn it on and put it in pairing mode is broken, but the mask can still charge. My PC and phone can see the device, but can't pair/connect to it (needs an app) but the app is in default state since I moved to new phone (old phone is factory reset - forgot that the mask button was broken).
How do I turn the device on and put in pairing mode w/o the power button working? Anything I can do for it?
I couldn't find a replacement button on ebay and the product isn't sold in North America. It's the LG Puricare Mask Gen 2. Is it a lost cause T.T. I found a teardown video of it.
https://youtu.be/VGjd6fnD-oE

Related

Capturing input device disables two-fingers-for-right-click capability

I have a convertible laptop for which there isn't great Linux support: the desktop environment is unable to detect when the device is in tablet mode, so the keyboard and touchpad are always active, which makes tablet mode almost useless. I've solved this problem by writing a simple Python script that grabs the keyboard and mouse input devices and proxies events to the system until a specific key sequence is received. At this point, it stops proxying events until the same key sequence is seen again.
The code is effectively a slightly more complex version of this example (which reproduces the problem):
import evdev
import selectors
dev = evdev.InputDevice('/dev/input/event5')
ui = evdev.UInput.from_device(dev)
dev.grab()
selector = selectors.DefaultSelector()
selector.register(dev, selectors.EVENT_READ)
while True:
for key, mask in selector.select(0.1):
dev = key.fileobj
for event in dev.read():
cat = evdev.categorize(event)
print(cat)
ui.write_event(event)
/dev/input/event5 is the touchpad. The system has the following devices:
Available devices:
/dev/input/event0: Lid Switch
/dev/input/event1: Power Button
/dev/input/event2: Sleep Button
/dev/input/event3: Power Button
/dev/input/event4: AT Translated Set 2 keyboard
/dev/input/event5: SynPS/2 Synaptics TouchPad
/dev/input/event6: Wacom HID 5072 Pen
/dev/input/event7: Wacom HID 5072 Finger
/dev/input/event8: HDA Intel PCH Mic
/dev/input/event9: HDA Intel PCH Headphone
/dev/input/event10: HDA Intel PCH HDMI/DP,pcm=3
/dev/input/event11: PC Speaker
/dev/input/event12: ThinkPad Extra Buttons
/dev/input/event13: Integrated Camera: Integrated C
/dev/input/event14: Video Bus
When this code runs, movements and regular click actions work just fine, but a two-fingered click, which normally acts like a right-button click, no longer works. Since this code is just taking events and re-sending them, why is this behavior different? How would I get the two-fingered click to work as expected?
I think what you need is very similar to this, altered of course to your needs
Python_Touchscreen_RightClick.py
if this doesn't work for you you can also try and use Gesture Event from python-libinput

how do i connect my custom button board to pc via usb?

Goal/Challenge:
i have a challenge to create a custom controller without using special controllers e.g. raspberry pi or Arduino.
What i have done so far:
I have created a custom board that takes power from the red wire and outputs power via the coloured strip depending on what buttons the user has pressed. 1= on, 0 = off, 9 outputs, 1 power input
my problem:
i am trying to connect this board to my pc via usb.
I have seen that some chips can be used to do this but, i have no idea of what to use or how to connect them.
Help/Info i need:
what could i use to connect my button board to pc(windows 10) via usb?
Extra:
i don't know if i'm posting this in the right place or i'm using the right tags.
please suggest any changes i need to make
If you just want to make a custom button board the easiest way is to buy some buttons e.g arcade buttons und a zero delay usb encoder.
Plugs into pc via usb and work like any controller.. you can set the desired functions for each button via windows itself.

How can I disable Chrome opening the Windows on-screen keyboard when debugging as iPad?

When I open the Chrome debug view and set the device to "iPad Mini" to simulate its screen size (and touch events), interacting with a text input causes the Windows on-screen keyboard to open.
This computer is not a tablet, and has never had a touch screen. In the Windows Ease of Access -> Keyboard settings Turns on the On-Screen Keyboard is off.
I can only assume that Chrome "simulating" an iPad Mini is causing Windows to think there's a touchscreen. I've been using this feature for a few months now, and the keyboard opening only started happening recently. I may have simply flipped a switch in the settings (of Chrome or Windows) on accident. If that's the case, I'd like to know how to flip it back!
This is frustrating because I have to close the keyboard each time as it covers up a large portion of the web-app.
The same page without the "iPad Mini" simulation does not open the keyboard:
(This keyboard also opens when choosing any device that has a touch screen, not just iPad Mini.)
Chrome doesn't emulate the keyboards of the device profiles you pick. An image of a keyboard will show for certain ones, like the iPhone 5X, but it is non-functional and is just present to allow you to see how the various elements on the page respond to the keyboard. You can see my answer here for more details on viewing that. However, this is not the same keyboard you are seeing.
It looks as though there is something in Windows, which is triggering the on-screen keyboard. I'm not sure why it would still appear if you have it disabled, but you could try a couple of things, based on what I've found online:
Make sure 'Touch Keyboard and Handwriting Panel Service' is set to disabled in Services (services.msc)
SetLOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\ ShowTabletKeyboard from value 1 to 0 (regedit.exe)
Check there is no other 3rd party software running, which may affect your keyboard behaviour.

how do you control Alert behavior on J2ME phones?

I'm testing my midlet on 2 different Nokia model phones: 7210 Supernova and 6600 Fold.
Both are S40 5th ed SP1, still I get a different behavior with the alerts and I was wondering whether there is a way to fix that.
At various times my MIDlet beeps and puts up a self-dismissing Alert for n seconds (meaning it goes away after n seconds unless the user dismisses it earlier).
If that happens after the phone goes into screen saving mode (darkens), this is what happens:
on the 7210 Supernova, the screen lights up, you see the alert, and if you don't touch it it dismisses itself after n seconds and you can see the background screen - this is the desired behavior.
on the 6600 Fold, you hear the beep, but the screen remains dark. If you now press some button the phone lights up, but only then it displays the alert. The rest is similar. But this is problem because the whole MIDlet is at a stop until the user hits a key.
So I can fix it by not displaying this alert on phones that behave like my 6600, but I still want it on phones that behave like my 7210. Is there a way to check for this
programmatically? what do you check for?

How can I detect when iOS 4 keyboard is on-screen versus Bluetooth?

I have some code that moves a UITextView out from under the on-screen keyboard. The problem is, sometimes people will surely use a Bluetooth keyboard instead.
How can I detect that that is what's being used for input?
Also, BTW: I can detect when the on-screen keyboard goes away, but how to approach the same intention when it's a wireless keyboard?
Thanks.
You can detect when a bluetooth keyboard is connected by registering for UIKeyboardWillShowNotification the same way that you did for detecting when the keyboard hides. If a BT keyboard is connected, you will not receive a keyboard will show notification when the text field or text view that is requesting the keyboard becomes the first responder.

Resources