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.

Thursday, June 27, 2024

Is Intel N100 Mini PC a Good Buy?

Is Intel N100 mini PC a good buy?

It depends on what you want to do with it. It should be good for general usage, but not for gaming.

The Intel N100 CPU was released 2023 January. It is using Alder Lake-N, base on Alder Lake but with some modification.

The Alder Lake family (aka Intel 7) is one of the latest architecture. The Alder Lake-N is the ultra low power consumption CPU, eg. N100 at 6 watts only. The Alder Lake-N has 4 E-cores (Efficient core) and no P-core (Performance care). (that’s why is cheaper?)

Integrated graphic is Iris Xe. Iris Xe is a high GPU, but it is so new that you might not able to find a proper driver for it.

N5105 using Jasper Lake architecture, which is older compare to N100. the integrate graphic cards perform comparable to the Iris Xe. Intel N5105 has Intel VT-x for virtualization. Both Intel N100 and N5105 has VT-x.

If you are working with virtualization software examples virtual box, Qemu, you might want to use the N5105, but Docker on Linux, doesn’t make use of the VT-x technology. For Docker users might want to consider using Intel N100.

Anyway talk is just theory. I am waiting for my N100 machine to delivery. Then I can do testing for reference.

Friday, June 21, 2024

Docker is good for ...

Docker is good for testing and production

Docker is a lightweight container, is small, fast and secure. Docker is easy to use (should be easy to setup as well).

Docker is good for testing and deploying. For sample, you want to test your application on Red Hat Linux. You don't want to install another machine, so your test it on Docker. For sure I prefer to test it on Alpine than Red Hat.

Sunday, December 31, 2023

Thursday, December 28, 2023

A Small Issue To Compile Usb-notify Program 2023

A Small Issue To Compile Usb-notify Program 2023

undefined reference to notify_notification_new

I like the usb-notify program a lot. This small little program displays a notification on the Linux desktop when a USB device is plugged in.

To compile I need libnotify-dev, libudev-dev package.

$ git clone https://github.com/wcampbell0x2a/usb-notify
$ cd usb-notify
$ make
⇒ bin/usb-notify

Note: Need notification-daemon running to show the notification.

It should just compile and be successful. If it doesn't it is just a small issue, but this small issue took me 1.5 days to try out many other ways, for example trying to recompile the dependency libraries.

This is what I get:

$ gcc -ansi -pedantic -g -std=c99 -W -Wextra -Wall \
`pkg-config --cflags --libs libnotify` \
-o bin/usb-notify src/usb-notify.o -ludev
…
undefined reference to `notify_notification_new'

Keep story short, there is no missing libnotify, as 'pkg-config --libs libnotify' will return '-lnotify' (refer to libnotify.a or libnotify.so), is just has to be put at the back of the compile statement:

$ gcc -o bin/usb-notify src/usb-notify.o -ludev `pkg-config --libs libnotify`

So you might just need to modify the Makefile will do.

Monday, December 04, 2023

How To Apply RM100 Government eWallet Incentive 2023

How To Apply RM100 Government eWallet Incentive 2023

Malaysia government give RM100 incentive for those those who is eligible. The RM100 can be applied through the following eWallet, Touch'n Go eWallet, MAE (Maybank), Shopee Pay, SETEL (Petronas?). Applying period is from 2023 5 December to 2024 20 February.

This RM100 can only be spent on merchants, not transferable or paying bills.

MAE

MAE app > eMadini icon > fill in information and submit.

Touch'n Go eWallet

TNG eWallet > eMadani banner > [x] agree T&C > Claim Now

OR

TNG eWallet > Profile (top right icon) > Inbox/Alert (top right) > click on the notification > confirm MyKad information > [x] agree T&C > Claim Now

Sunday, October 29, 2023

Johor Pay 2023

Johor Pay 2023



I am trying to help my aunt to make payment to property assessment fee in Johor, one of the electronic payment options is Johor Pay.

Sarawak Pay may have a chance of success, even if it is not, the residents are happily using it. Johor Pay has less of a chance, as Malaysia already has nationwide DuitNow QR, quite popular and accepted by many merchants. Is easier to ride on DuitNow QR rather than maintain its own payment network and platform.

Many Singaporeans came over to Johor Bahru. Johor Pay has to cater for Singaporean identification and mobile phone. When Johor Pay users go to Singapore or other states, they can't use Johor Pay, they have to use DuitNow.

The limitation of Johor Pay will limit the market expansion.

It is just my 2 cents.

Thursday, October 19, 2023

The mount point of Google drive in Chrome OS Linux

The mount point of Google drive in Chrome OS Linux

Chrome OS > File app > (right click on Google Drive) > select [ share to linux ]

From Chrome OS Linux, the mount point is:
/mnt/chromeos/GoogleDrive/MyDrive

Tuesday, October 17, 2023

Get Your Own Toucn'n Go eWallet QR Code

Get Your Own Toucn'n Go eWallet QR Code



TNG eWallet > Transfer > Receive (tab)

Your QR code is displayed. Your friend can scan the code and transfer money to you.

Friday, October 06, 2023

Upgrade Raspberry Pi Desktop 2022 to Debian 12

Upgrade Raspberry Pi Desktop 2022 to Debian 12



Much older Rpi Desktop

The reason I want to upgrade the Raspberry Pi Desktop to Debian 12 Bookworm is just to try out the new Linux kernel 6. The older kernel 5, released in 2019, is about 3-4 years old.

The upgrade takes me around 4 hours on my (older) machine. After upgrading, a lot of the Raspberry Pi Desktop settings were changed, and seems slower at the first glance. My advice is not to upgrade until the official release is out for Raspberry Pi Desktop OS.

How to upgrade?

Change the APT source from Bullseye (version 11) to Bookworm (12). Bullseye and bookworm are the code name for the Debian OS version.

  
# edit /etc/apt/sources.list /etc/apt/sources.list.d/raspi.list
eg. deb http://deb.debian.org/debian bookworm main contrib non-free

Monday, October 31, 2022

How To Get Maybank2u DuitNow QR Code

How To Get Maybank2u DuitNow QR Code


Use the "receive" tab to display DuitNow QR

What is a DuitNow QR code?

The easiest way is to ask the payee transfer money to DuitNow (mobile number). You can generate the DuitNow QR for the payee to scan. The DuitNow QR code is normally is red color. In Maybank app, you can specified the amount to be received.

DuitNow is Malaysia nation wide money transfer network, it normally use the mobile phone number as the account ID to receive payment. The DuitNow network can use MyKad IC, passport as account ID as well. Before you can receive payment from DuitNow, you need to active and link the DuitNow to one of you bank account.

Maybank MAE

At the home screen, click the center icon at the bottom.

It shows the camera display. On top, there are 2 tabs, scan and receive. Click on the receive tab to display to the QR code to receive payment.

Maybank2u app (to be obsolete)

At the home screen, click the center icon at the bottom.

It has 3 tabs on top of the display, scan, receive and pay. Click on the receive tab to display to the QR code to receive payment.

Monday, September 26, 2022

Washington Post Mobile App Does It Right

Washington Post mobile app does it right

Amazon reminds me, my Washington Post free subscription is going to end. Finally I opened the mobile app.

A lot of the traditional newspapers or magazines get it wrong. They put the PDF version of the newspaper (or magazine) and put it online as an online version. Washington Post is a hybrid version website and traditional version. You have a choice to display the printout layout, but once you click on the news, it will show the online version.

The PDF version is not good for mobile/desktop use, because the viewing devices may have different sizes, but the PDF format is fixed, the paragraph never wraps around according to the device. Washington Post app allows you to choose what type of news to be displayed like headlines, editor pick.

Wow! I think the Washington Post does it right.

Wednesday, September 14, 2022

iOS 16 Battery Percentage Display

iOS 16 Battery Percentage Display

iOS 16 is available for download and update. One of the changes that people are paying attention is the battery percentage displayed in the battery status bar. Anything special about this?

I just don't understand.

Tuesday, September 13, 2022

Google To Cancel Next Pixelbook

Google abandone the chromebook hardware, but hopefully they don't abandon the Chrome OS.

The chromeOS is a good idea and good implementation. It is a Chrome browser running on Linux, it also has Android framework, so it can run Android apk app. It also has a Debian-like Linux which runs in a VM container.

Only Linux users will appreciate chromeOS.

Thursday, August 04, 2022

Object Oriented Concept For Programmer 2022

Object Oriented Concept For Programmer

This is for beginners.

I try to explain object oriented programming is different ways, especially for beginners.

There are 4 things in OOP: Abstraction, Inheritance, Encapsulation and Polymorphism.

Example: Shape (abstraction)

Shape has area, this is abstract. You don't how's the shape looks like (circle? triangle?), and you are not sure about the size of the shape.

Shape().area # let's say this is how you define the Shape() object.

Example: Circle (Inheritance)

Circle is a shape, so circle has area. Why? Circle inherit the area properties from Shape.

Circle() is Shape()

Example: Circle (Encapsulation)

You don't allow anyone to change the area of a circle. The area of a circle can only be change by the radius. I use the private keyword to protect the Circle().area.

private Circle().area
Circle().area= pi * radius * radius
Circle().get_area()= area

Direct access of area outside of the object invoke an error:
print Circle().area ==> error
print Circle().get_area() ==> 20.5

Example: Square and rectangle (Polymorphism)

Square and rectangle are similar. Square is another form of rectangle, or you can say that rectangle is another form of square.

Square() is Shape()
Square().get_area(height)= height * height # formula for square
Square().get_area(height,width)= height * width # formula for rectangle

You can have 2 functions with the same name for Square() object, this is polymorphism.

print Square().get_area(5)
print Square().get_area(5,4) # this is for rectangle

Note: In C programming language, there are 2 commands for string copy 1. strcpy(t,s) 2. strncpy(t,s,n). In OOP, you can merge these 2 commands into 1 with the same name, but differentiate by number of parameters.