carlfoxmarten: (Default)
I finally made an effort to try getting my second USB WiFi dongle to work today. First, trying it on Windows (the driver installed, but I couldn't figure out how to create a new, hosted WiFi network), then dredging through a whole bunch of forum posts to try to get it working on Linux.

With regards to WiFi drivers, Linux is both a Utopian Mecca, and a hellscape, at the same time.

On the one hand, lots of people are tweaking drivers to work with more chipsets and more Linux kernel versions. But on the other, the chipset names bear no resemblance to the model numbers of the devices using them, and some of the devices change chipsets depending on revision! So I have to search using several pieces of information and try each driver I find, until I find the one that works.

It took me about three or four drivers to find the right one, then I had to find someone else's adaptation of the official Asus copy of the driver. Fortunately, it worked once I got through the (relatively straightforward) process of installing the driver. And it's now working excellently well.

Then I ran into a problem with the NetworkManager program that actually manages all the network connections. Turns out, having two WiFi devices installed at the same time is supported, but if I didn't set it up to run my new, independent WiFi access point to run automatically when the device is plugged in, selecting the second WiFi device crashes the selection tool. I'll need to figure out how to report this bug, but with it set to launch automatically, I don't need to wait.

I am now ready to start trying to write this system! A sufficient amount of progress has been made.

Though I should probably get ready for some software version control, to be on the safe side. Much as I won't be releasing this source code any time soon, I'll want to make sure I have it all running smoothly before I start dumping code into both the remote device and the mini server I'll be writing.

It's a lot more progress than I was expecting to make today, so I'm pretty happy with myself.
carlfoxmarten: (Default)
The general concept for this project is having a collection of wireless temperature (and more, hopefully) sensors I can place in various locations (outside front and back, garage, etc) that we can monitor from multiple locations, via a web server somewhere in the house.

Currently, I have two cheap wireless temperature sensor systems from the same company, and it turns out both use the same remote sensors, with no way to prevent their base stations from listening to the other sensor. And technically, the same brand does sell a "double" base station with two sensors, but the price jumps a lot from any of their one-sensor models, and I couldn't afford it. Conversely, I already have a bunch of pieces that could, theoretically, be turned into a small network of wirelessly-connected temperature sensors.

I even have a pretty solid idea of how to handle the hardware of the remote sensors. The inexpensive microcontrollers by Espressif are both inexpensive, and all include WiFi capabilities. Then there's a massive list of easily connected tempearture, humidity, and pressure sensors for very little money.

On the positive side, the actual sensor modules are both cheap, and quite easy to connect in hardware, and talk with in software. I've chosen which module I want to use, but if I need to change to another one, it won't be that difficult to swap out software libraries to make sure it still works.

The more interesting part is the microcontroller. While I have a variety of them (I've been buying samples in a wide variety for quite while now, mostly out of curiosity), I'm leaning towards the ESP32 series. They also have BlueTooth capabilities, not that I think I'll be using that, but also are all dual-core, with at least one real-time clock, and that's about perfect for what I want to accomplish with it.

The other half of the system is actually a lot trickier than I'd anticipated. A single-board computer (shortened to SBC, apparently) that can run "normal" software (as opposed to embedded software) is my aim, for many reasons. These include compact size, quiet operation, built-in WiFi and wired network capabilities, and hard storage of some sort. The Raspberry Pi is a very attractive option to me for all of these reasons, but I didn't realize I'd wanted to experiment with something like this until very recently, and not only do I not have the funds for it, but the supply has actually been drying up due to many reasons. There may be "compatible" alternatives, but I'm not comfortable with them right now due to not knowing how well-documented they are.

Unfortunately, because it's essentially a system in two parts, I can't really build one half at a time, as the other half would need to be in place for testing. And I work so much better sort of building the whole thing up at the same time.

One thing that's holding me back right now is due to not understanding Linux's Network Manager system. Technically, if I was writing the central server code on my laptop (for eample), I could write the remote sensor module code to talk to the laptop's server code. But I'm not comfortable putting the password to our home WiFi network directly into my source code, even for testing.

Instead, I want to have a separate WiFi card that hosts its own WiFi network, without linking it to any other networks connected to the computer. Hopefully that improves additional security measures. I have a secondary USB WiFi adapter, and it works, but I don't remember how to make it start working again. Unfortunately, Linux WiFi drivers are in a terrible state of affairs, and nobody seems to have a central repository for USB WiFi device drivers.
(from recent experience, I'm not even convinced that Windows can easily do what I'm trying to do, either)
carlfoxmarten: (Default)
Apparently, I don't have many friends on here that have come over from LJ, so it's been less than encouraging to post here. I'm going to try posting again, and will see what happens.

Here, I'm going to comment on some of the many and varied projects I'm working on, in no particular order.

#1: "Xtris", a Tetris clone for the "Xtron Pro"


I'm quite interested in hand-held devices I can program myself, and one Kickstarter I'd backed years ago was for the "PocketStar" keychain-sized "retro" gaming device. Programming them is as easy as setting your Arduino development environment (IDE) for the device and hitting "Compile". I'd enjoyed this one enough, and broke mine through my own fault, so had ordered a pair of replacements, though they don't have anything larger from that company.

So I backed something that was larger, and advertised a relatively simple programming interface. It turned out to be called the "Xtron Pro", and isn't actually intended for the "average" retro gamer or retro game programmer. No, it's intended for kids learning to program. Which has some really frustrating limitations. For example, it uses a 16-colour palette. For the entire screen. As in, you can't show more than that many colours on the screen at a time. And the default colour palette isn't all that great, though you can change that at run-time. But not in the built-in image editor. So you have to know what you're doing when building your images.

Yes, I am still trying to do this, but it's slow going. Another problem is that you can't write C or C++ programs for it, at least not with the systems it comes with. Instead, you can use JavaScript or Python, both of which I'm familiar with as languages, but the API you're supposed to use is painfully poorly documented.

But it's coming along, and I've got the majority of the immediately important visuals already completed. Up next is the actual interactive parts, including all the animations I'll want to use. Though, with how much I'm having to learn about this platform as I go, it is in deed slow going.

#2: Remote Temperature Sensors


I know such things already exist commercially, but the problem I've run into actually started with the limitations of two such cheap commercial units. I bought a sensor/base station set by Le Crosse, which turned out be rather useful and quite accurate at our last house, because the shed had a tarp on one side which protected the sensor from direct sunlight. When we moved into this house, we didn't have anywhere near as useful a place to stick the sensor, and during a summer we had questions about how hot the garage was getting (as we store a second fridge and two upright freezers in there), so my temperature sensor got moved down there and never moved again.

After which I bought a second, different model of sensor/base station pair from the same brand. And they started to interfere with each other. Turns out, it's a serious limitation of the protocol (as someone has reverse-engineered it and published the information online), and there's nothing I can do about it at all. So I bought second one, from a different brand, which has worked well enough so far.

But, you know, there's other features I'd like to have. Given how difficult it is to have entirely reliable temperature sensors that are not influenced by direct sunlight, or sunlight heating up the grass below the sensors, I kind of want to have at least one sensor to the east of the house, another to the west, and maybe incorporate another one for the one in the garage. And, of course, three doesn't need to be a solid limitation. Plus, I'd like to be able to tell how humid it is outside, as I don't have any way to tell that right now.

So I have an idea of how to do it, but there's some limitations, and I'll want to do at least a few posts on how that's coming.

#3: USB-connected Media Remote keyboard


Unlike every other Android device I've ever had, the two Asus ZenPad 10 tablets I have don't like having BlueTooth on at the same time as the WiFi connection going. With both on at the same time, at some point in the future the WiFi connection is going to hang, right up until BlueTooth is turned off again. Which means I can't use already-existing media remotes, like I do with my phone. I should probably comment on my experience with those at some point, too.

Anyway, you can buy loads of cheap USB-capable microcontrollers, which are very easy to write code for, and already have a variety of modules that should be useful.

The problem comes in that the vast majority of USB-capable microcontrollers use USB-to-serial-port chips, that cannot be told to act like a keyboard. And while the ones I'm using right now don't have those chips, they instead talk directly to the computer over directly-controlled pins (using a low-speed USB communications protocol), the libraries available for these modules can't actually handle the media control scan codes.

I'm currently conversing with someone on the forum for the brand of microcontroller I'm using, but we're not getting anywhere very quickly due to how vastly complicated the USB specification is. Hopefully I'll get somewhere useful sooner rather than later...

#4: FM Radio in old PC speakers


Before I bought my current set of Altec Lansing speakers, I'd previously had a couple of older PC speakers. Combine this with how difficult it is to find FM radios with digital tuners, and how cheaply you can find moderately decent ones from China, I now want to put a small, credit card sized, single board FM radio tuner module into a pair of PC speakers.

In theory, it would be as simple as cutting a hole into the front of one of the speakers, but the front side of the speaker won't hold the LCD screen in place (due to me fiddling with it over the time I've had it), and I'm currently trying to figure out (with my extremely limited experience) what exactly I want it to look like when it's actually built.

One problem, for example, is that, even with all the things I know will need to go into the "main" speaker, it won't be heavy enough to hold it against the simple act of pressing any of its buttons. I could add an extra heavy weight to the bottom, but it would be simpler to either mount the buttons so they're pressed downwards, or (as the module I'm using has its own buttons already attached) use levers to convert downwards pressure to sideways pressure on the existing buttons. Which is a very interesting challenge all on its own.

Another is that, given that it doesn't take all that much energy, I want the backlight to be on all the time. Which wouldn't be too much of a problem, except that the default LED colour it came with was blue, and I'd rather have almost any other colour. Do you have any idea how hard it is to solder wires directly to surface-mount LEDs!?

#5: Monitor Stand


Not everything on this list is digital and/or electronics, though this directly relates to a hardware thing. I'd picked up a random LCD monitor off the street a few months ago, and had to figure out how to squeeze it onto my desk, given that my desk here is stuck inside my bedroom's closet.
(this is a bad idea, don't do it. I no longer have a random place to toss things while I figure out how to store it!)

Anyway, I'd inherited a variety of pieces of plywood from my last grandparent to pass away, so was able to put my main monitor (which, it turns out, was too high for how high I sit in my chair) on a single roll of 3D printing filament (obtained from one of the two 3D printers I still haven't used for that purpose yet) and a piece of plywood. Ideally, I'm supposed to have added a leg to each side of the plywood platform already, but it's so easy to overlook (since I'm always looking at the thing above it) that I just haven't done anything about it yet.

Plus, there's the problem with the mousepad for my laptop intersecting with a corner of where the stand will go, so I haven't been sure how to proceed on that front yet. I have enough tools that I should be able to do it, it just takes effort to pull off.

I can't move my main monitor pretty much anywhere but where it's currently sitting either. It can't move left, as it's already slightly obscuring the secondary monitor in that direction. It can't move right, because I have two pencil stands blocking it (which are also being blocked by other things on the desk so they can't move to the right either), as well as the shallow shelf I have behind it on the desk. It can't move up because that would cause more neck strain. And it can't move down because the stand the secondary monitor sits on is a small fraction of an inch below its left edge.

Once the stand is built, I'll be able to move my desktop USB power supply under there, reconnect the LED underlighting that I had on the previous setup, and add a bit of extra storage under there.

#6: Small plywood box


Turns out, one of the dollar store chains in my area has "craft" sized plywood. Technically five-ply, though the outer two layers are paper thin, so effectively three-ply. One size is square, four-and-a-half inches per side, and not actually anywhere near square. The other is about seven inches long by not quite three inches wide, and both are five pieces for about two bucks.

The square ones are close enough to the right size for drinks coasters, so I didn't have much to do with the long, thin ones. Until I realized that I had a use for a small box to fit under the phone stand on my desk. Thus far, I'm storing things inside the stand, and when I'm charging my phone, the cable bends too tightly and/or takes up too much space on the desk in front, so if I stood it up on a small box, it wouldn't be as much of a problem.

Now, while I have the tools to deal with smaller pieces of balsa wood (courtesy of the passing of my grandfather who used to build his own RC planes) and larger pieces of wood (due to the mitre box I'd bought a while ago), I don't really have tools sized to this scale in the middle.

Fortunately, all I want is a butt-joint, not a 45° mitre-joint, but even then I'm more than a little nervous about this. I am going to see this every day, so any obvious mistake is going to be entirely frustrating each and every time I look at it.

-----

Anyway, that's just some of the things I'm working on. And forgetting about. There's probably lots more, but I don't remember what they are right now. If I had a master list of them, I'd want to work on all of them, but it's simply not possible. Plus, I'd feel ridiculously guilty that I'm not working on any of them...

Profile

carlfoxmarten: (Default)
Carl Foxmarten

August 2023

S M T W T F S
  12 345
6789101112
13141516171819
20212223242526
2728293031  

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 19th, 2025 06:57 am
Powered by Dreamwidth Studios