/contrib/famzah

Enthusiasm never stops


Leave a comment

Oculus Quest VR headset review

Here is a quick recap of my short experience with Oculus Quest:

  • It’s a wonderful device to use without a computer. The immersion is incredible, the controllers are easy to use, the interface is easy and intuitive, and it’s comfortable to wear even for my 8-year old daughter who played Beat Saber a few times.
  • Resolution is much better than the previous generation of VR headsets. There is noticeable flickering in bright scenes. The overall brightness of the screen is high and I had to lower it from the settings of the PC games.
  • The Oculus Link works with my laptop Dell G5 15 (5587) which has an NVIDIA GeForce GTX 1060M (Max-Q design) video card. This card is listed as not supported but I saw no problems whatsoever. I had to install the latest video drivers and updated all other drivers of my laptop.
  • For the Oculus Link connection I used a $14 USB-A to USB-C cable with 2.5m length manufactured by Vivanco. The cable test by the Oculus app resulted in 1.7 Gbps transfer via USB 3. The original USB-C to USB-C cable that came with the Oculus Quest resulted in a USB 2 connection with about 0.3 Gbps transfer rate and I couldn’t get the Oculus Link to work with it.
  • The battery life when used with a computer via the Oculus Link is practically unlimited because the device is simultaneously charged while being used. The same applies if you just use the cable to charge the device.
  • I had no problems playing the Oculus Rift compatible game Dirt Rally, and I had no problems playing Euro Truck Simulator 2 via SteamVR. I’m pleasantly surprised how well SteamVR and my already installed games via Steam integrated with Oculus Quest via the Oculus Link.
  • You need a powerful CPU and video card to play the games with highest graphic details and with the highest FPS. With my Dell G5 15 I had to downgrade the graphic mode to lower settings, in order to be able to sustain 36 FPS. If I wanted the full 72 FPS, then I had to run the graphics in the lowest detail.
  • I couldn’t get Firefox to play 3D 360° content via the Oculus Link.
  • Uploading a 3D movie to Oculus Quest via the USB cable is very fast. The Gallery app lets you easily play the movie.
  • Playing car racing simulators is absolutely more realistic in VR mode! Very enjoyable! It’s actually a bit too much realistic because I got motion sickness after a dozen of seconds. I overcame this problem by shaking my head a bit while driving like you’d do if you were driving on uneven road. Therefore, I suspect that having a seat motion platform will eliminate my motion sickness entirely.
  • Field of view (FOV) while driving a car sim game is enough. I guess it’s the same if you wear a helmet. I’m used to driving go karts with a helmet.
  • I didn’t test many Oculus VR apps but they seem promising – interactive 3D movies, many games, landmark tours, etc.
  • The guardian system is easy to set up and does its job.
  • My WiFi router wasn’t discovered until I disabled WiFi channels 12 and 13. Then I could pair and setup the Oculus Quest easily using my phone.

My final verdict – Oculus Quest is an awesome product and you will definitely enjoy VR! Using it without a PC in standalone mode is easy and there are enough games and apps to enjoy. Using it with a PC via the Oculus Link requires a powerful PC to play in the highest graphics details but in lower graphics details works flawlessly, too.

After all I returned the Oculus Quest headset because of the following reasons:

  • I bought it mainly to play games on my laptop but it’s not powerful enough to support the highest graphic details in VR like it does on a monitor. If I’m about to buy a gaming rig, then maybe I’ll opt in for Oculus Rift S (or similar) because it was designed to be connected to a PC while the Oculus Link could introduce problems (compatibility, video compression artefacts, etc).
  • I was hoping for a slightly better resolution. It’s not that resolution is noticeably bad now. Compared to the first gen VR headsets, it’s much better now. But I think I’ll just wait another gen of VR hardware. Or maybe I’ll try the Pimax 8K VR headset.
  • The noticeable flickering in bright scenes and the slight motion sickness in games could be caused by the relatively low refresh rate of 72 Hz.


Leave a comment

Make your Dell G5 15 fast on battery

I changed my old laptop with the incredible Dell G5 5587 because I wanted a faster system. This new gaming laptop doesn’t disappoint and is very fast, even suitable for modern games. But… the moment you unplug the power adapter, the system becomes very slow. Sometimes the CPUs won’t go over 800 MHz, sometimes they will for a while but the overall experience is very sluggish.

What I tried to fix this on my Windows 10? Changed the power plan to “High performance”. Customized the power plan and configured maximum performance for the Intel graphics card and the Processor power management. Updated the BIOS. Disabled Battery Boost™ in NVIDIA GeForce Experience control panel. I even spoke with Dell technical support. Nothing helped!

Long live “juscheng” who finally suggested a working solution: “Go into your BIOS settings and turn off Intel Speed Shift and Intel SpeedStep“.

Battery life is the same after this change. It takes 2:15h to discharge the battery to 10% with office work (browser, mail client, Excel). Screen brightness was at 40%.


Leave a comment

ESP32 custom NodeMCU firmware build and flash

Here is my success story on how to compile and flash your own firmware for NodeMCU running on the ESP32 microcontroller. Although there is official documentation on how to achieve this, there were some minor issues that I stumbled across.

Using the Docker image is the recommended and most easy way to proceed. I didn’t have a Docker server so I started a cheap VPS from Digital Ocean. They have a one-click installer for Docker. Once the VPS machine is running, execute the following which covers the step “Clone the NodeMCU firmware repository” from the docs:

### log in via SSH to the Docker host machine

cd /opt

git clone --recurse-submodules https://github.com/nodemcu/nodemcu-firmware.git

cd nodemcu-firmware

git checkout dev-esp32
git submodule update --recursive
# https://github.com/marcelstoer/docker-nodemcu-build/issues/58
git submodule update --init

Then follow the instructions for the step “Build for ESP32” from the docs:

docker run --rm -ti -v `pwd`:/opt/nodemcu-firmware marcelstoer/nodemcu-build configure-esp32
docker run --rm -ti -v `pwd`:/opt/nodemcu-firmware marcelstoer/nodemcu-build build

Note: If you use the Heltec ESP32 WiFi Kit 32 with OLED, when configuring the firmware options you have to change the Main XTAL frequency from the default 40 Mhz to either “Autodetect” or 26 MHz, as explained here. I selected “Autodetect” (26 MHz) under “Component config” -> “ESP32-Specific” -> “Main XTAL frequency”.

For the impatient — most probably the only configuration you need to do is in the section “Component config” -> “NodeMCU modules”.

I encountered a compilation error which was caused by a defined-but-not-used function:

make[2]: Entering directory '/opt/nodemcu-firmware/build/modules'
CC build/modules/mqtt.o
CC build/modules/ucg.o
/opt/nodemcu-firmware/components/modules/ucg.c:598:12: error: 'ldisplay_hw_spi' defined but not used [-Werror=unused-function]
 static int ldisplay_hw_spi( lua_State *L, ucg_dev_fnptr device, ucg_dev_fnptr extension )
            ^
cc1: some warnings being treated as errors
/opt/nodemcu-firmware/sdk/esp32-esp-idf/make/component_wrapper.mk:285: recipe for target 'ucg.o' failed
make[2]: *** [ucg.o] Error 1
make[2]: Leaving directory '/opt/nodemcu-firmware/build/modules'
/opt/nodemcu-firmware/sdk/esp32-esp-idf/make/project.mk:505: recipe for target 'component-modules-build' failed
make[1]: *** [component-modules-build] Error 2

You can simply comment out the function in the firmware sources or configure to ignore the warning. Start a shell into the Docker image and edit the sources:

docker run --rm -ti -v `pwd`:/opt/nodemcu-firmware marcelstoer/nodemcu-build bash
# you are in the Docker image now; fix the source code

vi /opt/nodemcu-firmware/components/modules/ucg.c # add the following (including the starting shebang sign):
#pragma GCC diagnostic ignored "-Wunused-function"

exit

# you are in the Docker host; redo the build as usual
docker run --rm -ti -v `pwd`:/opt/nodemcu-firmware marcelstoer/nodemcu-build build

Because it took me a few attempts to configure everything properly and to finally build the image, I used the following alternative commands to make the process more easy:

docker run --rm -ti -v `pwd`:/opt/nodemcu-firmware marcelstoer/nodemcu-build bash
# you are in the Docker image now
cd /opt/nodemcu-firmware
make menuconfig
make

Once the build completes it produces three files on the Docker host:

/opt/nodemcu-firmware/build/bootloader/bootloader.bin
/opt/nodemcu-firmware/build/NodeMCU.bin
/opt/nodemcu-firmware/build/partitions_singleapp.bin

Copy those three files on your local development machine where you are about to flash the NodeMCU controller. My first attempt was rather naive and the chip wouldn’t boot. It issued the following error on the USB console:

Early flash read error: "flash read err, 1000"

It turned out that I accidentally overwrote the bootloader and the partitions. Fortunately, the ESP32 official docs explain this in details here and here.

Here is what worked for me to flash my custom NodeMCU firmware into ESP32 from my Windows workstation:

esptool.py.exe --chip esp32 -p COM5 erase_flash

esptool.py.exe --chip esp32 -p COM5 write_flash 0x1000 .\bootloader.bin 0x8000 .\partitions_singleapp.bin 0x10000 .\NodeMCU.bin


Leave a comment

HP ProBook 450 G2 drivers

I recently changed my old laptop for a new HP ProBook 450 G2. The drivers installation on my Windows 7 Home Premium (64-bit) were pretty straight forward, except for the following two devices which were shown as not supported in the Device Manager:

  1. Other devices -> Unknown device:
    Hardware Ids: ACPI\HPQ6007
    Device Instance Path: ACPI\HPQ6007\3&33FD14CA&0
    Parent: ACPI\PNP0A08\2&daba3ff&1
    
  2. Other devices -> PCI Data Acquisition and Signal Processing Controller:
    Hardware Ids:
    	PCI\VEN_8086&DEV_9C24&SUBSYS_2248103C&REV_04
    	PCI\VEN_8086&DEV_9C24&SUBSYS_2248103C
    	PCI\VEN_8086&DEV_9C24&CC_118000
    	PCI\VEN_8086&DEV_9C24&CC_1180
    Compatible Ids:
    	PCI\VEN_8086&DEV_9C24&REV_04
    	PCI\VEN_8086&DEV_9C24
    	PCI\VEN_8086&CC_118000
    	PCI\VEN_8086&CC_1180
    	PCI\VEN_8086
    	PCI\CC_118000
    	PCI\CC_1180
    Physical Device Object name: \Device\NTPNP_PCI0014
    Device Instance Path: PCI\VEN_8086&DEV_9C24&SUBSYS_2248103C&REV_04\3&33FD14CA&0&FE
    Parent: ACPI\PNP0A08\2&daba3ff&1
    

The first one turned out to be the driver for “HP 3D DriveGuard 6” which I didn’t install because my SSD drive won’t benefit from such a feature.

The second one was a more interesting case. It turns out that not all HP drivers were listed when I selected my operating system “Microsoft Windows 7 Home Premium (64-bit)” at the HP drivers website. I had to change the OS to “Microsoft Windows 7 Home Professional (64-bit)”, so that I get the option to download the “Intel Chipset Installation Utility” which resolved the missing drivers.


Leave a comment

An Intel SSD X25-M statistics case

Here are some stats for one of the SSDs which we use at work. The most valuable S.M.A.R.T. attribute which we focus on here is the “Host_Writes_32MiB” which shows what capacity the SSD has written in its lifetime. This is the most important indicator because SSD drives have a limited total Program/Erase cycles (P/E cycles) they can sustain over the life of the flash memory, before they start to fail. According to Wikipedia, the number of those cycles is as follows:

  • Single-level cell (SLC) flash, designed for higher performance and longer endurance, can typically operate between 50,000 and 100,000 cycles.
  • As of 2011, multi-level cell (MLC) flash is designed for lower cost applications and has a greatly reduced cycle count of typically between 3,000 and 5,000.

Those numbers refer to the internal rewrites of the flash cells at the hardware level. If a cell is 32 MiB and we do a 3200 MiB write transfer from a computer, the actual write cycles of the flash cells in the SSD internally may be higher than 100, because of the complicated internal storage processes inside the SSD. You can review the “Logged S.M.A.R.T. Data” chart in this example.

Another thing to mention before we get to the actual statistics is that the “Power_On_Hours” S.M.A.R.T. attribute is correctly accounted and 100% matches the actual work time span of this SSD drive.

This sample SSD has the following S.M.A.R.T. attributes:

  • Host_Writes_32MiB: 3681999
  • Power_On_Hours: 41204

We used 40680 power-on-hours in our calculations, because the SSD was “on” a few days before we started using it in production.

Here are the aggregated statistics:

  • SSD model: Intel SSD X25-M
  • Flash architecture: multi-level cell (MLC)
  • Capacity: 80 GB
  • In 24/7 service: 1695 days (4+ years)
  • Avg. writes: 69.5 GB / day
  • Complete device rewrites: 1472
  • Read-to-write ratio: 5

The device is still in use and working properly.
Good deal for the buck, Intel SSD!

Update: An Intel 320 Series SSD statistics case

It struck me that we have another SSD which gets a lot more writes.

This sample SSD has the following S.M.A.R.T. attributes:

  • Host_Writes_32MiB: 13627899
  • Host_Reads_32MiB: 1086459
  • Power_On_Hours: 24525

Here are the aggregated statistics:

  • SSD model: Intel 320 Series
  • Flash architecture: multi-level cell (MLC)
  • Capacity: 120 GB
  • In 24/7 service: 1021 days (2+ years)
  • Avg. writes: 426.8 GB / day
  • Complete device rewrites: 3634
  • Read-to-write ratio: 0.08

Intel_X25-M_Solid-State_Drive


3 Comments

Power consumption of a server with an Intel E3-1200 Series CPU

I got my hands on the following server for a day, so I decided to measure its power consumption because the new Intel Xeon Processor E3 series look very promising. They support ECC memory and at the same time have “Intelligent, Adaptive Performance”, which in plain text means that they can power themselves down and thus save energy. Furthermore, their price and the price of the motherboards are fair as these CPUs seem to be meant to be used mainly in Desktop workstations. Having ECC support lets us use them in servers too. The only caveat is that those Sandy Bridge based Xeon CPUs support only single CPU configuration — so don’t try to find a dual-CPU motherboard.

Here is the server configuration:

BIOS settings are set up for optimal power savings without compromising performance. FAN control is enabled too. Room temperature is 21 degrees Celsius.

Power usage with different server utilization scenarios follows:

  • 7W — power off; idle consumation, the IPMI is alive
  • 39W — power on; Linux OS is idle
    • IPMI sensor readings: cooling FAN works with 1755 RPM — relatively quiet; CPU temperature is Low
  • 45W to 60W — power on; moderate Linux OS usage
    • load average: 1.53; installing 200 new packets via “apt-get”
    • IPMI sensor readings: cooling FAN works with 1755 RPM — relatively quiet; CPU temperature is Low
  • 130W — power on; full stress by “stress –cpu 16 –io 8 –vm 8 –vm-bytes 1780M –hdd 4″
    • load average: 36.00; I/O load: 100%, mostly write; CPUs busy @ 100%, 70% user, 30% system, all CPU cores are utilized
    • RAM: about 95% used, 30% cached; network load: 22 Mbit/s constant SSH transfer
    • IPMI sensor readings: cooling FAN works with 3100 RPM — much noisy; CPU temperature is Medium


21 Comments

Using TP-LINK (TL-WR741ND) as a wireless bridge (WDS)

Recently I needed to expand my wireless network range. The spot where I needed wireless and wired network coverage was too far away from my main wireless AP, so I also needed a gain antenna. It turned out that most wireless routers cannot use an external antenna, because their original one cannot be dismounted. That is how I ended up with the TL-WR741ND wireless router, which can be used with an external antenna and is also very cheap. In my local PC store they got a 7dB omni-directional antenna by Intellinet, so I got one of these too.

Design and hardware purchase were the easy part. The TL-WR741ND supports wireless bridge mode (WDS), but unfortunately it did NOT work out-of-the-box for me. The router joined the wireless network of my main Wi-Fi router, and I could see it there as “associated authorized”. However, the system log of the TL-WR741ND device was giving some DHCPC (probably “DHCP client”) errors and nothing worked as expected. I tried to join TL-WR741ND to both my ASUS routers (WL-520gC and RT-N10) but with no luck. I also tried to help the TP-LINK router by doing some setup as advised in the ASUS Wireless Router WDS
Configuration Guide
, and at the How to Setup WDS with Asus RT-N16 and Linksys WRT54G article. This did not help and I reverted the changes on my ASUS routers in the end.

After I wasted 2 hours, I found a forum article where a guy had a similar issue and finally found a solution:

after 4 days unsuccessful testing client bridge (i need repeater bridge but not possible on my device…with ddwrt) on wr741nd(v2.4)/ddwrt, i found solution: install Gargoyle firmware v1.13.10, very intuitive and easy configuration (as repeater bridge), it works perfectly! Total time spent: 5 min.!

I confirm his solution — install and setup of the stable Gargoyle free router firmware solved my problem in a snap. Tested with a version 2.4 TL-WR741ND device, with Gargoyle version 1.4.5 for TL-WR741ND devices with version 1.x (firmware is compatible with version 2.x devices).