I'm using blogspot for content that I want to preserve publicly. This is about Andrzej Georgiew, a spectacular photographer that did amazing portraits. Check the links:
One of the very few articles that apart from saying that life is shit, actually tries to produce some suggestions on how to improve the situation and proposes other metrics to differentiate low and high IT R&D performers.
Ubuntu 19.04 now contains samba 4.10, that should support all the SMB/CIFS extensions needed by MacOS to use the samba shares as TimeMachine storage. Tested with MacOS 10.14.5.
So let's do some TimeMachine backups on Ubuntu 19.04!
Assumptions:
your Ubuntu is running on some PC, with some fixed IP,
you have your Mac connected to the same network.
First install Samba:
apt install samba
Let's get the old samba config out of the way
mv /etc/samba/smb.conf /etc/samba/smb.confORG
Now create and edit /etc/samba/smb.conf (this is the same as in previous samba mac backups howto)
[global] server role = standalone server passdb backend = tdbsam obey pam restrictions = yes security = user printcap name = /dev/null load printers = no socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=524288 SO_SNDBUF=524288 server string = Samba Server %v dns proxy = no wide links = yes follow symlinks = yes unix extensions = no acl allow execute always = yes # Special configuration for Apple's Time Machine fruit:model = MacPro fruit:advertise_fullsync = true fruit:aapl = yes fruit:time machine = yes ## Definde your shares here [backup] path = /space/backups valid users = backups writable = yes durable handles = yes kernel oplocks = no kernel share modes = no posix locking = no vfs objects = catia fruit streams_xattr ea support = yes browseable = yes read only = No inherit acls = yes
Create and edit /etc/avahi/services/timemachine.service (this is the same as in previous samba mac backups howto)
Add the backup directory, backup user and set permissions on the directory. This also sets the password for SMB/CIFS access: useradd -m backups smbpasswd -a backups mkdir -p /space/backups chown backups /space/backups chmod 700 /space/backups
Now either reboot your Ubuntu or restart avahi and samba.
And there, the new backup destination should show up in all macs connected to the same network. REMEMBER KIDS, DO ENCRYPTED BACKUPS!
There are lot's of howtos out there how to get Linux servers to support TimeMachine networked backups for Mac clients. But lately they all stopped working due to latest Mac High Sierra updates. Apple moves away from Netatalk protocol and recommends using SMB. Unfortunately the latest Samba you will get on Ubuntu 18.04 is 4.7, and this does not support so called fruit extensions needed by Mac to have Time Machine writing it's data to the destinations. We need to get Samba 4.8 that was released not so long ago.
So let's start. I'm assuming you do not have any other samba installed. The backup folder will pop up as "backup on <your linux server name>" and you will be using user name backups with the password you'll set on the way. I strongly recommend to read the howto I've posted at the end. It allows for a multi user setup.
So I'm still using the Arduino racing pad since 2 years. I'm still racing in LFS, now in Assetto Corsa with it. I've complained about what's bad about it. And now I've solved another issue that I've had - the crappy joysticks. I've used FSR402 tensiometers for both accelerator and braking. This seems much more natural than using the lever sticks. And precise. Now I can drive powerful cars with no ABS and TC in Assetto Corsa :)
Why tensiometers?
When I've started thinking about that crappy joysticks, I've looked at what the game consoles are doing for the trigger buttons on the pads:
X360 pad uses a potentiometer with clever levers,
Playstation uses tensiometers,
X One uses Hall Effect sensors.
I wanted to buy the replacement parts for the X360 to check the levers, but the tensiometers are just cheaper. The Hall Effect sensors seem to be a very cool idea, but you really need to have an idea how to sort out the mechanics.
How does it look:
Bad. Ugly. But works.
I've placed the tensiometers along another edge of this beautiful lunch box. And now I can use both methods of controlling the speed of the car by just remapping controls. Frankly speaking - I haven't used the levers since I've got the tensiometers running.
This just works. I'm using this for gaming weekly or biweekly (you know, 3 kids) for the last 3-4 months.
Using tensiometers for game controlers has another potential application. People making pedals for racing always look for methods to measure travel for acceleration and pressure for braking - to simulate real car hydraulics. All not ridiculously expensive steering wheels on the market use potentiometers for all pedals. And with a very simple mechanism (1 swing, some foam) you can get a pressure measuring tensiometer based pedal - you'll need a bigger tensiometer thou.
Code:
The requirements for having this running are described in the part3 of this "journey".
#include "HID-Project.h"
const int pinLed = LED_BUILTIN;
const int pinButton = 2;
// this is for printing to COM - set to 1 to get printouts
I've posted these articles on the Arduino racing pad that I've built: part1, part2 and the video and problems. I've complained a bit on the fact that what I have done has only 8bits of information for the steering wheel. That should be enough for steering, but when driving straight in LFS, you could see that the steering wheel "jumps" between positions. 8bits of information is 256 possible positions of the wheel and when you get 270 degrees of rotation on a potentiometer, that is visible - you cannot turn the wheel by a half of a degree.
My third kid started sleeping better, so now I have bits of time here and there to play around with toys. After a beer or two I've said to my self "8bits steering improvement - how hard can it be?".
The ingredients
Back then, one year ago, you needed to copy the custom HID.cpp and USBAPI.h files into the Arduino IDE libraries to get the Joystick definition. Now you don't have to. Arduino 1.6.8 IDE allows for libraries to be added and guy named Nico prepared marvelous library called Arduino HID Project 2.4.3. This library contains Gamepad definition with 32 buttons, 2 dpads, 4 16bit axis and 2 8bit axis.
So I've used:
Arduino Leonardo with the tupperware racing pad I've build in the previous posts,
Arduino IDE 1.6.8,
Arduino HID Project 2.4.3,
moderate amount of alcohol.
The solution
The new Arduino HID project makes it very tidy and simple to set up the controler I needed. The code for the Arduino Sketch is given below. When someone will try to copy and play with that, be sure to check which axis has how many bits. X, Y, RX, RY are 16bits, Z and RZ are 8bits. The Arduino HID needs to be downloaded and copied into the libraries directory of your Arduino IDE installation. I'm sure there are other places you can put it in, but I guess I'm too lazy :)
The results
Now I've got all axis on 16 bits. Arduino Leonardo A/D has 10 bits resolution, so that is an overkill. The USB device is 64 times more precise than what Arduino can return, but it does not matter. I got what I needed on a very simple set of libraries. Now when I turn the wheel knob everything is super smooth.
Now the only thing keeping me from winning every LFS game is my set of mediocre virtual driving skills. Next improvement - some other mechanical potentiometers for the throttle and brakes.
The Code
#include "HID-Project.h"
const int pinLed = LED_BUILTIN; const int pinButton = 2;
float steer = (float)analogRead(0)/(steeringmax-steeringmin)*diff + min; float accel = ((float)analogRead(2)/(accelmax-accelmin))*diff + min; float brake = ((float)analogRead(1)/(brakemax-brakemin))*diff + min; // on second thought, I just could have multiplied one thing by 64 to get the result
int gearup = digitalRead(2); int geardown = digitalRead(3);
if ((accel <= 3) and (accel >= -3)) { accel=0; } if ((brake <= 3) and (brake >= -3)) { brake=0; }
The goal is to have the right hand operate the steering wheel
potentiometer, the left hand's index and middle finger to operate
accelerator and brakes, left thumb to operate gears up and down. After a
long debate I came up with this:
The Plan
The ingredients
The thing that looked the most like the case for the device was a
tupperware-like food container. It's also easily available, easy to
drill and put things on and has a low low price of zero.
I also bought:
Arduino Leonardo (clone I guess),
two thumb joysticks,
four buttons (two used),
one linear 10k potentiometer,
some cables.
The stuff
Building
Building was a fun and easy part. I've screwed everything to the container, made a hole for cabling and connected together.
Connecting it all was easy:
5V and ground everywhere,
digital pins 2 and 3 to the gear switches,
X axis of the thumb joysticks (both) to analog lines 1 and 2,
potentiometer to analog line 0.
I haven't connected the rest of the stuff available in the joysticks - that was not needed.
I've used Arduino IDE 1.6.4 and Windows 7 64bit. I'm a linux addict, but
since this is to be used in racing games, I wanted to test it straight
away.
The step 2 of the howto mentioned above provides a test sketch (Arduino
program) that allows for the arduino board to send signals as a joystick
to your PC. The code that I've made basing on that and other examples
in the net is presented below. You can switch displaying all values on
COM port for double checking if it works. You can also tune your
potentiometers and joysticks using max-min ranges. Keep in mind, that
Arduino reads potentiometers and joysticks, returning and integer
ranging from 0 to 1023, and the Joystick class requires the values to be
between -127 and 127 for each axis.
Summary
It just works! I can now play my racing games with a full analogue
controller without the hassle of a steering wheel. It's a different kind
of fun, but still fun :)
So I've always dreamed about getting a steering wheel for my PC and playing LFS. There are three downfalls of this idea:
Its large - so hiding it from my better half will be hard.
Its noisy - force feedback on logitech g25/g27 and force GT wheels use some sort of gear that emits a noise while turning the wheel. So playing after my kids are asleep is a no-no. And I would wake up my wife.
I've got a wife, who would like me not have a steering wheel for my games. There is a term WAF in audio world - the Wife Acceptance Factor.
I even borrowed a Logitech G25 from a friend and didn't like it for one more reason: it lags. You can see, that the wheel in the game does not turn as fast as you do. It lags more than a mouse.
I like playing LFS with my mouse, but there are two issues:
You cannot gradually add power or brake, so handling more powerful cars than the GTI is difficult.
Hardly any other racing game provides mouse steering, and I hate driving with keyboard.
I've seen the HIMOTO simulator for getting to know how to drive RC cars. (link from rchobbystore.co.uk) But it's not available here in Poland.
I want a device that is small, can be placed on my desk, would have analog inputs for steering, gas and braking, would have some buttons. And I can't find any. Console pads with analog sticks don't cut it. The steering precision is faaaar from what you can get with a mouse or a cheap wheel. I can live without force feedback.
So I've googled for one hour and just ordered an Arduino Leonardo clone, two analogue sticks for accelerating and breaking, some switches and an analogue 10k linear potentiometer for steering.
Of course I could get an axis for hand brake and clutch and a hat switch and a .... but let's keep it simple, down to the absolute minimum that is needed to play LFS. If this runs, I'll develop later on. SCRUM MVP FTW! This is my first project of the kind anyway.
There was a big product recall in the beginning of 2011, when Intel pulled back from the market B2 stepping 6-series chipset based motherboards. The problem was in chips marketed as H67, P67, HM67, HM65, Q67, Q65, B65, Z68, UM67, QS67, QM67 and server incarnations C202, C204, C206. The problem was that the 3 Gbps SATA ports stability degraded over time, while the 6 Gbps SATA ports remained fully functional. The link above from Anandtech discuses the case.
The problem can be observed by the following in your dmesg on Linux boxes:
[19115.610095] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[19115.614138] ata3.00: configured for UDMA/33
[19115.614164] ata3: EH complete
[19115.614422] ata3.00: exception Emask 0x40 SAct 0x0 SErr 0x80800 action 0x6
[19115.614489] ata3.00: irq_stat 0x40000001
[19115.614543] ata3: SError: { HostInt 10B8B }
[19115.614598] ata3.00: failed command: IDENTIFY PACKET DEVICE
[19115.614661] ata3.00: cmd a1/00:01:00:00:00/00:00:00:00:00/00 tag 0 pio 512 in
[19115.614664] res 51/04:01:00:00:00/00:00:00:00:00/00 Emask 0x41 (internal error)
[19115.614819] ata3.00: status: { DRDY ERR }
[19115.614873] ata3.00: error: { ABRT }
[19115.614931] ata3: hard resetting link
The thing to look at are the lines with SError, so:
According to many sites around the web, the above means SATA cable errors or SATA power supply errors. Strings ata3 and ata4 are the SATA ports that are experiencing the problem. The above means that this happened on first two 3 Gbps SATA ports on the board, as the kernel enumerates them starting from ata1. Ata1 and ata2 are 6 Gbps ports.
There are tools to check if your system might be affected for Windows, but there are none for Linux. Those tools check the revision of SATA controller. On Linux thou, the only thing to do is to run lspci and check the revision. 04 means potential problems, 05 means your system is OK.
Example of an affected system:
oshii:~# lspci | grep SATA
00:1f.2 SATA controller: Intel Corporation Cougar Point 6 port SATA AHCI Controller (rev 04)
Example of a system that is OK:
motoko3:~# lspci | grep SATA
00:1f.2 SATA controller: Intel Corporation Cougar Point 6 port SATA AHCI Controller (rev 05)
If you use 3 Gbps SATA ports and have revision 04 of the SATA AHCI Controller on a Sandy Bridge Intel 6-Series chipset, you might want to claim your MOBO under warranty.