A peculiar case of I/O errors with cheap SFF-8643 cables

This saga could also be named “Why my very expensive LSI 9305-24i drops disks?”.

I recently acquired (from ebay as I cannot justify giving $2000NZ to local scumbags) an LSI 9305-24i controller to drive a 24bay NAS.

The reason switching from LSI 9112-8i with RES2CV360 SAS2 expander is because the LSI 9112-8i is bottlenecked by the 8x PCIe 2.0, thus limiting the throughput of a 24 disk array to about ~100MB/s per disk.

The LSI 9305-24i made a significant boost in the performance, with ~200MB/s (maxing out Seagate Ironwolfs) per disk.

Continue reading A peculiar case of I/O errors with cheap SFF-8643 cables

Approximating SoC of a Lithium Ion battery using atan

I recently deep-dived into a topic of look up tables and interpolation simply because I wanted to have relatively simple representation of State of Charge for one of my projects. The difficulty I found is that the LiFePO4 batteries have a very flat discharge curve and are really hard to approximate.

Continue reading Approximating SoC of a Lithium Ion battery using atan

High Side Power Switch for a microcontroller

High Side Power Switch for a Microcontroller

Notes: The MOSFET is of a P-Channel type, can be pretty much any P-Channel as long as the On-Resistance is low and it can sustain sufficient current. The NPN transistor can also be pretty much anything with sufficient hfe (>50), and can tolerate >100mA collector current spikes.

Continue reading High Side Power Switch for a microcontroller

Remove Google’s Digital Wellbeing spyware from Android via ADB

Recently my phone has been updated to Android 10, with it I found the Digital Wellbeing spyware reinstalled and now fully baked in (no uninstall or disable option).

The prerequisite for this process: you need ADB (the installation of which will not be covered here). No root needed (yet).

Here is the ADB command you need to run:
adb shell pm uninstall -k --user 0 com.google.android.apps.wellbeing

This change is semi-permanent, if you want this nagware back, I can’t really help you (you might be able to reinstall it from the store).

I do not understand the reason one would use this app. If you think you spend too much time on your phone, you don’t need an app to tell you that. My phone is a tool, and having some lock-out and nagging (self-inflicted!) on your own device is absurd.

It is absurd to bake this app in, the only reason is to spy on its users more.

If you hate this app (and everything it stands for) as much as me give it one star on the google play store.

Viofo A119 – Beeping with the Format prompt after a long downtime

One of my A119 Cameras started to beep while presenting the “Format Yes/Cancel” prompt after long downtime. The date was also reset.

Before pandemic this was not as annoying as it would almost never do it, but with pandemic and work from home it does it pretty much every start up.

The Problem would go away once the date would be updated via GPS and the issue not come back until next very long shut down.

Continue reading Viofo A119 – Beeping with the Format prompt after a long downtime

Opus BT-C100 reverse polarity protection

I recently bought an Opus BT-C100, as unlike my other Lithium Ion chargers, has a discharge test feature. It also fairly quickly estimates internal resistance of the cell, which is a good health indicator.

Unfortunately due to A123 26650 cell being of upside down construction I released the magic smoke out of the Opus BT-C100 by reversing polarity. The smoke escaped through the battery holder slit.

Continue reading Opus BT-C100 reverse polarity protection

Dealing with data obfuscation in some Chinese dash cameras

This is post relates to the extracting GPS coordinates form Novatek based dash cameras.

About an year ago I was contacted by someone who tried to use my script on MP4 files generated by their camera, only to get garbage data out. It appeared that the camera was obfuscating the coordinates stored in MP4 (the speed and heading was recorded correctly). It was not a bug because provided player was decoding them correctly.

Continue reading Dealing with data obfuscation in some Chinese dash cameras

GT06E GPS Tracker Part 2: Establishing connection

This is a continuation from Part 1.

As of writing this I already had complete solution (as far as getting tracking data is concerned), a multi-process TCP server with a mysql database back-end.
The server code itself is not pretty thus I am cautious about sharing it at this stage (I will “open-source” it once I cleaned it up).

One caveat: my solution does not support batch mode (where the payload contain multiple concatenated location and other packets).

The assumption is that the reader is somewhat familiar with python and sockets.

Continue reading GT06E GPS Tracker Part 2: Establishing connection