I wrote about Atomic Pi about two years ago. Recently, I started using it again as a desktop computer. I like it for the quietness without a fan. As a desktop computer, which it is not really intended for, it is under-powered. The most severe limitation is the 2GB RAM (maximum possible for this Intel Atom processor), which is not enough to support web browsers' full functionality. The SD card and the buit-in eMMC memory are relatively slow as a swapping device, especially writing (eMMC average 120MB/s read, 32MB/s write and 0.38ms seek). A solid station disk on the USB 3 is a better alternative; the benchmark shows 417MB/s read, 396MB/s write and 0.24ms seek. Initially I used a USB3 hub, but the disk is not working properly with the hub. So the USB3 solid state disk is plugged into directly the lone USB3 port. We still need a way to connect other USB devices, such as a keyboard and a mouse (although a Bluetooth keyboard/mouse is another option if no other USB devices are needed.). There is a USB2 port, but it is a 2mm JST connection. So I had to make an adapter to connect with a USB hub. The 5-pin connector pinout is GND, 5V, D-, D+, GND; I wired it a USB A female connector on a small proto board with a ribbon cable, with the shield grounded. At least 2GB swap space is recommended. Now it is usable as a desktop device. I installed Lubuntu, the lightweight version of Ubuntu; it works adequately with multiple applications running. I do not think Windows can run adequately.
Sunday, August 8, 2021
More on Atomic Pi
Friday, April 30, 2021
Wireless Router
I have a couple of old routers that have been replaced by more advanced ones. So it is time to hack them for other use. A wireless router is an embedded computer with wireless connection; so it is good for IoT applications. A lot of old inexpensive routers have 32MB RAM and 4MB Flash, which is rather limited for more advanced router application. OpenWRT no longer supports this type routers. It'll be good to branch off OpenWRT to support this type of routers for IoT. We looked at one such router earlier.
Here we take a look at TP-Link TL-WR841N, Ver 9.2. 300Mbps wireless N router, with 4x 100Mbps ethernet ports. The main components are
- Qualcomm Atheros QCA9533-AL3A SoC
- 24Kc MIPS processor with 64KB I-Cache and 32KB D-Cache at up to 650MHz
- 25MHz clock input
- 1.2V switching regulator for core voltage. 2.62V LDO for DDR1 and GPIO.
- RF 20/40MHz band 2.4GHz OFDM for 802.11b/g/n, 2x RX/TX
- Zentel A3S56D40GTP-50L
- 256Mb (16Mx16) 2.5v DDR400 200MHz @CL3xTSOPII-66.
- Spansion S25FL032P
- 32-Mb 3V Flash memory QUAD I/O 80MHz clock 40MB/s.
- BCD's AP3502E
- 340KHz fixed frequency 2A synchronous buck converter
- 3.3V output
J3 is a 4-pin UART connector,
- TX (2.6V)
- RX
- GND
- 3.3V
The last OpenWRT version for this router is openwrt-18.06.8. We get the boot message from the UART,
U-Boot 1.1.4 (Build from LSDK-9.5.3.16 at Nov 29 2013 - 10:46:36)
ap143 - Honey Bee 1.1
DRAM: 32 MB
Flash Manuf Id 0x1, DeviceId0 0x2, DeviceId1 0x15
Flash: 4 MB
Using default environment
## Booting image at 9f020000 ...
Uncompressing Kernel Image ... OK Starting kernel ... [ 0.000000] Linux version 4.9.214 (buildbot@0d27b924961c) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7989-82fbd85747) ) #0 Thu Feb 27 21:25:59 2020 [ 0.000000] bootconsole [early0] enabled [ 0.000000] CPU0 revision is: 00019374 (MIPS 24Kc) [ 0.000000] SoC: Qualcomm Atheros QCA9533 ver 1 rev 1
BusyBox v1.28.4 () built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 18.06.8, r7989-82fbd85747
-----------------------------------------------------
We can interact with it through the ash shell. Next we'll try to rebuild the firmware from the source and start to tweak.
Saturday, April 10, 2021
H632S-WC Weather Channel EZ Crank Radio Extreme
Wednesday, December 30, 2020
AC Termination
Friday, December 25, 2020
Christmas LED Lights
I have a string of 60 LED Christmas lights with 6 distinct colors. I measured the RMS current with a multimeter, and found to be 27mA, so it worked out to be about 3.2W or about 54mW each, which seems reasonable if each LED takes about 20mA. The string appears to have 3 parallel segments, with 3 lights having 3 wire connections. That means each LED string consumes 9mA, so the 54mW number seems high for each LED. Four of LEDs (all blue color why?) are not working, but the rest of the string works, so the connection is maintained. I was curious to take one off; that segment was out. So it is the LED that provides the electrical connection. I took it apart and measured the resistance an found it to be 90 Ohms both ways. Is there a built-in parallel resistor for fault tolerance? Each of these resistors would take about 10mW. The LEDs are running directly off AC, so the current is measured as true RMS, but the voltage RMS is not known.
Thursday, December 10, 2020
Anti Sulfur Chip Resistors
Many automotive grade chip film resistors have the anti sulfur feature. Bourns has a white paper, "Advantages of Sulfur-Resistant Film Resistors". It describes in good detail the construction. In short, sulfur based gasses (such as caused pollution) can react with Ag/AgPd resistor terminal that leads to crack the package. A Palladium (Pd) protection layer is added to the Ag terminal to eliminate the formation of Silver Sulphide and hence increases the reliability.
Thursday, August 27, 2020
Computer Software Notes
Change network setting with commands
netsh interface ip set address "Local Area Connection" static IP NetMask Gateway
netsh interface ip set dns "Local Area Connection" static DNS primary
netsh interface ip add dns "Local Area Connection" DNS index=2
Add Emacs to the right-click menu. Add to the registry
[HKEY_CLASSES_ROOT\*\shell\Emacs\command]
@="\"C:\\Program Files\\emacs-22.3\\bin\\runemacs.exe\" \"%1\""
Emacs for windows needs the diff program to run ediff. If cygwin is installed, in .emacs (setq exec-path (list "c:/cygwin/bin")) to use cygwin's diff. Also set environment variable CYGWIN=nodosfilewarning.
Emacs over VNC sometimes could not use the Alt key, add the following to .emacs
;; Map Alt key to Meta
(setq x-alt-keysym 'meta)
For computer with with multiple networks, eg hardwire ethernet and WIFI. To set the network orderControl Panel -> Network and Sharing Center -> Change adapter settings -> The hit Alt to get the menu and choose Advanced -> Advanced Settings.
Screen saver timeout may have to be changed in the registry
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Control Panel\Desktop]
"ScreenSaverIsSecure"="0"
"ScreenSaveTimeOut"="900"
Microsoft mouse software Intellipoint messes up the left handed setting. Uninstalled it.
Microsoft robocopy is a useful tool for backups. The command "rmdir /s/q folder" is a much quicker way to delete a large folder than through Windows interface. [Others have pointed out a combination of "
del /f/s/q foldername > nul" and "rmdir /s/q foldername" is even faster.]Xilinx USB cable does not install incorrectly with ISE 11.1. Manually running the following solves the problem,
Xilinx Platform Studio 7.1 cannot coexist with ISE 11.1. The PATH environment variable should contain either 7.1 or 11.1.
Foxit Reader is a better PDF reader than Adobe Acrobat Reader.
Matlab "Failure to find requested data acquisition device: nidaqmx." Run Matlab as Administrator.
The driver for Proflic PL2303 based USB to serial adapter uses much more interrupt time than others.
Windows 7 jump lists are in %AppData%\Microsoft\Windows\Recent\AutomaticDestinations, deleting the large files helps restoring the lists.
Windows 7 does not include hyperterminal; copy the following files from Windows XP. Hyperterminal does run on Windows 7.
c:\Windows\System32\hypertrm.dll
Hyperterminal can send ascii code by pressing and holding down ALT and entering numbers from the numeric keypad (with Num Lock on) then releasing the ALT key. The code is sent upon the release of the ALT key.
xfig on cygwin complains about missing fonts.
cp /usr/share/ghostscript/fonts/*l.pfb /usr/share/fonts/Type1cat /usr/share/ghostscript/fonts/fonts.scale >> Type1/fonts.scale
Change the first line to the number of fonts listed.
Update the font database:
mkfontdir
com0com creates a pair of virtual com port.
Linux
To clone a linux system to a large disk.
cp -ax /olddisk/. /newdisk
sed 's/`vol_id --uuid /dev/olddisk`/`vol_id --uuid /dev/newdisk`/g' /boot/grub/grub.cfg > /newdisk/boot/grub/grub.cfg
grub-install --boot-directory=/newdisk/boot /dev/newdisk
sed 's/`vol_id --uuid /dev/olddisk`/`vol_id --uuid /dev/newdisk`/g' /etc/fstab > /newdisk/etc/fstabTo keep the xterm open after executing a command with -e option,
xterm -hold -e 'command' To set up a remote git repository from a local repository
#Remote machine: Create the bare repository
mkdir proj.git
cd proj.git
git --bare init
#Local machine:
git remote add origin ssh://remote-machine///repository/proj.git
git push origin master
git checkout origin/master
#Create the local "master" branch that is tracking the "origin/master" branch
git branch -f master origin/master
git checkout masterTo make an existing branch tracking a remote branch
git branch --set-upstream master origin/masterTo fix a problem with acroread menu on Ubuntu,
"export UBUNTU_MENUPROXY="acroread":$UBUNTU_MENUPROXYor disable global appmenu altogether
sudo sh -c "echo export UBUNTU_MENUPROXY=0 > /etc/X11/Xsession.d/81ubuntumenuproxy"When partition a USB drive for Linux and Windows, place the Windows partition first. Windows can only read the first partition from a USB drive. The Linux can boot from the second partition.
To map the mouse buttons in X Windows
xinput list
xinput set-button-map 12 1 2 3
To create a pair of virtual serial ports
socat -d -d pty,raw,echo=0 pty,raw,echo=0
The password length and complexity are controlled by
/etc/pam.d/common-password
The hardware clock setting is in /etc/default/rcS
UTC=yes
to set to UTC time.





