Thursday, July 25, 2024

JTKE LTE 4G USB Modem Simple Review

JTKE LTE 4G USB Modem Simple Review

I am using my phone as an Internet modem, and it is overheating.

So I took out the JTKE LTE 4G USB modem to connect to the Internet. I bought this modem at quite a cheap price, yes it does not have 5G, maybe that is the reason it is cheap.

This is not just a modem, it can be a wifi router as well. It uses the normal SIM card, not the nano or micro SIM card. I am not sure it is called the mini SIM card. Is not the name card size SIM card as well. A lot of the people may not know or have forgotten, the very first version of the SIM card is actually (name) card size SIM card.

Pro. It is working as it should be. Cheap, easy to setup. USB modem and wifi router.

Cons. Wifi is always working, but the USB modem only working for Windows 11 only, other OS may need more effort to get it to work.

Configuration

The preset SSID (hotspot name) and password is printed on the USB modem. Another admin (and password) is use to change the SSID and password of the modem. To change the SSID, password or admin password, just use a browser access to http://192.168.100.1/

macOS (Ventura 13)

Wifi access is no problem. I have issues getting it working as a USB modem on macOS. Since nothing was written on the modem or user manual, I am not sure what chipset the modem is using. I guess it is Huawei, trying to install the Huawei driver, but either unable to install on the macOS Ventura properly, or it is not the correct driver.

Later I found it was stated on the online merchant website, it is using a Qualcomm 9600 chipset. I can not confirm, as I can't find the driver for macOS.

Windows 11

It just plug and play, working ok on Windows 11 without any configuration. It Seems like Windows is still the best support for third party hardware.

Chrome OS 2024

It can detect the modem, but is unable to connect to the Internet.

Debain 12 Linux

Haven't tested yet.

Tuesday, July 23, 2024

Is it a Good Time To Use an Alternative Than Windows Solution?

Is it a Good Time To Use an Alternative Than Windows Solution?

CrowdStrike impact

As a software developer, I always meet people who only use Microsoft Windows solutions, even though Windows is not stable to work as a server (their solution is to reboot 1-2 times every week). Still these people choose Windows as their software solution, for 2 reasons, 1. They only know Windows. 2. An IT manager will not be fired for choosing the Windows solution.

I thought Windows NT should be quite stable after being developed for many years, until the 'CrowdStrike BSOD' case happened (on 19 July 2024). It caused a lot of flights to be delayed, the USJ (Universal Studio Osaka, Japan) payment system was not working etc. etc.

CrowdStrike is an antivirus and security platform. CrowdStrike pushed a software update last Friday that causes BSOD (Blue Screen of Death), the Windows system goes into a non-stop booting loop.

An antivirus or security software shouldn't cause a kernel error or a system error. CrowdStrike is supposed to protect the system, not the other way round. That came into my mind, is it a good time for the IT solution people to rethink, should we use an alternative solution other than Windows, for example Linux. (Ok, I know CrowdStrike crash Linux before as well)

Linus Torvald is cautiously accepting Rust to be used in Linux kernel development, one of the concerns is the stability of the Linux kernel. Think twice again, it is less likely that an IT manager will choose an alternative solution than Windows. Why? For the same old reason, an IT manager will not be fired for choosing the Windows solution.

I would like to see more varieties in software solutions. Why? The Windows BSOD is a good reason.

Friday, July 19, 2024

A Quick Solution To Microsoft BSOD Today (CrowdStrike)

A Quick Solution To Microsoft BSOD Today (CrowdStrike)

1. Boot Windows in safe mode.
2. del C:\Windows\System32\drivers\CrowdStrike\C-00000291*.sys
3. reboot

Thursday, July 18, 2024

QEMU with command line

QEMU with command line


Introduction

QEMU is Quick emulator. This tutorial works on Qemu 9.0.1.

Installation

Debian: $ apt install qemu
Homebrew: $ brew install qemu
Linuxbrew: $ brew install qemu

Using qemu

Create image:

$ qemu-img create -f qcow2 alpine_disk.qcow2 12G
$ ls alpine_disk.qcow2
⇒ only created a 192k image file, even though it was stated to be 12G. The file will grow if it needs more space.

Launch QEMU

$ qemu-system-x86_64 \
-enable-kvm -m 2G -smp 1 \
-hda alpine_disk.qcow2 \
-boot d -cdrom alpine_linux.iso \
-netdev user,id=net0,net=192.168.0.0/24 \
-device virtio-net-pci,netdev=net0 \
-vga virtio \
-device AC97

## if no AC97 audio, just remove it
## -enable-kvm, use kernel kvm virtualization
## -cpu host, if you have this error warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]

Hardware virtualization

Modern CPUs have hardware virtualization. Qemu performs much faster with hardware virtualization. For macOS, no KVM, use -machine type=q35,accel=hvf, for macOS virtualization framework.

## Linux -enable-kvm
## macOS -machine type=q35,accel=hvf

Install Alpine Linux

Choose Alpine Linux as an example, because it is small and simple.

Installation:

1. keymap (us,us)
2. network setting use default or [dhcp]
3. timezone [Singapore]
4. mirror [1]
5. add in new user (other than root) with username and password
6. Which disk to use [none]? sda ## depends on your system
7. How would you like to install it (sys, data, lvm…)? sys
8. Erase disk? y

Alpine Linux on Qemu

After the OS installation:

$ qemu-system-x86_64 \
-m 1G -smp 1 \
-hda alpine_disk.qcow2 \
-netdev user,id=net0,net=192.168.0.0/24 \
-device virtio-net-pci,netdev=net0 \
-nodisplay

Qemu display
## -nographic, not creating another window
## -vga virtio -display default, shows progress and login prompt

Reset terminal

If you need to reset terminal for word wrap.
$ reset
$ tput smam

Ssh from host to guest OS

Using ,hostfwd=tcp::2222-:22

## map host os port 2222 to guest os port 22
$ qemu-system-x86_64 \

-netdev user,id=net0,net=192.168.0.0/24,hostfwd=tcp::2222-:22


$ ssh user@localhost -p 2222

Thursday, July 11, 2024

Easy Install Docker On Debian 64 bit

Easy Install Docker On Debian 64 bit

This is using command line.

Easy way (Debian)

I found an easy way to install Docker on Debian 64 bit (arm64 and amd64). I just tested on Debian 12 Bookworm, didn't try on Arm platform. If you fail, may be Docker didn't provide the binary of your platform, for example Debian 32 bit.

$ apt update
$ apt upgrade
## need curl and apt-utils
$ curl -fsSL test.docker.com -o get-docker.sh && sh get-docker.sh
$ docker -v
⇒ version 27

Test Docker
$ sudo docker run hello-world ## docker need root
⇒ Hello from Docker!
If you see the Hello message, it is working.

macOS (Homebrew + Docker Desktop)

Homebrew only install the docker (client), you need a Docker daemon). Docker Desktop can start the Docker daemon. Docker Desktop is available for download, available in macOS, Windows and Linux platform.

$ brew install docker docker-compose
$ sudo docker run hello-world ## to test

You can use Colima (lima) + qemu to replace the Docker Desktop, it works.

Thursday, July 04, 2024

Unix Compress Tips (gz xz etc)

Unix Compress Tips (gz xz etc)

Another incomplete jumpstart tutorial or tips for unix compression.

There are a few types of unix compress format eg. gz, bz2, what are the differences? Z is very old unix compress, probable no one is using it now. The gz and bz2 (bzip2) is quite common for compressing text base file, eg. source code. The gz and bz2 format existed and commonly use for a long time (80s, 90s to...).

The xz is newer, it has a better compression ratio, but it also takes more resources (cpu and ram), normally used to compress large binary files. The Zip is very common in Windows systems.

The is how to compress 2 files, dummy and hello.txt:

## compress found in debian ncompress package
## '-c' to create archive, '-O' to output to stdout
## '-cO' same with '-c --to-stdout'
## '-cO' same with '-cf -'
$ tar -cO dummy hello.txt | compress -c > hello.tar.Z
⇒ hello.tar.Z

## gz, -z for gz
$ tar -czf hello.tar.gz dummy hello.txt

## bzip2, -j (capital J)
$ tar -cjf hello.tar.bz2 dummy hello.txt
⇒ hello.tar.bz2 in gzip2 format

## xz, -J
$ tar -cJf hello.tar.xz dummy hello.txt
⇒ hello.tar.xz in xz format

## zip
$ zip -r hello.zip dummy hello.txt

updating: dummy (stored 0%)
updating: hello.txt (deflated 49%)

Hope you enjoy these quick tips.