The Android Bluetooth Connection

Suppose someone came to talk to you and said, “I need your help. I have a Raspberry Pi-based robot and I want to develop a custom Android app to control it.” If you are like me, you’ll think about having to get the Android developer tools updated, and you’ll wonder if you remember exactly how to sign a manifest. Not an appealing thought. Sure, you can buy things off the shelf that make it easier, but then it isn’t custom, and you have to accept how it works. But it turns out that for simple things, you can use an old Google Labs project that is, surprisingly, still active and works well: MIT’s App Inventor — which, unfortunately, should have the acronym AI, but I’ll just call it Inventor to avoid confusion.

What’s Inventor? It lives in your browser. You lay out a fake phone screen using drag and drop, much like you’d use QT Designer or Visual Basic. You can switch views and attach actions using a block language sort of like Scratch. You can debug in an emulator or on your live phone wirelessly. Then, when you are ready, you can drop an APK file ready for people to download. Do you prefer an iPhone? There’s some support for it, although that’s not as mature. In particular, it appears that you can’t easily share an iPhone app with others.

Is it perfect? No, there are some quirks. But it works well and, with a little patience, can make amazingly good apps. Are they as efficient as some handcrafted masterpiece? Probably not. Does it matter? Probably not. I think it gets a bad rep because of the colorful blocks. Surely it’s made for kids. Well, honestly, it is. But it does a fine job, and just like TinkerCad or Lego, it is simple enough for kids, but you can use it to do some pretty amazing things.

Continue reading “The Android Bluetooth Connection”

Video Clips With Emacs

Sometimes it seems like there’s nothing Emacs can’t do. Which, of course, is why some people love it, and some people hate it. Apparently, [mbork] loves it and devised a scheme to show a video (with a little help), accept cut-in and out marks, and then use ffmpeg to output the video clip, ready for posting, emailing, or whatever.

This was made easier by work already done to allow Emacs to create subtitles (subed). Of course, Emacs by itself can’t play videos, but it can take control of mpv, which can. Interestingly, subed doesn’t insist on mpv since it won’t work on Windows, but without it, your editing experience won’t be as pleasant.

Continue reading “Video Clips With Emacs”

Linux Fu: Windows Virtualization The Hard(ware) Way

As much as I love Linux, there are always one or two apps that I simply have to run under Windows for whatever reason. Sure, you can use wine, Crossover Office, or run Windows in a virtual machine, but it’s clunky, and I’m always fiddling with it to get it working right. But I recently came across something that — when used improperly — makes life pretty easy. Instead of virtualizing Windows or emulating it, I threw hardware at it, and it works surprisingly well.

Once Upon a Time

First, a story. Someone gave me a Surface Laptop 2 that was apparently dead. It wouldn’t charge, and you can’t remove the keyboard without power. Actually, you can with a paper clip, and I suggested pulling it to see if the screen would charge by itself. They said they had already bought a new computer, so they didn’t care.

Unsurprisingly, once I popped the keyboard off, the computer charged and was fine. You just have to replace the keyboard or use another one. Or use it as a tablet, which it is set up for anyway. But I have plenty of laptops and computers of every description. What was I going to do with this nice but keyboardless computer? Continue reading “Linux Fu: Windows Virtualization The Hard(ware) Way”

Linux Fu: The Cheap Macropad Conundrum

You can get cheap no-brand macropads for almost nothing now. Some of them have just a couple of keys. Others have lots of keys, knobs, and LEDs. You can spring for a name brand, and it’ll be a good bet that it runs QMK. But the cheap ones? Get ready to download Windows-only software from suspicious Google Drive accounts. Will they work with Linux? Maybe.

Of course, if you don’t mind the keypad doing whatever it normally does, that’s fine. These are little more than HID devices with USB or Bluetooth. But what do those keys send by default? You will really want a way to remap them, especially since they may just send normal characters. So now you want to reverse engineer it. That’s a lot of work. Luckily, someone already has, at least for many of the common pads based around the CH57x chips.

Continue reading “Linux Fu: The Cheap Macropad Conundrum”

Wayland Will Never Be Ready For Every X11 User

After more than forty years, everyone knows that it’s time to retire the X Window System – X11 for short – on account of it being old and decrepit. Or at least that’s what the common narrative is, because if you dig into the chatter surrounding the ongoing transition there are some real issues that people have with the 16-year old spring chicken – called Wayland – that’s supposed to replace it.

Recently [Brodie Robertson] did some polling and soliciting commentary from the community, breaking down the results from overĀ 1,150 comments to the YouTube community post alone.

The issues range from the expected, such as applications that haven’t been ported yet from X11 to Wayland, to compatibility issues – such as failing drag and drop – when running X11 and Wayland applications side by side. Things get worse when support for older hardware, like GeForce GT610 and GT710 GPUs, and increased resource usage by Wayland are considered.

From there it continues with the lack of global hotkeys in Wayland, graphics tablet support issues, OBS not supporting embedded browser windows, Japanese and other foreign as well as onscreen keyboard support issues that are somehow worse than on X11, no support for overscanning monitors or multiple mouse cursors, no multi-monitor fullscreen option, regressions with accessibility, inability of applications to set their (previously saved) window position, no real automation alternative for xdotool, lacking BSD support and worse input latency with gaming.

Some users also simply say that they do not care about Wayland either way as it offers no new features they want. Finally [Brodie] raises the issue of the Wayland developers not simply following standards set by the Windows and MacOS desktops, something which among other issues has been a point of hotly debated contention for years.

Even if Wayland does end up succeeding X11, the one point that many people seem to agree on is that just because X11 is pretty terrible right now, this doesn’t automatically make Wayland the better option. Maybe in hindsight Mir was the better choice we had before it pivoted to Wayland.

Continue reading “Wayland Will Never Be Ready For Every X11 User”

Embedded USB Debug For Snapdragon

According to [Casey Connolly], Qualcomm’s release of how to interact with their embedded USB debugging (EUD) is a big deal. If you haven’t heard of it, nearly all Qualcomm SoCs made since 2018 have a built-in debugger that connects to the onboard USB port. The details vary by chip, but you write to some registers and start up the USB phy. This gives you an oddball USB interface that looks like a seven-port hub with a single device “EUD control interface.”

So what do you do with that? You send a few USB commands, and you’ll get a second device. This one connects to an SWD interface. Of course, we have plenty of tools to debug using SWD.

Continue reading “Embedded USB Debug For Snapdragon”

Personal Reflections On Immutable Linux

Immutable distributions are slowly spreading across the Linux world– but should you care? Are they hacker friendly? What does “immutable” mean, anyway?

Immutable means “not subject or susceptible to change” according to Merriam-Webster, which is not 100% accurate in this context, but it’s close enough and the name is there so we’re stuck with it. Immutable distributions are subject to change, it’s just that how you change them is quite a bit different than bog-standard Linux. Will this matter to you? Read on to find out! (Or, if you know the answers already, read on to find out how angry you should be in the comments section.) Continue reading “Personal Reflections On Immutable Linux”