Thursday, December 24, 2020

PlayStation DualShock 3 and 4 Controllers and Linux

Linux things I want to remember and find in the future.

Connecting PlayStation DualShock 3 (sixaxis) and DualShock 4 controllers to Linux systems.

https://wiki.rpcs3.net/index.php?title=Help:Controller_Configuration

---

The DualShock 3 on Linux works with HIDAPI, allowing for the controller to work through USB as well as Bluetooth. To use the DualShock 3 Backend, users need to create a file called /etc/udev/rules.d/99-ds3-controllers.rules (you will need root permissions to create this file), and fill it with the following:

# DualShock 3 over USB
KERNEL=="hidraw", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0268", MODE="0666"

# DualShock 3 over Bluetooth
KERNEL=="hidraw*", KERNELS=="*054C:0268*", MODE="0666"

After this you must either:

  1. restart your computer for these settings to apply or
  2. run sudo udevadm control --reload-rules and replug in your controller

This will allow RPCS3 to communicate with the DualShock 3. Users can then select RPCS3's dedicated DualShock 3 pad handler in the Gamepad Settings menu. 

---

The DualShock 4 on Linux works with HIDAPI, allowing for the controller to work through USB as well as Bluetooth. To use the DualShock 4 Backend, users need to create a file called /etc/udev/rules.d/99-ds4-controllers.rules (you will need root permissions to create this file), and fill it with the following:

# DualShock 4 over USB
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0666"

# DualShock 4 Wireless Adapter over USB
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", MODE="0666"

# DualShock 4 Slim over USB
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666"

# DualShock 4 over Bluetooth
KERNEL=="hidraw*", KERNELS=="*054C:05C4*", MODE="0666"

# DualShock 4 Slim over Bluetooth
KERNEL=="hidraw*", KERNELS=="*054C:09CC*", MODE="0666"

After this you must either

  1. restart your computer for these settings to apply or
  2. run sudo udevadm control --reload-rules and replug in your controller

This will allow RPCS3 to communicate with the DualShock 4. Users can then select RPCS3's dedicated DualShock 4 pad handler in the Gamepad Settings menu.

 

 

Monday, November 16, 2020

Calling a Service Company for Furnace "Repair"

The furnace stopped working at my Dad's place between November 13 and 14. It was working on the 13th. I was in, both days, cleaning in anticipation of putting up some cousins for a few days.

After fooling around with the thermostat and other things on Sunday, I called out a, let's say “FurnaceCo”, service technician. Diagnostic appointment confirmed for “between 0700 and 1100 on Monday”. That’s the 16th of November.

Met technician at approximately 0940. He spent a little while examining the furnace and then told me that the “heat exchanger” was cracked, showing me a photo on his phone of a slightly conical tube with a small crack. I asked him how he took that photo. The answer was, “With my phone.” I asked if he had some sort of tiny inspection camera on a rod, or something similar and he said, “No.” I asked how much it would take to repair, roughly. He was vague and said that it would be probably a few thousand dollars, that it probably wasn’t worth doing because that is most of the way to a new furnace. I asked him what, approximately, a new furnace might cost. He said, “I’m not allowed to give pricing.” Okay, fair enough, I know there are a lot of variables involved. He then went on to tell me that the “limit switch” had failed and that there “might” be a problem with the controller board or other components that are “heat sensitive”. That seems like a stretch, the PCB is by the air intake, below the burners, but okay. I asked about the cost of those items, and he suggested the switch might be a few hundred dollars. It’s possible that I misunderstood and that he meant the controller PCB, but he was waving at the limit switch when he stated the price.

The next part of our exchange was him asking me if I wanted to get a quote on a new furnace and that he could arrange for a sales guy to come see me right away. I agreed to that and he suggested 1100, which I also agreed to. Of course, there is a charge for the diagnostic call-out, which I was aware of. The tech told me several times that if I bought from FurnaceCo, the cost of the service call would be deducted from the cost of the new furnace. As if I, or your average customer, could tell the difference if it were marked up by $3100 or $3000.

I paid for the $99+GST service call, and he left, leaving me a copy of the invoice. Shortly after he left, he phoned to tell me that the sales guy, who I will call “Tré”, wasn’t able to come until 1600. I agreed to that.

I decided to dig a little more deeply into how furnaces work in general, and Carrier furnaces specifically. It turns out that the photo the technician showed me on his phone was of one of the burners, not the heat exchanger. Odd. He did not open up the housing where the heat exchangers sit.

There is an LED on the controller PCB that produces a flash code based on troubles it detects. I wish I had looked at that a little more carefully on the weekend. I found an installation manual for the specific model of furnace, with a circuit diagram. The flash code started out as 1-3, which translates as “limit or flame roll-out switch lockout”. I learned that the flame roll-out switch has to be manually reset. Looking at the circuit diagram, and tracing the wiring from the PCB, I figured out which one was the flame roll-out switch, and that there is only one in this furnace. I reset the switch and powered up the furnace. The flash code changed to 3-3, which translates as “limit or flame roll-out switch is open”. I had to wonder why the technician didn’t reset the flame roll-out switch. That’s when I started swearing to myself. 

Double-checking the circuit diagram and the actual wiring, I confirmed the location of the limit switch and removed it. It is attached to a small PCB which is inserted into the body of the furnace where the heat exchanger lives. The switch itself is a sealed unit. It’s basically a temperature sensor which opens and breaks the circuit if the temperature gets too high. This one is rated for 170 degrees F. Part number is HH12ZB170. Cost is $12 USD online, plus shipping. Cost at Amre Supply is $31, available right now; substitute part number PHL506 rated at 170 degrees. I did not have a multimeter with me, but presumably the technician tested the switch, as he wrote on the invoice “limit switch open”. He also wrote, “error code 1+3” which suggests that he really didn’t reset the FRS. My swearing was considerably louder and more pointed at that point. I went to Amre Supply and purchased the part. See below for some further learnings about error codes and partial absolution for the technician.

Back at the house, I installed the limit switch, powered up the furnace, and watched as it ran through its start up routine and then fired up the burners. More swearing. More reading on the possible causes of overheating.
It turns out that one cause of overheating could be “inadequate combustion air supply”. I took a look at the filter, and realized that it hadn’t been changed since Dad passed away. He used washable electrostatic filters. I’m not sure if they are a good idea, or if they have a limited lifespan, but the filter was pretty dirty. I pulled it out and installed a second one that appeared to be clean and was sitting beside the entry door. After a bit of research, it seems like the “cons” of electrostatic filters might outweigh the “pros”.

It’s possible that there is a deeper issue with the furnace, but at this point, I think that’s unlikely. I haven’t found any suggestion that a cracked burner is a problem. You can buy replacement burners for about $25 USD each. I will keep a close eye on the furnace for a couple of weeks and check that the carbon monoxide detector is working properly. If there turns out to be a bigger issue, I will call Reliance for a quote and repent my evil ways.

Now I have to ask myself, “Do I consider this a lesson learned and eat the $100?” After all, had he reset the FRS, replaced the limit switch, and told me to get a new filter, I would have considered the $100 money well spent, even though I would have felt (even more) stupid about the filter. I’ll have to think on this a bit.

I learned later that error codes are not held through a power cycle, and that 3-3 changes to 1-3 after three minutes, so I have to give the technician the benefit of the doubt on the FRS question. There are still the significant matters of telling me that the “heat exchangers are cracked” when he did not look at the heat exchangers, showing me a picture of a burner with a crack and calling it a heat exchanger, not pulling or mentioning the filter, and not thinking it worthwhile to replace (or bypass as a test) the limit switch.

At 1530, I phoned FurnaceCo to cancel the sales call. After a short explanation from me and being placed on hold for a few minutes, I was informed that the sales call had been cancelled. At 1544 “Tré” called me to ask if I had cancelled the sales call. I told him that I had. He asked if I wanted to reschedule, and I told him, “Not at this time.” After a lengthy pause he said, “Okay, thanks.” Unfortunately, I have no way of knowing what was going through “Tré’s” mind during that pause.

I have to wonder whether the technician and “Tré” have a hustle going. Maybe this is how FurnaceCo increases business; there are also those, presumably profitable, potential sales of “protection plans” to consider. Maybe this is standard practice in the industry. It would be “gotten away with” for probably 999 of 1000 customers, and there would be plausible deniability for that 1 of 1000.

Wednesday, June 3, 2020

Double Standards and Cognitive Dissonance

There are a lot of disturbing things going on in the world today. You probably won't be surprised to hear that I have things to say about a number of inter-related topics. Most of this has been said before, and by others, but I believe it needs to be said again (and again).

Americans: A lot of this screed will seem to be aimed at Americans. A lot of it is. But, almost all of it applies to Canada too; lesser in degree mainly by virtue of having a much smaller population. If you, as a proper and good Canadian, have decided or announced that “this is an American problem, it’s not like that in Canada”, you need to open your eyes to the lived experience of the indigenous peoples, black people, brown people, Asian people, non-heterosexual/binary people, the poor, and more.

Bad apples: I have heard several politicians, in interviews, say, “It is only a small percentage of bad apples among the police that are the problem.” Why is it that protesters are not viewed in the same way when a small percentage become rioters? The comparison is murder vs looting. You can decide for yourself how you feel about which of those weighs more heavily on the scales of justice.

Protesting and pandemic orders: When done by primarily white “fine people” who feel their “rights and freedoms” are being taken away, it is brave and patriotic and armed protesters are calmly observed by local police.When done by primarily non-white “thugs”, without guns, who have lived their entire lives with the consequences of systemic racism and bias, they should “obey the lock-down orders if they don’t want to get hurt”, and they are gassed, shot at, driven over, beaten up, and arrested by local police.

Militarization of Police: I cannot think of a valid reason why civilian police forces should have access to military resources. They do not have the training, the discipline, or the leadership to deal appropriately with those levels of killing power. Hand guns and rifles are enough, thanks, and in about 98% of interactions they have, billy clubs, shields, and tasers are perfectly adequate. If any kind of domestic situation truly requires military intervention, then it’s time to call in the military. This should never be undertaken lightly or on the whim of a single politician.

Religion: For those who believe, whatever your faith, in a higher power, I have to ask, “Are we not all children of your God?” The heart of discrimination and racism is believing that people who are not of your tribe are somehow less human than you are. In the current times, I am seeing what I can only interpret as many people believing that people who are not of their tribe are not human at all. It seems to me that those who proclaim their faith the most vehemently are the very same ones advocating for, and committing, the worst acts of discrimination.

Racism: It is facile to proclaim “All lives matter” and feel like you’ve said something important. Don’t say that until it becomes true. I hate to break the news, but it won’t be true in my lifetime. Ignoring the reality of systemic racism and discrimination dismisses the injustices happening all around us. Consider the truth of the list of “things you can’t do while black.” That list includes jogging, daring to complain about bad service, sleeping in your own bed, riding your own horse, driving your own car, walking down the street, being a “regular” kid, being a tourist, going shopping, going to your job, getting upset, buying designer anything, wearing a hoodie, swimming, taking a nap, listening to loud music.... It’s a very very long list. Does this seem right? Fair? Just?

Socialism: I don’t understand why this has become such a despised and dirty concept, to be discounted and dismissed with such venom. I do have a basic understanding of the politicization of the term in America. Maybe it's better to say, “democratic socialism.” Textbook definitions aside, what do you think socialism means? Fundamentally, it’s giving a crap about the members of your society. To me it means coming to a consensus, as a society, about what things are minimum standards for all people and working toward implementing those things. You could start with the “Universal Declaration of Human Rights”. You could examine the majority of European nations and honestly assess what sort of “festering hellholes” they have become. Yes, socialism means public services and taxes. Is there both waste and room for improvement in most socialist countries? Yes. In Canada? Absolutely. We are not going to all agree about everything in the most minute of details, but we have to come to a workable agreement. If you think you don’t have socialism in America, start by acknowledging your publicly funded: social security, medicare, fire services, police, military, schools, colleges, parks, libraries, monuments, museums, etc. Which leads me to....

Public funding: How is it that there is ample money to militarize civilian police forces and nowhere near enough money for emergency healthcare during a pandemic, or, really, ever? Never mind the public money that is literally poured into supporting arms manufacturing, oil and energy, banking, agriculture, and whatever other lobby groups have the ears of the politicians. There’s always enough money to start a war and then fight it for years on end. Capitalism, you say? Interesting definitions at work here. Sensible allocation of public resources isn’t even on the table for discussion because those discussions are constantly subverted by false analogy.

I would like to leave you with a couple of terms: “double standards” and “cognitive dissonance”. Please consider their meaning and how they might apply to you.