Quantcast
Channel: Amigo's Technical Notes
Viewing all 122 articles
Browse latest View live

Use a Toggle to Switch HotSpot Status on Android

$
0
0

Unlike my other Android device, ZTE Blade Vec 4G doesn’t comes with any widget for HotSpot. It has to be enabled by accessing setup menu which is too complex for my Aunty. I found some useful apps on Google Play using keywords”hotspot toggle”. Here are the best two I like:

HotSpot Toggle

It is made by Mehdy Bohlool and comes as a widget on your launcher. After installation, you need to drag this widget to your launcher manually. It’s even more convenient than using a widget in drawer because you may manage on launcher directly.

When enabled, it shows blue icon as left. On the other hand, it is black as right. It takes 2 to 3 seconds to enable on my ZTE Blade Vec 4G.

HotSpot Toggle Status

Power Toggles

How to Add a Hotspot Shortcut to the Android Home Screen on How-To Geek is a detail explain on Power Toggles.

I like the control-bar-like widget. It is very easy to add/remove items. But for some items, eg. USB Tethering, it just pop-up corresponding setting page. I cannot toggle with just single-click. Maybe it’s related to system restriction.

Final Words

Anyway, both are great apps. I install HotSpot Toggle on ZTE Blade Vec 4G for my Aunty and Power Toggles on Sony Xperia C3. It saves time and make life easier.

Reference

  1. Google Play
  2. Google Play: HotSpot Toggle
  3. Google Play: Power Toggles
  4. How-To Geek: How to Add a Hotspot Shortcut to the Android Home Screen
  5. Sony: Xperia C3
  6. ZTE: ZTE Blade Vec 4G

Filed under: Information Tagged: Android

Restore Your Lost Tabs in Toby and How to Prevent It

$
0
0

Toby is a tab management extension in Chrome. It helps me to save current session as a new a group and close all tabs. Manage saved tabs by groups. Re-open a tab or a group quickly. Not only organize my working tabs more efficiently but also save memory and help my OS X more responsive. I also enable the “Sync to Google Drive option to make a backup of my groups.

Everything is perfect until I turn on “Sync to Google Drive on my Acer Chromebook 15 with the same Google Account. It didn’t sync back from Google Drive but replaced with the new default tab groups. The Chrome on OS X detects the new version on Google Drive and replace my local version. All my saved tabs are gone.

Restore from Time Machine

Lucky me. I have backup with Time Machine and shall be able to roll-back only my previous version of tab groups.

Folder to Restore

When I open a new tab, it loads “chrome-extension://hddnkoipeenegfoeaoibdmnaalmgkpip/toby.html” to launch Tobyhddnkoipeenegfoeaoibdmnaalmgkpip is the Chrome Extension ID.

Next, put “chrome://version/” in Chrome and look for the folder information in “Profile Path”.  On my Chrome for OS X,  it is “/Users/Amigo/Library/Application Support/Google/Chrome/Default”.

Now, I know Toby is stored in “/Users/Amigo/Library/Application Support/Google/Chrome/Default/Extensions/hddnkoipeenegfoeaoibdmnaalmgkpip”on my computer. There is a folder with numbers within this folder. Open and you will see the source code of Toby.

When the extension “toby.html” is loaded, it runs “toby.bundle.js”.  I believe Toby use chrome.storage to keep data. Unfortunately though I can see it generates a database log in “/Users/Amigo/Library/Application Support/Google/Chrome/Default/Local Extensions Settings/hddnkoipeenegfoeaoibdmnaalmgkpip/000010.log”, I cannot find its database in “/Users/Amigo/Library/Application Support/Google/Chrome/Default/Local Storage” folder. There is no chrome-extension_hddnkoipeenegfoeaoibdmnaalmgkpip which should be the SQLite database file used by Toby.

Therefore, I have to restore “/Users/Amigo/Library/Application Support/Google/Chrome/Default” which means I will lost current session.

Enable Hidden Files in Finder

Because I cannot see the hidden folder “/Users/Amigo/Library/” in Finder, I need to run following command in Terminal to enable:

$ defaults write com.apple.finder AppleShowAllFiles TRUE;killall Finder

Now, I may restore “/Users/Amigo/Library/Application Support/Google/Chrome/Default” in Finder using Time Machine. Don’t forget to quit Chrome before restoring.

I have to disable this after restore:

$ defaults write com.apple.finder AppleShowAllFiles FALSE;killall Finder

Now I get all my saved tab groups back.

Why Overwrite Happens

I believe the logic is correct but a confirm dialog when the scenario “Different Computers using the same Google Drive” happens would help.

Steps to Reproduce Issue

Let explains my steps to reproduce this overwrite more clearly.

  1. Enable “Sync to Google Drive option on Chrome for OS X.
  2. Tabs are synced back to Google Drive now.
  3. Turn on my Chromebook and launch ChromeToby is installed automatically.
  4. Open a new tab in ChromebookToby is automatically launch the default page.
  5. Enable “Sync to Google Drive option on Chrome for Chromebook.
  6. Toby begin to compare with the one on Google Drive.
  7. Because the newly created page is newer, tabs in default page will be synced back rather than download from Google Drive.

How to Prevent It Happen with New Computers

So, how to prevent this without confirmation dialog? I need to make the version on new computer older than Google Drive before enabling “Sync to Google Drive option on new computers. Here is how it works.

Steps to Prevent

  1. Enable “Sync to Google Drive option on Chrome for OS X.
  2. Tabs are synced back to Google Drive now.
  3. Turn on my Chromebook and launch ChromeToby is installed automatically.
  4. Open a new tab in ChromebookToby is automatically launch the default page.
  5. Turn off Internet connections on Chromebook.
  6. Enable “Sync to Google Drive option on Chrome for Chromebook.
  7. Add a new tab to Toby on Chrome for OS X. This will make a change and generate a new version in local storage. It should sync back to Google Drive.
  8. Turn on Internet connections on Chromebook.
  9. Toby begin to compare with the one on Google Drive.
  10. Because Google Drive keep a newer version, it will replace the old version on Chrome for Chromebook.

Risk

The only risk here is step 7: how long does it take to sync back? I would never know because it was saves in a hidden folder on Google Drive. Therefore, I think the best solution is to change the process by adding a confirmation dialog. Overwrite is unrecoverable anyway.

Reference

  1. Acer: Chromebook 15
  2. Apple: Get to know the Finder on your Mac
  3. Apple: OS X
  4. Chrome: Toby: manage your tabs
  5. Google Accounts
  6. Google Chrome
  7. Google Drive
  8. Google: Chrome Web Store – Extension
  9. Google: chrome.storage
  10. SQLite
  11. superuser: Where does Google Chrome save LocalStorage from Extensions?
  12. Wiki: Terminal (macOS)
  13. Wiki: Time Machine (macOS)

Filed under: How-To Tagged: chrome, extension

Asus RT-AC1200G+ Random Reboots Automatically

$
0
0

I bought a new Asus RT-AC1200G+ to replace my RT-AC51U for better signal and Gigabit Ethernet. It’s much faster to copy files to/from QNAP TS-119PII now. But I notice it drops internet connection several times a day, I am sure there is nothing wrong with my tethering device as described in “Android USB Tethering Drops and Data Usage Crashes, try Reset“.

On 2017/3/21, it restarts several times. I begin to track this auto-restart issue.

Because RT-AC1200G+不定期重啟 and many others could be googled by “rt-ac1200g+ restarting”, it seems related to bugs in firmware. I decide to upgrade to 3.0.0.4.380.4089.

Firmwares are available on RT-AC1200G+ Driver & Tools and upload via [Administration] → [Firmware Upgrade] tab. It will begin to flash and reboot automatically.

On 2017/4/2, it restarts at 20:54 (GMT+8).

On 2017/4/4, it restarts at 20:54 (GMT+8) again.

Because both restarts at the same time, I search for any scheduler-like configurations and disable Enable wireless scheduler on 2.4GHz and 5GHz in [Advanced Settings] → [Wireless] → [Professional] tab.

On 2017/4/10, it restarts at 23:17 (GMT+8).

[Problem]Router keeps rebooting randomly on Asus forum suggests disabling GRO (Generic receive offload) due to its stability issue which is not available in current firmware. According to Router Guide: NAT Acceleration On or Off, I decide to Disable NAT Acceleration (default Auto) in [Advanced Settings] → [LAN] → [Switch Control] tab.

On 2017/4/11, I notice USB computer connection is in Media device (MTP) mode which could identified as a storage device. I decide to manually select Charging mode in the future. The default is Media device (MTP) which I cannot change on this device.

Maybe that’s why I see disk_monitor: Got SIGALRM…. This log is explained in Asuswrt-Merlin 378.54_2 is now available on SNBForums by RMerlin as:

disk_monitor is the service that handles scheduled filesystem scans. SIGALRM is the signal the process receives when it has a scheduled event occurring, which tells it to wake up, and process any scheduled event if there’s a disk present before going back into sleep.

More about Android file transfer is explained in Transfer files between your computer & Android device.

Another suspect is Enable UPnP Media Server has been turned on in [General] → [USB Application] → [Media Server] tab. If disable NAT acceleration is not enough, I will turn this off.

Follow this post to see any updates in the future.

Auto-restart History

Version On Issue and Notes
3.0.0.4.380.3310 2017/3/10 New installation.
3.0.0.4.380.4089 2017/3/21 Restart automatically several times.

Install new firmware.

x 2017/4/2 Restart automatically at 20:54 (GMT+8).
x 2017/4/4 Restart automatically at 20:54 (GMT+8).

Disable Enable wireless scheduler on 2.4GHz and 5GHz

x 2017/4/10 Restart automatically at 23:17 (GMT+8) on 2017/4/10.

OSX Finder warns Server connections interrupted which seems due to restart.

Disable NAT acceleration and need to restart.

x 2017/4/11 Manually select USB computer connection in Charging mode.

Reference

  1. Android USB Tethering Drops and Data Usage Crashes, try Reset
  2. Asus forum: [Problem]Router keeps rebooting randomly
  3. Asus: RT-AC1200G+
  4. Asus: RT-AC1200G+ Driver & Tools
  5. Asus: RT-AC51U
  6. Google: Nexus Help: Transfer files between your computer & Android device
  7. LWN.net: JLS2009: Generic receive offload
  8. Mobile01: RT-AC1200G+不定期重啟
  9. QNAP TS-119PII with Mac OSX File Transfer Performance Report
  10. Router Guide: NAT Acceleration On or Off
  11. SNBForums: Asuswrt-Merlin 378.54_2 is now available
  12. Wiki: Gigabit Ethernet

Filed under: How-To Tagged: Network

Manage Books with Google Photos

$
0
0

Google Photo is very useful to manage my reading notes and interesting sections. Once digitalize, I can read everywhere. It also saves space.

While reading, I use sticker post-it to bookmark. After finishing, I use a smart phone to take photos. They will be uploaded to Google Photos automatically . Then, I retouch them, group as an album, and add text to keep notes on desktop computer. Here are steps:

  1. Select and add photos to a new Album in [Photos] tab.
  2. Give this album a new name. I use a tag [ebook] to highlight category.
  3. In album edit mode, use [Add Text] to separate and group sections with a topic.
  4. Use [Add Text] to drop a note.
  5. Click on [Done] (a check mark) to finish editing.
  6. Click on a photo to view. [Shift+r] to rotate if necessary.
  7. Use [e] key to enter edit mode.
  8. Click on [Crop & rotate] which is on the upper-right corner to crop. Click [DONE] button to return to photo edit mode.
  9. Apply [Vista] which is a color filter converting colors to high contrast (gray scale). It’s easier to read text. Click [Done] to finish editing.
  10. Use [→] key for next and repeat until all done.

Google Photo Accelerators

Here is a list of Google Photos accelerators which I found on Google Photos adds more Keyboard Shortcuts to the Web. Sometimes keyboard is easier and faster than a mouse.

GENERAL
← → Previous or next photo
x Select
ESC Back, close, or deselect
/ Search your photos
PHOTO EDITING
o Show original
a Auto enhance
Shift + r Rotate
ACTIONS
# Delete
e Edit photo
Z or +/- Zoom photo
i Show or hide info
Shift + d Download

Reference

  1. Android Headlines: Google Photos adds more Keyboard Shortcuts to the Web
  2. Google Photos

Filed under: How-To Tagged: Management

DIY a Tablet Stand to Meet My Favorite View Angle

$
0
0

It’s easy to make a tablet stand with corrugated fiberboard (aka corrugated paper). To customize view angle, I use Google Calculator and trigonometric functions to do the math.

Design Draft

First, I disassemble a corrugated paper box and draw a design draft:

A design draft of a tablet stand with a stopper
A design draft of a tablet stand with a stopper

Trigonometric Functions

Here is what I have already known:

  1. Max length (A+B+C+D) of corrugated paper.
  2. A is equal to tablet height.

At first, I just let b (length of B) = c (length of C) = d (length of D) = (total length – tablet height) / 3. Then I get a stand with 60° view angle according to an equilateral triangle.

How to customize θ? I decide to let b = c to make it a Isosceles triangle.

An isosceles triangle
An isosceles triangle.

Based on Pythagorean theorem, I get d = 2b * cosθ or use the formula below:

Pythagorean theorem of the lengths among an isosceles triangle
Pythagorean theorem of the lengths among an isosceles triangle.

You need a scientific calculator which supports trigonometric functions here. Because my Sony Xperia C3‘s build-in calculator doesn’t support Inverse trigonometric functions, I decide to install Google Calculator after reading 10 best calculator apps for Android on Android Authority.

Google Calculator

Google Calculator with cosine
Google Calculator with cosine.

Launch and swipe left, you see more functions and operators. There is a DEG (degree) or RAD (radian) on the upper left. Click to select the unit you need.

If you want to calculate θ with a given d, you need to use inverse trigonometric functions. In some calculators, there is a Inv (inverse) button to help you switch from sine to arcsine (or sin¯¹(x)) and vice versa. But in Google Calculator, you need to tap and hold for about 0.5 second. It enters the inverse trigonometric function automatically as below:

Google Calculator with arcsine
Google Calculator with arcsine.

My Tablet Stand

Here is a photo of my tablet stand. It helps me to recall trigonometric functions and Pythagorean theorem learned in junior high school. They are very helpful in engineering!

My DIY tablet stand with corrugated fiberboard
My DIY tablet stand with corrugated fiberboard

Reference

  1. Android Authority: 10 best calculator apps for Android
  2. Google play: Calculator
  3. Sony: Xperia C3 Specifications
  4. Wiki: Corrugated fiberboard
  5. Wiki: Degree (angle)
  6. Wiki: Equilateral triangle
  7. Wiki: Inverse trigonometric functions
  8. Wiki: Isosceles triangle
  9. Wiki: Pythagorean theorem
  10. Wiki: Radian
  11. Wiki: Scientific calculator
  12. Wiki: Trigonometric functions

Filed under: How-To Tagged: diy, math

QNAP TS-119PII with Different Wireless Device on Mac OSX File Transfer Performance Report

$
0
0

I did this test because uploading files to NAS is incredible slow today. The only different is my new WF2190 last week. I spends hours to do a full check of my NAS and eventually find out it is related to driver. I didn’t uninstall D-Link DWA-171 rev A1‘s Realtek driver before installing netis WF2190. During the test, I also learned the difference of my WiFi devices.

QNAP TS-119PII

QNAP TS-119PII uses a Marvell 88F6282 which is a single core ARMv5TE-compliant 32-bit processor with 256K L2 cache. It comes with 512MB RAM and is not upgradable.

I install a single Seagate Laptop SSHD 1 TB in it.

QTS is an embedded Linux developed by QNAP. This report test with 4.2.4 build 20170313.

QNAP TS-119PII with Mac OSX File Transfer Performance Report is a good reference to learn its capability.

Mac Mini Late 2012

I have upgrade my Mac mini Late 2012 to 16GB RAM and use a SanDisk Extreme Pro 480GB SSD which use MLC. It is running OSX 10.12 aka macOS Sierra. Both D-Link DWA-171 rev A1 and netis WF2190 are working properly.

According to System Information and macg.co:Mac mini (Late 2012)は11n/450Mbps/3ストリームに対応している on MACお宝鑑定団, the build-in AirPort Extreme 802.11n is based on Broadcom BCM43xx which is capable being up to 450Mbps at 5GHz on 40MHz bandwidth using 3×3:3. I am not sure if 2.4GHz may support up to 450Mbps yet.

The connection speed is 300Mbps with Asus RT-AC1200G+ at 2.4GHz and 5GHz. WPA2 Personal is used for encryption.

Asus RT-AC1200G+

According to ASUS RT-AC1200GP on WikiDevi, some important features include:

  1. Broadcom BCM47189 supports 802.11ac.
  2. Max speed for 802.11n is 300Mbps with 2T2R.
  3. Max speed for 802.11ac is 867Mbps with 2T2R.
  4. Gigabit Ethernet.

D-Link DWA-171 Rev A1

The H/W ver: A1 is very important information but only show on a small label on the package or the last few characters of P/N on the device. Different hardware version might use different chips result in different performance and comparability.

According to D-Link DWA-171 rev A1 on WikiDevi, some important features include:

  1. Realtel RTL8811AU supports draft 802.11ac which is not 802.11ac.
  2. Max speed for 802.11n is 150Mbps with 1T1R.

It works on OSXWindows Server 2012 R2, and QTS.

netis WF2190

According to Netis WF2190 on WikiDevi, some important features include:

  1. Realtel RTL8812AU supports draft 802.11ac which is not 802.11ac.
  2. Max speed for 802.11n is 300Mbps with 2T2R.

It works on OSX.

Test Method

It is detail explained in Prepare Your NAS File Transfer Performance Test with Mac OSX Client. Apple also provides How to connect with File Sharing on your Mac to help.

But there are some difference in this post:

  1. I use AFP (Apple Filing Protocol) instead of Samba and NFS.
  2. A single 451.7MB MP4 file.
  3. Upload to TS-119PII through File Station. The Background Task windows provides upload Transfer Rate information.
  4. Temperature is measured by smcFanControl 2.6. Computer fan runs at 5500rpm and the weather is 29°C to 33°C.

Performance and Temperature

Theoretical (All @ 5 GHz) Upload Speed Mac Mini Temperature
Mac Mini Build-in 2T2R 802.11n @ 300Mbps 25MB/s 57°C
D-Link DWA-171 rev A1 1T1R draft 802.11ac @ 433Mbps 19MB/s 57°C
netis WF2190  2T2R draft 802.11ac @ 867Mbps 27MB/s  60°C

Analyze

Build-in WiFi (Broadcom BCM43xx) is about 20% faster than DWA-171 rev A1 (RTL8811AU). WF2190 (RTL8812AU) is fastest but Mac mini is also hottest.

More Thoughts

After testing with different devices, I have following conclusion:

  1. Always use only one Realtek device and driver on the same OSX computer.
  2. If you want to install a new driver, uninstall the others first.
  3. Although a draft 802.11ac 1T1R device has better spec, it’s not always faster than a 802.11n with 2T2R.

Reference

  1. Apple: How to connect with File Sharing on your Mac
  2. Apple: Mac mini (Late 2012) – Technical Specifications
  3. Apple: macOS Sierra
  4. Apple: OS X
  5. Asus: RT-AC1200G+
  6. D-Link Wireless AC Dual Band USB Adapter DWA-171
  7. eidac: smcFanControl 2.6 released
  8. MACお宝鑑定団:macg.co:Mac mini (Late 2012)は11n/450Mbps/3ストリームに対応している
  9. Marvell: Marvell 88F6282 SoC
  10. Microsoft: Windows Server 2012 R2
  11. netis: WF2190
  12. QNAP
  13. QNAP: File Storage & Sharing
  14. QNAP TS-119PII
  15. QNAP TS-119PII with Mac OSX File Transfer Performance Report
  16. QNAP TS-119PII
  17. QNAP: QTS
  18. SANDISK EXTREME PRO SSD
  19. Seagate Laptop SSHD Datasheet
  20. Thecus W5000 and QNAP TS-119PII with Mac OSX Wireless File Transfer Performance Report
  21. Wiki: Apple Filing Protocol
  22. Wiki: ARM architecture
  23. Wiki: Gigabit Ethernet
  24. Wiki: IEEE 802.11ac
  25. Wiki: IEEE 802.11n-2009
  26. Wiki: Multi-level cell
  27. Wiki: Wi-Fi Protected Access
  28. WikiDevi: ASUS RT-AC1200GP
  29. WikiDevi: Broadcom
  30. WikiDevi: D-Link DWA-171 rev A1
  31. WikiDevi: Netis WF2190
  32. WikiDevi: Realtek

Filed under: Information Tagged: AFP, NAS, QNAP, Wireless Device

How to Solve Thecus D0204 and JMS539 Auto-Disconnect Issue

$
0
0

Thecus D0204 is a Direct-attached storage (DAS) supports two 2.5″ hard drive in RAID 0, 1, JBOD, and two individuals. According to “USB 3.0加持,Thecus D0204小DAS跑得快” on T客邦, it use JMB390 for RAID and JMS539 for SATAII to USB 3.0 bridge.

My problems is it will automatically disconnect and reconnect immediately with OSX. But I was wrong, there are already many posts about the same issue. It’s due to the bugs in JMS539 according to “[心得] Mukii3.5吋硬碟外接盒起死回生紀錄” on 批踢踢實業坊.

Upgrade Firmware

I have check official product page for D0204 but there is nothing to help. On the other hand, “2011年06月10日 JMS539 USB3.0ブリッジを使用した製品の注意事項” on KingTech provides detail explain and solution. For D0204, you need to download patch and follow the steps:

  1. Plugin D0204 to your Windows computer and turn on.
  2. Run FwUpdateTool_v1_16_00_T2.exe
  3. Choose any hard drive in D0204 in USB DISK and the Chips should be JMS551/539 Series.
  4. Make sure it loads JMS539_PM_255.31.3.41.22_20100805.BIN in Firmware File
  5. Click on [Run]
  6. If success, you will see Programming Success!! in Status. It also pop-up a message dialog to restart D0204.

Okay, done. I didn’t see any disconnection after firmware upgrade now.

For Firmware Older than 255.80.03.40.22

You need to search for other firmware before upgrading to 255.31.03.41.22. For example, “SuperSpeed USB 3.0 Device Firmware Update” on Vantec’s Knowledge Base contains instructions and download for  JMS539FwUpdateTool_v03(NST-280S3, NST-310S3, NST-D300S3).zip.

Good luck!

Reference

  1. Apple: OS X
  2. DatasheetsPDF.com: JMS539
  3. JMicron: JMB390
  4. KingTech: 2011年06月10日 JMS539 USB3.0ブリッジを使用した製品の注意事項
  5. KingTech: JMS539 USB3.0ブリッジファームウェア更新_USB3.0HBA設定ファイル 
  6. Thecus: D0204
  7. T客邦:USB 3.0加持,Thecus D0204小DAS跑得快
  8. Vantec: Knowledge Base
  9. Wiki: Direct-attached storage
  10. Wiki: RAID
  11. 批踢踢實業坊:[心得] Mukii3.5吋硬碟外接盒起死回生紀錄
  12. 批踢踢實業坊:Re: [心得] usb 3.0 一些事情碎碎唸 orz…

Filed under: How-To Tagged: DAS, Thecus

Files Contain Windows Invalid Characters Transferred from QNAP to Asustor Using rsync

$
0
0

I want to copy files from QNAP TS-119P II to Asustor AS-5102T directly. There are many solutions: including ftp, rsync, or mount a shared folder.In my case, rsync is the easiest solution.

TS-119P II runs QTS 4.3.3 while AS-5102T is ADM 2.7.1. Details steps might be different if you are using different firmware versions.

I will also talk about invalid characters in names and how ADM handle it. A must read for non-Windows users.

Setup rsync Server on Asustor

Enable Enable Rsync server on [Services] → [Rsync Server] tab and click [Apply].

Next, add a backup module which controls destination path and authentication in [Backup Modules] on the same tab. The Name will show up in TS-119P II and files will be copy to Path here.

If you want to authorize by account, create new users by [Manage Users] dialog. Click [Edit] on the back module. When you enable Authentication in [Backup Module] dialog, select them for this backup module.

Users created here are only for rsync. You won’t see them on [Access Control] in ADM.

Setup a Replication Job on QNAP

Open [Backup Station] → [Remote Replication] → [Rsync (File-Level Backup)] tab and click on [Create a Replication Job] to create a replication job.

In [Remote Replication] dialog, give it a name and click on [Settings] to setup Remote site. In [Settings] dialog, enter the IP and user of AS-5102T. If you didn’t enable Authentication in rsync server,  provide any ADM valid user who has read and write access. Otherwise, provide authorized user in the backup module mentioned in previous section. The [Test] button only verifies if the give IP has a live rsync server. It doesn’t do anything with authentication.

If the authentication is success, you may select the backup module name in rsync server in Destination folder. Put the TS-119P II source folder in Source folder. Click on [Add] to confirm. You cannot only one pair of them in a replication job. If you need more folders to replicate, create a separate job for each of them.

Rsyncing

Push the start icon next to the job in the tab to run this replication job immediately. If you want to run it regularly, click on [Backup frequency] button in [Remote Replication] dialog to schedule.

For files and folders already exist in destination path will be untouched unless there is the same file name from source. The file on destination will be replaced by file with the same name.

Invalid Characters in Names

When I am comparing contents on both sides, I notice a folder * Test  on source becomes _3AJDB~3 on destination on OSX. The former is accessible but the later is not from OSX. Strangely, it is displayed properly in [File Explorer] in ADM. Moving files inside the folder without problems but fail to change name by warning containing invalid characters.

If I rename this folder on ADM from OSX, it displayed properly on OSX but becomes  Test in [File Explorer] in ADM.

Anyway, it’s too wordy. Just take a look at the summary table.

Folders contains invalid characters created on QTS from OSX
QTS rsync from QTS on ADM QTS remote access from OSX ADM remote access from OSX
Display Correct Correct Correct Fail
Access Success Correct Correct Fail
Rename but keep invalid characters
Fail Fail Success and display correctly on QTS Success but display incorrectly on ADM

I think it is ADM who force to follow the rules explained in NTFS and ReFS Invalid Characters section in Invalid Characters in File Names on its ext4. It’s a good idea for Windows users but a potential problem to others – QTS keeps them while ADM won’t. They will be replaced by characters known by ADM but not QTS or OSX.

Reference

  1. Apple: OS X
  2. Asustor: AS-5102T
  3. Asustor: ADM 2.7
  4. Invalid Characters in File Names
  5. QNAP: Downloads and other support for TS-119P II
  6. QNAP: QTS
  7. Wiki: ext4
  8. Wiki: File Transfer Protocol
  9. Wiki: mount (Unix)
  10. Wiki: rsync

Filed under: How-To, Information Tagged: Asustor, Linux, Mac, NAS, OSX, QNAP

Check And Solve If Your QNAP NAS Has been Injected a CPUMiner Program

$
0
0

It’s been discussed from 2017/4/18 on disk_manage.cgi hogging CPU usage and 2017/4/28 on  Mobil01: QTS 4.3.3 正式版問題討論區 #86 that there is a mining program using your NAS to work for mineXMR.com

I have check my TS-119P II (QTS 4.3.3) and TS-251A (QTS 4.2.2), none of them have this program. Here is my summary of this issue from internet:

What Happen

A mining program is injected to using your NAS to work for mineXMR.com using your NAS to work for mineXMR.com.

It happens on QTS 4.2.5 build 20170413 on TS-253A which has an Intel N3150 or N3160 reported by esper on disk_manage.cgi hogging CPU usage and 4.3.3 reported by rf5000 on QNAP用戶注意! QTS 4.3.3 被植入XMR挖礦木馬,建議先不要升級!

My TS-119P II which has a Marvell 88F6282 is running QTS 4.3.3 but doesn’t have this issue.

According to #29 on this thread, the program is executed as:

/mnt/HDA_ROOT/disk_manage.cgi -a cryptonight -t 3 -b 127.0.0.1:4048 -o stratum+tcp://pool.minexmr.com:4444 -u 457MwddDoYAPem9bDhkz2tGLzZCyPkuJuQmyFxnpZadXLAc3ymKo2CQ596UzTa6rYES7Dr3FhwdPM6bMMRZxe5CL9XMo7sQ -p x -D -P

According to the [Connection Details] section in [Get Started] tab on mineXMR.com, port 4444 is for Low end CPU. And also the [Mining Apps] section, this program should be CPUMiner (forked by LucasJones & Wolf) which is available on GitHub: OhGodAPet/cpuminer-multi. In the README.md file, it is x86-64 only.

Architecture-specific notes:

  • CryptoNight works only on x86 and x86-64.
  • If you don’t have AES-NI, it’s slower. A lot slower, around 1/3rd the speed. This implementation is deprecated and will not be improved.

If you are using a NAS with ARM architecture, you have less chance to get involved in this issue..

How to Identify if CPUMiner is Running on my NAS

See if you have high CPU utilization, any strange process from /mnt/HDA_ROOT/, and any unknown schedule task on /mnt/HDA_ROOT/. Let me explain the commands you need and show you some examples.

High CPU Utilization

You probably will see high CPU utilization (30% or higher) in [Control Panel] → [System Settings] → [System Status] → [Resource Monitor] → [CPU usage] tab when low network access.

But if your are using QTS 4.3.3, don’t get fooled with the [Resource Monitor] gadget in [Dashboard] which may be launched by upper right corner. It’s not always updated automatically.

Strange Running Process

Enable Allow SSH connection in [Control Panel] → [Network Services] → [Telnet/SSH] tab and login as admin and search for process disk_manage.cgi. If /mnt/HDA_ROOT/disk_manage.cgi is found, you probably get infected. Check schedule tasks in next section.

disk_manage.cgi is standard QTS program but not running from /mnt/HDA_ROOT/. It’s a fake with the same name.

Below is QTS 4.3.3 without mining programs:

[~] # ps -ef | grep disk_manage.cgi
 6345 admin       428 S   grep disk_manage.cgi

Below is QTS 4.2.2 without mining programs:

[~] # ps -ef | grep disk_manage.cgi
 8203 admin Z N [disk_manage.cgi]
 8204 admin Z N [disk_manage.cgi]
 8392 admin 428 S grep disk_manage.cgi

Below is QTS with mining programs according to #29 on this thread, you will see how the program is executed:

[~] # ps -ef | grep disk_manage.cgi
24819 admin  1008 S grep disk_manage.cgi
26472 admin 19136 S /mnt/HDA_ROOT/disk_manage.cgi -a cryptonight -t 3 -b 127.0.0.1:4048 -o stratum+tcp://pool.minexmr.com:4444 -u 457MwddDoYAPem9bDhkz2tGLzZCyPkuJuQmyFxnpZadXLAc3ymKo2CQ596UzTa6rYES7Dr3FhwdPM6bMMRZxe5CL9XMo7sQ -p x -D -P

ps is used to check for current processes. 26472 is the PID (Process ID) of /mnt/HDA_ROOT/disk_manage.cgi in this case. You may learn more detail in PROCESS STATE CODES in Man Pages PS(1) and ps aux output meaning on superuser. Here is a list to help you understand above reports.

  1. N: low-priority (nice to other users)
  2. S: Interruptible sleep (waiting for an event to complete)
  3. Z: Defunct (“zombie”) process, terminated but not reaped by its parent.

You may also use [Control Panel] → [System Settings] → [System Status] → [Resource Monitor] → [Process] tab to find. But it only shows 15 processes, not a good idea if you have many running in background.

There are actually 3 suspicious processes including:

  1. /mnt/HDA_ROOT/disk_manage.cgi
  2. /mnt/HDA_ROOT/qwatchdogd.cgi
  3. /mnt/HDA_ROOT/rcu_shed.cgi

Strange Schedule Program

ssh login to QTS as admin and search for schedule task rcu_shed. If /mnt/HDA_ROOT/rcu_shed is found, you probably get infected.

Below is QTS 4.2.2 without mining programs:

[~] # crontab -l | grep rcu_shed
[~] #

Or you may see all schedule tasks to verify. Here is the list running on the same machine:

[~] # crontab -l
# m h dom m dow cmd
0 3 * * * /usr/local/sbin/ImR_all -soft /Qmultimedia
0 2 * * * /sbin/qfstrim
0 3 * * 0 /etc/init.d/idmap.sh dump
0 4 * * * /sbin/hwclock -s
0 3 * * * /sbin/vs_refresh
0 3 * * * /sbin/clean_reset_pwd
0-59/15 * * * * /etc/init.d/nss2_dusg.sh
30 7 * * * /sbin/clean_upload_file
0-59/10 * * * * /etc/init.d/storage_usage.sh
30 3 * * * /sbin/notice_log_tool -v -R
10 15 * * * /usr/bin/power_clean -c 2>/dev/null
4 3 * * 3 /etc/init.d/backup_conf.sh
35 7 * * * /sbin/qbox_util -c  > /dev/null 2>/dev/null
* * * * * /mnt/ext/opt/netmgr/util/lock_timer.sh
59 12 * * * /share/CACHEDEV1_DATA/.qpkg/QcloudSSLCertificate/bin/ssl_agent_cli

Below is QTS with mining programs according to #17 on this thread and JarnoVanDerLinden’s post on this thread, you will see how the program is scheduled:

[~] # crontab -l | grep rcu_shed
*/3 * * * * /mnt/ext/opt/apache/bin/php /mnt/HDA_ROOT/rcu_shed

Solution

JarnoVanDerLinden found there is no autorun.sh and suspect an exploit  related to Security Vulnerabilities Addressed in QTS 4.2.3 Builds 20170121 and 20170124 in his post on this thread. Therefore, even you have kill the process and remove the schedule task, it might happen again until you install the security patch.

Kill the Process

To stop continue the mining program, run following command:

[~] # kill -KILL PID_OF_/mnt/HDA_ROOT/disk_manage.cgi
[~] # kill -KILL PID_OF_/mnt/HDA_ROOT/qwatchdogd.cgi
[~] # kill -KILL PID_OF_/mnt/HDA_ROOT/rcu_shed.cgi

I didn’t know the PID of your processes, use ps to check by yourself. It’s the number on the first column.

Remember, there are at least 3 different processes. You might see more PID than 3 if it is running. Kill them all.

  1. /mnt/HDA_ROOT/disk_manage.cgi
  2. /mnt/HDA_ROOT/qwatchdogd.cgi
  3. /mnt/HDA_ROOT/rcu_shed.cgi

Stop Auto-reload

To stop reload the mining program, remove following line in crontab configuration. Use vi to load /mnt/HDA_ROOT/.config/crontab, delete following line, and overwrite.

*/3 * * * * /mnt/ext/opt/apache/bin/php /mnt/HDA_ROOT/rcu_shed

Some report crontab -e doesn’t work which I cannot confirm and have no ideas why.

Delete Mining Program and Related

Remember to delete disk_manage.cgi, rcu_shed, rcu_shed.json, and qwatchdogd in /mnt/HDA_ROOT/ after removing. There is no need to keep them. 🙂

/mnt/HDA_ROOT/qwatchdogd is also a fake program. It’s not the build-in /sbin/qwatchdogd.

Below is an modified report by sapow on mobile01 in #62 of this thread:

[~] # ls -al /mnt/HDA_ROOT/move_tmp
-rwxrwxrwx 1 admin administ 4774560 Apr 23 23:46 disk_manage.cgi*
-rwxrwxrwx 1 admin administ 5544024 Apr 23 23:46 qwatchdogd*
-rwxrwxrwx 1 admin administ   12299 Apr 29 01:12 rcu_shed*
-rwxrwxrwx 1 admin administ    2827 May  3 20:45 rcu_shed.json*
[~] # ls -al /sbin/qwatchdogd
-rwxr-xr-x 1 admin administ    8256 Apr 13 13:46 /sbin/qwatchdogd*

Use Malware Remover

Malware Remover in App Center on QTS
Malware Remover in App Center on QTS

There is a [Malware Remover] in [App Center] in your QTS but not available on QNAP App Center page yet. Or you may download from here which is a direct link to QNAP. Install the latest version 2.1.0 to remove this mining program.

[App Center] may be launch in [Main Menu] on upper left corner. [Malware Remover] can be found in [Utilities] category or just search for “malware”.

The Malware Remover is designed to protect your Turbo NAS against harmful software. QNAP strongly recommends that you install this app to avoid potential security risks. During installation, the app will scan your Turbo NAS and quarantine any detected malware. After installation: – If no warning messages appear after installation, your Turbo NAS is not infected. You can verify the scan results by going to “Control Panel” > “System Logs”. – If a warning message appears, malware was detected on your Turbo NAS and it has now been quarantined. You must now immediately reboot the system and change the administrator’s password. If you have any questions regarding the Malware Remover, please contact us at http://helpdesk.qnap.com/

There is no interactive interface for this program. It just work in the background but you may read messages from it in [Control Panel] → [System Settings] → [System Logs] like below:

Type    Date    Time    Users    Source IP    Computer name    Content    
Information    2017/05/04    09:50:54    System    127.0.0.1    localhost    [App Center] Malware Remover enabled.    
Information    2017/05/04    09:50:54    System    127.0.0.1    localhost    [App Center] Malware Remover 2.1.0 has been installed in /share/CACHEDEV1_DATA/.qpkg/MalwareRemover successfully.    

Here is a screen capture contributed by an infected user who removes them successfully with Malware Remover 2.1.0:

QNAP Malware Remover removes the XMR mining program and related files successfully and report to System Logs
QNAP Malware Remover removes the XMR mining program and related files successfully and report to System Logs

Get the Patch

Get all latest patch ASAP especially Security Vulnerabilities Addressed in QTS 4.2.3 Builds 20170121 and 20170124 and Security Vulnerabilities Addressed in QTS 4.2.4 Build 20170313.

It’s not necessary to upgrade your firmware to 4.3.3 if yours is 4.2.x. Just apply the patch.

Best If You May

It is recommended to follow the instruction on An Urgent Fix on the Reported Infection of a Variant of GNU Bash Environment Variable Command Injection Vulnerability on QNAP by reinitialize NAS. They  might also install other backdoors for future visit.

Please read Synology Security Issue and How-to Harden your NAS if you want to know how to secure your NAS.

Reference

  1. FreeBAS: FreeBSD Man Pages PS(1)
  2. GitHub: OhGodAPet/cpuminer-multi
  3. Intel® Celeron® Processor N3150
  4. Intel® Celeron® Processor N3160
  5. Marvell: Marvell 88F6282 SoC
  6. mineXMR.com
  7. Mobile01: QNAP用戶注意! QTS 4.3.3 被植入XMR挖礦木馬,建議先不要升級!
  8. Mobil01: QTS 4.3.3 正式版問題討論區 #86
  9. Mobile01: sapow的會員資訊
  10. QNAP: An Urgent Fix on the Reported Infection of a Variant of GNU Bash Environment Variable Command Injection Vulnerability
  11. QNAP: App Center
  12. QNAP Forum: disk_manage.cgi hogging CPU usage
  13. QNAP: Downloads and other support for TS-119P II
  14. QNAP: Downloads and other support for TS-251A
  15. QNAP: Downloads and other support for TS-253A
  16. QNAP: QTS
  17. QNAP: Malware Removal 2.1.0
  18. QNAP: Security Vulnerabilities Addressed in QTS 4.2.3 Builds 20170121 and 20170124
  19. QNAP: Security Vulnerabilities Addressed in QTS 4.2.4 Build 20170313
  20. Synology Security Issue and How-to Harden your NAS
  21. superuser: ps aux output meaning
  22. Wiki: ARM architecture
  23. Wiki: Secure Shell
  24. Wiki: x86-64


Filed under: How-To Tagged: QNAP, Security

Detail Explain of QNAP Malware Remover 2.1.0

$
0
0

In recently issue mentioned in Check And Solve If Your QNAP NAS Has been Injected a CPUMiner Program, QNAP quickly release Malware Remover 2.1.0 to help. Let’s take a look at this program and go detail.

What Can It Help

If your are suffering by CPUMiner reported by esper on disk_manage.cgi hogging CPU usage and rf5000 on QNAP用戶注意! QTS 4.3.3 被植入XMR挖礦木馬,建議先不要升級!, it helps you to remove them completely.

Installation

You may install from [App Center] in your QTS directly or download from here which is a direct link to QNAP then manually install via ssh or [App Center]. Remember to unzip the download file to get QDK_2.2.14.qpkg.

Install from App Center

[App Center] may be launch in [Main Menu] on upper left corner. [Malware Remover] can be found in [Utilities] category or just search for “malware”.

If you decide to upload manually, click on the gear symbol on the upper-right corner in [App Center] to browse and install QDK_2.2.14.qpkg.

Install in Terminal Manually

Enable Allow SSH connection in [Control Panel] → [Network Services] → [Telnet/SSH] tab, ssh login to QTS as admin and find where you upload QDK_2.2.14.qpkg. Run this package and it begins to install.

Here is when you install Malware Remover 2.1.0 first time.

[/share/Public] # ./MalwareRemover_2.1.0.qpkg
Install QNAP package on TS-NAS...
12+1 records in
12+1 records out
./
./qpkg.cfg
./qinstall.sh
./package_routines
./built_info
0+1 records in
0+1 records out
12+0 records in
12+0 records out
qinstall.sh: line 354: [: -gt: unary operator expected
qinstall.sh: line 356: [: -lt: unary operator expected
Firmware check is fine.
Link service start/stop script: MalwareRemover.sh
Set QPKG information in /etc/config/qpkg.conf
[App Center] Malware Remover 2.1.0 has been installed in /share/CACHEDEV1_DATA/.qpkg/MalwareRemover successfully.
[App Center] Malware Remover enabled.
[/share/Public] #

Here is when you have already install Malware Remover, it will upgrade existing version.

[/share/Public] # ./MalwareRemover_2.1.0.qpkg
Install QNAP package on TS-NAS...
12+1 records in
12+1 records out
./
./qpkg.cfg
./qinstall.sh
./package_routines
./built_info
0+1 records in
0+1 records out
12+0 records in
12+0 records out
MalwareRemover 2.1.0 is already installed. Setup will now perform package upgrading.
qinstall.sh: line 354: [: -gt: unary operator expected
qinstall.sh: line 356: [: -lt: unary operator expected
Firmware check is fine.
Link service start/stop script: MalwareRemover.sh
Set QPKG information in /etc/config/qpkg.conf
[App Center] Malware Remover 2.1.0 has been installed in /share/CACHEDEV1_DATA/.qpkg/MalwareRemover successfully.
[App Center] Malware Remover enabled.
[/share/Public] #

Configuration File

The configuration file is saved in/mnt/HDA_ROOT/.config/qpkg.conf as:

[MalwareRemover]
Build = 20170504
Name = MalwareRemover
Display_Name = Malware Remover
Version = 2.1.0
Author = QNAP Systems, Inc.
QPKG_File = MalwareRemover.qpkg
Date = 2017-05-04
Shell = /share/CACHEDEV1_DATA/.qpkg/MalwareRemover/MalwareRemover.sh
Install_Path = /share/CACHEDEV1_DATA/.qpkg/MalwareRemover
RC_Number = 101
Enable = TRUE

What Have Been Installed

MalwareRemover_2.1.0.qpkg contains everything it installs. To extract qpkg, you have to install QDK (QNAP Development Kit) which may be download from GitHub. But I suggest to follow the [Install QDK] section in QDK Quick Start Guide to manually install in [App Center], get QDK 2.2.14, unzip this file, and upload QDK_2.2.14.qpkg is much easier.

If install successfully, you will see QDK 2.2.14 in [MyApps].

Next, ssh as admin and run qbuild to extract MalwareRemover_2.1.0.qpkg:

[/share/Public] # qbuild --extract MalwareRemover_2.1.0.qpkg ./MallwareRemover
./
./qpkg.cfg
./qinstall.sh
./package_routines
./built_info

When you open [MallwareRemover], you will see data.tar.gz which is not on above list. We needs to be decompressed to know what it contains.

Because this file has been tar then zip compressed, use following command to unzip then untar. If you are interested, Unpacking or uncompressing gz files under Linux and UNIX systems on nixCraft has detail explain on this type of compressed file.

[/share/Public] # tar -zxvf data.tar.gz
./
./MalwareRemover.sh
./.qpkg_icon_gray.gif
./.qpkg_icon.gif
./.gitkeep
[/share/Public] #

Okay, now we know MalwareRemover_2.1.0.qpkg contains following files:

  1. qpkg.cfg
  2. qinstall.sh
  3. package_routines
  4. built_info
  5. MalwareRemover.sh (in data.tar.gz)
  6. .qpkg_icon_gray.gif (in data.tar.gz)
  7. .qpkg_icon.gif (in data.tar.gz)
  8. .gitkeep (in data.tar.gz)

As we may see, qinstall.sh is for installation while MalwareRemover.sh is the real removal shell script. Nothing specific to x86-64 only. If you want to run this script on NAS based on ARM architecture, it is totally possible. But on a different NAS brand, you need to modify environment variables and relative directories.

One-Time-Only Shell Script

QNAP actually rely on only MalwareRemover.sh to remove malware process, related files, and report to [System Logs]. But it’s apply for this case only, it’s not modern antivirus to separate scan and virus database. I suggest you download MalwareRemover_2.1.0.qpkg and keep it in a safe place.

Update: 2.1.1 Add To Scan at 3:00AM Everyday

QNAP release a new minor version update within 15 hours. I notice more message in system log and will execute at 3:00AM in the morning everyday.

More Message With Schedule Scan

After comparing the two MalwareRemover.sh, I notice 2.1.1 has an extra variable $ISCLEAN and more message to log – “[MalwareRemover] Scan completed.” and “[MalwareRemover] Scan completed and malware deleted.”.

These extra should be related to the new schedule scan task.

Schedule Scan Everyday

In package_routines, extra scripts have been added to cron. It will scan every 3:00AM in the morning everyday. You will see a new schedule task as below:

0 3 * * * /share/CACHEDEV1_DATA/.qpkg/MalwareRemover/MalwareRemover.sh start

You may learn more about customize cron in Admin’s Choice’s “Crontab – Quick Reference”.

Reference

  1. Admin’s Choice: Crontab – Quick Reference
  2. Check And Solve If Your QNAP NAS Has been Injected a CPUMiner Program
  3. GitBook: QDK – QPKG Development Kit
  4. GitBook: QDK Quick Start Guide
  5. GitHub: QDK
  6. Mobile01: QNAP用戶注意! QTS 4.3.3 被植入XMR挖礦木馬,建議先不要升級!
  7. nixCraft: Unpacking or uncompressing gz files under Linux and UNIX systems
  8. QNAP: Malware Removal 2.1.0
  9. QNAP: QDK 2.2.14
  10. QNAP: QTS
  11. QNAP Forum: disk_manage.cgi hogging CPU usage
  12. Wiki: ARM architecture
  13. Wiki: Cron
  14. Wiki: Secure Shell
  15. Wiki: Shell script
  16. Wiki: vi
  17. Wiki: x86-64

 


Filed under: Information Tagged: NAS, QNAP, Security

Setup a Surveillance System to Proof Crash of Asus RT-AC1200G+

$
0
0

I write this post is related to ASUS ORDER CUSTOMERS TO PROVIDE VIDEO PROOF ON A CRASH ISSUE THEY HAVE REPRODUCE THAT HAPPENS ON THEM on 1st RMA: From 2017/5/15 till Now section in Asus RT-AC1200G+ Random Reboots Automatically.

Here I use DCS-930L Wireless N Network Camera from D-Link and AS-5102T from Asustor as an example to setup surveillance system and keep track of the light on Asus RT-AC1200G+. I will update with other models in the future.

This is a sink cost owning Asus products when you ask for repair.

Compatibility

If you are using a different device or plan to buy, it’s better to check Asustor Compatibility – IP Camera before begin.

Setup D-Link DCS-930L

You need to use Fast Ethernet to connect to a powered DCS-930L. When it’s turned on, the green light will blink.

Now we need to find the IP address of DCS-930L. I click on clients in [Network Map] Tab in RT-AC51U to get it as below:

Clients in Network Map on RT-AC51u
Clients in Network Map on RT-AC51u

I recommend to change the default password [blank] in [MAINTENANCE] tab by accessing  IP address of DCS-930L with any browser immediately. It’s very dangerous to leave it as default.

work with Surveillance Center 2.6 on Asustor

Install and Setup

Launch App Central and install Surveillance Center 2.6 from [ASUSTOR Apps] tab on AS-5102T.

Now, here is the tricky part. Download and install ASCNPComp.pkg which pops up when you launch Surveillance Center. Restart or launch Safari to open Surveillance Center. For Windows, use Internet Explorer instead. You won’t be able to setup Surveillance Center neither with FireFox nor Chrome. because of incompatibility.

Once you launch Surveillance Center without pop-up, add your camera in [Settings] tab. I choose to enter information manually

Settings of Camera in Surveillance Center 2.6
Settings of Camera in Surveillance Center 2.6

Recording

In [Live View] tab of Surveillance Center, select and click on video record icon button to begin. Click again to stop. You may also use AiSecure which is an app designer for mobile/tablets to control.

If you want to fine tune any recording parameters, it is accessible in [Camera] tab of Edit dialog on selected camera.

For your reference, I choose to disable audio, 640×480 in Resolution, 5 for Frame Rate, and 4 for Quality. It takes up 150MB for every 30 minutes. In other words, it takes up about 5GB for 16 hours work every day.

Playback and Upload

Videos are saved to [Surveillance] folder in MKV format separated as individual files by minute and group by hours then date. It may be played by VLC media player and uploaded supported by YouTube.

Reference

  1. Asus
  2. Asus RT-AC1200G+
  3. Asus RT-AC1200G+ Random Reboots Automatically
  4. Asus RT-AC51U
  5. Asustor AiSecure
  6. Asustor App Central
  7. Asustor AS-5102T
  8. Asustor Compatibility – IP Camera
  9. Asustor Surveillance Center 2.6
  10. D-Link DCS-930L Wireless N Network Camera
  11. FireFox
  12. Google Chrome
  13. macOS Safari
  14. VLC media player
  15. Wiki: Fast Ethernet
  16. Wiki: IP address
  17. Wiki: Matroska
  18. YouTube

Filed under: How-To Tagged: Asustor, NAS, Surveillance, Wireless Router

802.11n 300 Mbps and 802.11ac 867 Mbps Wireless Routers in Real-World Report

$
0
0

Because QNAP Virtualization Station and other services needs more and more bandwidth, I bought a Asus RT-AC1200G+ to replace RT-AC51u and netis WF2190 to upgrade to 802.11ac 867Mbps. Expecting to replace my wired  Gigabit Ethernet.

Things doesn’t go well. I experience random reboots with Asus RT-AC1200G+ but learn the complexity of wireless implement. While working on it, an Edimax engineer give me a hand and send me an Edimax BR-6478AC V2. Dolly from Asus also provides me an unpublic firmware to test. And all the commends on post. Without their help, I couldn’t get my wireless working properly.

Therefore, I decide to write this post to share my real-world experience. It will be update continuously.

Let’s begin from knowing my devices, network map, and placement:

QNAP TS-251A

QNAP TS-251A runs QTS is an embedded Linux developed by QNAP. It contains:

  1. Intel Celeron Processor N3060 which is a dual core 64-bit processor with 2MB L2 cache.
  2. 4GB RAM and is upgradable.
  3. Apple HTS545050A7E362 500GB  on tray 1.
  4. Kingston SSDNow V+100 64GB on tray 2.
  5. QTS is 4.3.3.0210.

Mac Mini Late 2012

I have upgrade my Mac mini Late 2012 to 16GB RAM and SanDisk Extreme Pro 480GB SSD. Now running OSX 10.12 aka macOS Sierra.

According to Mac Mini Late 2012 Teardown on iFixIt, it contains:

  1. Broadcom BCM4331 supports 802.11n, and 802.11a @ 5GHz.
  2. Broadcom BCM4331 supports 802.11n802.11g, and 802.11b @ 2.4GHz.
  3. Max speed for 802.11n is 450Mbps @ 5GHz with 3T3R.
  4. Max speed for 802.11n is 150Mbps @ 2.4GHz with 1T1R.
  5. Broadcom BCM57765 as Gigabit Ethernet.

Asus RT-AC1200G+

According to ASUS RT-AC1200GP on WikiDevi, it contains:

  1. Broadcom BCM47189 supports 802.11ac802.11n, and 802.11a@ 5GHz.
  2. Broadcom BCM43217 supports 802.11n802.11g, and 802.11b @ 2.4GHz.
  3. Max speed for 802.11ac is 867Mbps with 2T2R.
  4. Max speed for 802.11n is 300Mbps with 2T2R.
  5. Broadcom BCM53125 as Gigabit Ethernet.
  6. Firmware is 9.0.0.4.382_10680.

Edimax BR-6478AC v2

According to Edimax BR-6478AC v2 on WikiDevi, it contains:

  1. MediaTek MT7612E supports 802.11ac802.11n, and 802.11a@ 5GHz.
  2. MediaTek MT7620A supports 802.11n802.11g, and 802.11b @ 2.4GHz.
  3. Max speed for 802.11ac is 867Mbps with 2T2R.
  4. Max speed for 802.11n is 300Mbps with 2T2R.
  5. RealTek: RTL8367RB as Gigabit Ethernet
  6. Firmware is 1.09.

netis WF2190

According to Netis WF2190 on WikiDevi, it contains:

  1. Realtel RTL8812AU supports draft 802.11ac which is not 802.11ac.
  2. Max speed for 802.11ac is 867Mbps with 2T2R.
  3. Max speed for 802.11n is 300Mbps with 2T2R.
  4. USB 3.0 interface.
  5. OSX driver is RTLWlanU_MacOS10.6_MacOS10.11_Driver_1830.2.b19_1827.4.b22_DropDownMenu_5.0.2.b9.

Network Diagram and Placement

I put wireless routers and TS-251A on intermediated floor. netis WF2190 on the stairs. And Mac mini on my desk. Horizontal width within 1 meter.

Usual Placement of Asus RT-AC1200G+

Asus RT-AC1200G+ Usual Placement and Network Diagram
Asus RT-AC1200G+ Usual Placement and Network Diagram

Test Placement of Asus RT-AC1200G+

Asus RT-AC1200G+ Test Placement and Network Diagram
Asus RT-AC1200G+ Test Placement and Network Diagram

Test Placement of Edimax BR-6478AC V2

Edimax BR-6478AC V2 Test Placement and Network Diagram
Edimax BR-6478AC V2 Test Placement and Network Diagram

Connection Speed and RSSI

Mac mini using Build-in Network Card Connects to Asus RT-AC1200G+ at Original Placement

SSID: "MyHome_24G"
RSSI: 0 dBm	SNR: 0 dB	noise: -92 dBm	Channel: 9u
BSSID: 60:45:CB:8E:3C:88	Capability: ESS ShortSlot
Supported Rates: [ 1(b) 2(b) 5.5(b) 6 9 11(b) 12 18 24 36 48 54 ]
HT Capable:
	Chanspec: 2.4GHz channel 7 40MHz (0x1907)
	Primary channel: 9
	HT Capabilities:
	Supported MCS : [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]

Mode	: AP Only

Stations List
----------------------------------------
idx MAC               Associated Authorized    RSSI PSM SGI STBC Tx rate Rx rate Connect Time

SSID: "MyHome_5G"
RSSI: 0 dBm	SNR: 0 dB	noise: -92 dBm	Channel: 149/80
BSSID: 60:45:CB:8E:3C:8C	Capability: ESS
Supported Rates: [ 6(b) 9 12(b) 18 24(b) 36 48 54 ]
VHT Capable:
	Chanspec: 5GHz channel 155 80MHz (0xe09b)
	Primary channel: 149
	HT Capabilities:
	Supported MCS : [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]
	VHT Capabilities:
	Supported VHT (tx) Rates:
		NSS: 1 MCS: 0-9
		NSS: 2 MCS: 0-9
	Supported VHT (rx) Rates:
		NSS: 1 MCS: 0-9
		NSS: 2 MCS: 0-9

Mode	: AP Only

Stations List
----------------------------------------
idx MAC               Associated Authorized    RSSI PSM SGI STBC Tx rate Rx rate Connect Time
    A8:8E:24:A4:57:DD Yes        Yes         -57dBm No  Yes Yes     300M    300M 00:40:01

Mac mini using netis WF2190 Connects to Asus RT-AC1200G+ at Original Placement

SSID: "MyHome_24G"
RSSI: 0 dBm	SNR: 0 dB	noise: -92 dBm	Channel: 9u
BSSID: 60:45:CB:8E:3C:88	Capability: ESS ShortSlot
Supported Rates: [ 1(b) 2(b) 5.5(b) 6 9 11(b) 12 18 24 36 48 54 ]
HT Capable:
	Chanspec: 2.4GHz channel 7 40MHz (0x1907)
	Primary channel: 9
	HT Capabilities:
	Supported MCS : [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]

Mode	: AP Only

Stations List
----------------------------------------
idx MAC               Associated Authorized    RSSI PSM SGI STBC Tx rate Rx rate Connect Time

SSID: "MyHome_5G"
RSSI: 0 dBm	SNR: 0 dB	noise: -92 dBm	Channel: 149/80
BSSID: 60:45:CB:8E:3C:8C	Capability: ESS
Supported Rates: [ 6(b) 9 12(b) 18 24(b) 36 48 54 ]
VHT Capable:
	Chanspec: 5GHz channel 155 80MHz (0xe09b)
	Primary channel: 149
	HT Capabilities:
	Supported MCS : [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]
	VHT Capabilities:
	Supported VHT (tx) Rates:
		NSS: 1 MCS: 0-9
		NSS: 2 MCS: 0-9
	Supported VHT (rx) Rates:
		NSS: 1 MCS: 0-9
		NSS: 2 MCS: 0-9

Mode	: AP Only

Stations List
----------------------------------------
idx MAC               Associated Authorized    RSSI PSM SGI STBC Tx rate Rx rate Connect Time
    04:8D:39:53:DB:72 Yes        Yes         -54dBm No  Yes Yes     585M  866.7M 00:00:44

Mac mini Build-in Network Card Connects to Asus RT-AC1200G+ at Test Placement

SSID: "MyHome_24G"
RSSI: 0 dBm	SNR: 0 dB	noise: -92 dBm	Channel: 9u
BSSID: 60:45:CB:8E:3C:88	Capability: ESS ShortSlot
Supported Rates: [ 1(b) 2(b) 5.5(b) 6 9 11(b) 12 18 24 36 48 54 ]
HT Capable:
	Chanspec: 2.4GHz channel 7 40MHz (0x1907)
	Primary channel: 9
	HT Capabilities:
	Supported MCS : [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]

Mode	: AP Only

Stations List
----------------------------------------
idx MAC               Associated Authorized    RSSI PSM SGI STBC Tx rate Rx rate Connect Time

SSID: "MyHome_5G"
RSSI: 0 dBm	SNR: 0 dB	noise: -92 dBm	Channel: 149/80
BSSID: 60:45:CB:8E:3C:8C	Capability: ESS
Supported Rates: [ 6(b) 9 12(b) 18 24(b) 36 48 54 ]
VHT Capable:
	Chanspec: 5GHz channel 155 80MHz (0xe09b)
	Primary channel: 149
	HT Capabilities:
	Supported MCS : [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]
	VHT Capabilities:
	Supported VHT (tx) Rates:
		NSS: 1 MCS: 0-9
		NSS: 2 MCS: 0-9
	Supported VHT (rx) Rates:
		NSS: 1 MCS: 0-9
		NSS: 2 MCS: 0-9

Mode	: AP Only

Stations List
----------------------------------------
idx MAC               Associated Authorized    RSSI PSM SGI STBC Tx rate Rx rate Connect Time
    A8:8E:24:A4:57:DD Yes        Yes         -61dBm No  Yes Yes     300M    300M 00:00:34

Mac mini using netis WF2190 Connects to Asus RT-AC1200G+ at Original Placement

SSID: "MyHome_24G"
RSSI: 0 dBm	SNR: 0 dB	noise: -92 dBm	Channel: 9u
BSSID: 60:45:CB:8E:3C:88	Capability: ESS ShortSlot
Supported Rates: [ 1(b) 2(b) 5.5(b) 6 9 11(b) 12 18 24 36 48 54 ]
HT Capable:
	Chanspec: 2.4GHz channel 7 40MHz (0x1907)
	Primary channel: 9
	HT Capabilities:
	Supported MCS : [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]

Mode	: AP Only

Stations List
----------------------------------------
idx MAC               Associated Authorized    RSSI PSM SGI STBC Tx rate Rx rate Connect Time

SSID: "MyHome_5G"
RSSI: 0 dBm	SNR: 0 dB	noise: -92 dBm	Channel: 149/80
BSSID: 60:45:CB:8E:3C:8C	Capability: ESS
Supported Rates: [ 6(b) 9 12(b) 18 24(b) 36 48 54 ]
VHT Capable:
	Chanspec: 5GHz channel 155 80MHz (0xe09b)
	Primary channel: 149
	HT Capabilities:
	Supported MCS : [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]
	VHT Capabilities:
	Supported VHT (tx) Rates:
		NSS: 1 MCS: 0-9
		NSS: 2 MCS: 0-9
	Supported VHT (rx) Rates:
		NSS: 1 MCS: 0-9
		NSS: 2 MCS: 0-9

Mode	: AP Only

Stations List
----------------------------------------
idx MAC               Associated Authorized    RSSI PSM SGI STBC Tx rate Rx rate Connect Time
    04:8D:39:53:DB:72 Yes        Yes         -47dBm No  Yes Yes     702M  866.7M 01:06:47

Edimax Edimax BR-6478AC V2 Has Neither Concious Connection Speed Nor RSSI

There is no explicity connection speed and received signal strength indication (RSSI) on Edimax BR-6478AC V2. It provides following information:

Edimax BR-6478AC v2 Connection Infomation
Edimax BR-6478AC v2 Connection Infomation

Data Rate with 802.11n at MCS15 means 300Mbps while with 802.11ac is 867Mbps. Broadcom BCM4331‘s Power Saving is switching ON and OFF all the time.

MCS15 is not found on Wiki. But I found it in How to interpret 802.11ac datarates on Cisco Support Community, it means 64QAM 5/6 modulation.

Test Method

For security concern, I enable both WPA2 Personal and MAC filtering.

Test files are the same as my NAS test in Prepare Your NAS File Transfer Performance Test with Mac OSX Client:

My typical working files contains small document, photo, and big disk imagefiles. Therefore, I create my sample data set with one 3,3GB VDI file, 851 jpeg photos for 2.9GB, and 6 AVI video for 911.2MB.

Connect from OS X to NAS is explained in the same article except for using AFP (Apple Filing Protocol) instead of Samba and NFS here.

I use FreeFileSync to copy and measure transfer speed. After each test, run purge to clear cache. This will force to read files from NAS. Use Activity Monitor to check if Cached Files usage has been shrank.

Chens-Mac-mini:~ amigo$ sudo purge
Password:
Chens-Mac-mini:~ amigo$

Performance

Asus RT-AC1200G+ and Edimax BR-6478AC V2 at the Same Test Placement

Asus RT-AC1200G+ and Edimax BR-6478AC V2 at the Same Test Placement
Asus RT-AC1200G+ and Edimax BR-6478AC V2 at the Same Test Placement

Asus RT-AC1200G+ at Usual and Test Placement

Asus RT-AC1200G+ at Usual and Test Placement
Asus RT-AC1200G+ at Usual and Test Placement

Analyze

For easier reading, I use Broadcom BCM4331 to replace the build-in wireless network card in Mac mini.

Wireless Routers has Different Transferring Speed

In Asus RT-AC1200G+ and Edimax BR-6478AC V2 with the Same Test PlacementBroadcom BCM4331 is 56% faster through BR-6478AC V2 than RT-AC1200G+ while uploading to TS-251A. Using WF2190 is 148%.

Others are within 5% difference which means similar performance to me.

Pick a Matched Wireless Router When Upgrade Client Network Cards

In Asus RT-AC1200G+ and Edimax BR-6478AC V2 with the Same Test Placement, upgrading from Broadcom BCM4331 to WF2190 brings 75% faster through BR-6478AC V2 but drops to 9% RT-AC1200G+ while uploading to TS-251A.

Same upgrading brings 19% faster through BR-6478AC V2 and 27% through RT-AC1200G+ while downloading from TS-251A.

Wired GbE is Still Much Faster Than 802.11ac 867Mbps

On GbE tests, BR-6478AC V2 is similar to RT-AC1200G+ and both are much faster than 802.11ac 867Mbps and  802.11n 300Mbps.

Placement Makes Difference

In Asus RT-AC1200G+ at Usual and Test Placement, Broadcom BCM4331 is identical but WF2190 brings 80% faster while downloading but drops 56% uploading to TS-251A.

Stability

It seems difficult to buy a stable wireless router now. You may find many with reboot or drop line issues. In my earlier post, I have to use DD-WRT to replace original firmware on TP-Link TL-WR842ND or it freeze every few days.

Therefore, I decide to put test devices at work. Turn on in the morning and off before sleep. If there is any issue, I shall notice.

Asus RT-AC1200G+ Log

Asus RT-AC1200G+ is unstable until upgrading to RT-AC1200G+_9.0.0.4_382_10680-gc72d1c8.trx. There is no reboot for more than two weeks since 2017/6/1. Read the full story in Asus RT-AC1200G+ Random Reboots Automatically.

Edimax BR-6478AC V2 Log

Edimax BR-6478AC V2 has two issue during test period from 2017/6/17 to 2017/7/2. There is no reboot or drop line.

2017/6/19
  • 2.4GHz SSID is available but 5GHz is disappear.
  • Reset power doesn’t bring up 5GHz SSID.
  • Get a wire to connect and login to administration page successfully. 5GHz SSID is available again.
  • I have no clue for what happen and cannot reproduce this.
2017/6/21
  • Power on but no connection for about 2.5-hour.
  • 2.4GHz SSID is available but 5GHz is disappear.
  • Reset power doesn’t bring up 5GHz SSID.
  • Connect to 2.4GHz SSID and login to administration page successfully. 5GHz SSID is available again.
  • Wondering if this is related to MediaTek MT7612E. Looks like a power saving issue.

User Interface

Asus RT-AC1200G+ is More Friendly for 1-st Time Setup

Once turned on, I may connect to RT-AC1200G+ and change SSIDWPA2 passphrase, and administrator’s login password with Google Chrome.

With BR-6478AC V2, you need to explicitly specify http:// when using Chrome to browse 1st-time administration URL http://edimax.setup or it will be interpreted as https://edimax.setup as default. Apple Safari and FireFox doesn’t have this problem. IQ Setup wizard doesn’t change administrator’s login password.

Edimax BR-6478AC V2 is Powerful and Technical

To setup MAC filtering, RT-AC1200G+ provides [Wireless MAC Filter] tab in [Advanced Settings] → [Wireless]. You also get a small, replaceable icon to represent every device. In [General] → [Network Map], it’s very easy to identify.

With BR-6478AC V2, you need to setup in [Firewall] → [Access Control]. It may manage wired and wireless. On  user experience design, it’s another story. For example, to deny a connected device, first select from the middle Computer Name. Then click on the [<<] button before it to auto fill-in Client PC MAC Address on the left. It works in a different way.

Dynamic Traffic Monitor Graphic is Better than Refresh Yourself

RT-AC1200G+ displays current and history bandwidth in MB/s as a dynamic graphic. Easy to read and compare with history data.

BR-6478AC V2 summarize total packets in a table. There is no history data nor auto-refresh.

Reference

  1. Apple macOS Sierra
  2. Apple OS X
  3. Apple Safari
  4. Apple: Mac mini (Late 2012) – Technical Specifications
  5. Apple: Use Activity Monitor on your Mac
  6. Asus
  7. Asus RT-AC1200G+
  8. Asus RT-AC1200G+ Random Reboots Automatically
  9. Asus RT-AC51u
  10. Broadcom BCM53125
  11. Cisco Support Community: How to interpret 802.11ac datarates
  12. Datasheet: BCM57765
  13. DD-WRT
  14. DD-WRT for my TP-Link TL-WR842ND
  15. Edimax
  16. Edimax BR-6478AC V2
  17. FreeFileSync
  18. Google Chrome
  19. Intel Celeron Processor N3060
  20. iFixIt: Mac Mini Late 2012 Teardown
  21. Kingston SSDNow V+100 Datasheet
  22. Mozilla FireFox
  23. netis WF2190
  24. OSXDaily: Using the Purge Command in OS X Yosemite & OS X Mavericks
  25. Prepare Your NAS File Transfer Performance Test with Mac OSX Client
  26. QNAP TS-251A
  27. QNAP Virtualization Station
  28. QNAP QTS
  29. RealTek RTL8367RB
  30. Samba
  31. SANDISK EXTREME PRO SSD
  32. TP-Link TL-WR842ND
  33. Wiki: Apple Filing Protocol
  34. Wiki: Cache (computing)
  35. Wiki: Fast Ethernet
  36. Wiki: Gigabit Ethernet
  37. Wiki: IEEE 802.11a-1999
  38. Wiki: IEEE 802.11ac
  39. Wiki: IEEE 802.11b-1999
  40. Wiki: IEEE 802.11g-2003
  41. Wiki: IEEE 802.11n-2009
  42. Wiki: MAC address
  43. Wiki: MAC filtering
  44. Wiki: Network File System
  45. Wiki: Received signal strength indication
  46. Wiki: Service set (802.11 network)
  47. Wiki: URL
  48. Wiki: USB 3.0
  49. Wiki: User experience design
  50. Wiki: Wi-Fi Protected Access
  51. WikiDevi: ASUS RT-AC1200GP
  52. WikiDevi: Broadcom
  53. WikiDevi: Edimax BR-6478AC v2
  54. WikiDevi: MediaTek
  55. WikiDevi: Netis WF2190
  56. WikiDevi: Realtek

Filed under: Review Tagged: Wireless Device, Wireless Router

Initializing and Inviting Viewers on WordPress.com Private Sites

$
0
0

When I am implementing CRM projects, I always create a private site for internal marketing. It helps end users to find resource and feedback. Let me explain how to initialize a private site and invite viewers on WordPress.com in this post.

Make It Private

Here are my settings for a private site on WordPress.com:

  1. In [Settings] → [Reading], select [I would like my site to be private, visible only to myself and users I choose] in Site Visibility.
  2. In [Settings] → [Sharing], disable social media service except Email, SkyPE, and Print for internal sharing.

Although semantic URL is not necessary, I preferred to use it for easier understand links. It is always enabled in WordPress.com. While hosting WordPress myself, it’s available in [Settings] → [Permalinks].

For themes, I preferred RWD (responsive web design) which adapts to difference device resolution automatically. It’s for UX (user experience) more than SEO (search engine optimization) to me.

Invite Viewers

Private sites are only available to approved WordPress.com users. For those who access site URL directly, they need to have a WordPress.com account and request an invite.

To invite viewers, click on [Users] → [Invite New]. WordPress.com will ask for verification to access any settings within [Users]. I may verify by approving on WordPress.com Apps or provide a code generated by Authy which is a two-factor authentication app.

After being verified successfully, I put the emails in Usernames or Email Addresses and select [Viewer] in Role. [Viewer] is only available on private site. It’s different to [Follower] on public site. More explain on roles may be found in User Roles.

After sent out, I may track response and status in Past Invitations. For those who request invites won’t be seen here. You may Resend to re-invite or Delete to stop tracking.

Once being accepted, I will receive an email with subject “Amigo accepted your invitation to Amigo’s Tech Notes” which is “[to be invited user] accepted your invitation to [private site]”.

If you want to remove someone, you need to switch to the new administration interface by clicking [My Sites] on upper left cornet. It is not available in [WP Admin]. To see all users, click on [Configure] → [People]. Existing users are separated by upper role tabs. Find the one and use Remove to remove him.

Being Invited

He will receiver an email with subject “Amigo invited you to be a viewer of Amigo’s Tech Notes” which is  “[inviter] invited you to be a viewer of [private site]”.

Click on Accept Invitation button and login to WordPress.com to answer. If he doesn’t have a WordPress.com account yet, register at the same page is possible. Remember to click on [Confirm Now] button in verify email with subject “Activate Amigo” which is “Activate [registered WordPress.com user name]” once registered.

After login, it will prompt for confirm “Would you like to be able to view Amigo’s Tech Notes? As a viewer, you will be able to view the private site Amigo’s Tech Notes.” which is “Would you like to be able to view [private site]? As a viewer, you will be able to view the private site [private site].” Click Join to confirm.

Once confirmed, he will receive two emails with subject “You have been added!” and “You are now a viewer of: Amigo’s Tech Notes” which is “You are now a viewer of: [private site]”. Inviter receives “Amigo accepted your invitation to Amigo’s Tech Notes” which is  “[to be invited user] accepted your invitation to [private site]”.

Click on Visit Site in email to see this private site.

Reference

  1. Authy – Two-Factor Authentication App
  2. Wiki: Responsive web design
  3. Wiki: Search engine optimization
  4. Wiki: Semantic URL
  5. Wiki: User experience
  6. WordPress.com
  7. WordPress.com Apps
  8. WordPress.com: Permalinks Not Available?
  9. WordPress.com: Support: User Roles
  10. WordPress.com: Support: WordPress.com and WordPress.org
  11. WordPress.org: Codex: Using Permalinks

Filed under: How-To Tagged: WordPress

Study on Removing Unwanted Process Instance Node in Salesforce.com

$
0
0

In my salesforce.com org, Process Instance Node still occupy data storage after removing related objects and approval process. I have try several tools to delete unsuccessfully. Therefore, I keep a note and will update this post continuously until they are gone.

Data Loader Only for Standard and Customize Object

Salesforce Data Loader is used on bulk database operation (insert, update, upsert, delete, hard delete, export, and export all).

It could be download from Salesforce: Data Loader [Administration Setup] → [Data Management] → [Data Loader] and supports Windows and Mac.

Before login, I need to use [Personal Setup] → [My Personal Information] → [Reset My Security Token] to get my security token in an email with subject Your new Salesforce security token. Append it at the end of password while login.

Workbench See Full Objects

Salesforce Workbench is a web tool. Unlike Data Loader, it could be login with administration account without security token. Therefore, I may use Workbench Tools for Google Chrome and Workbench Tools for Firefox to transfer Salesforce session to Workbench.

Get Detail of ProcessInstanceNode Object

After login, I select Standard & Custom Objects in Jump to and ProcessInstanceNode in Object to see description. There is a deletable:false in Attributes folder. It means I don’t have delete permission.

For more objects, use menu [Info] → [Standard & Custom Objects].

Verify by Running SOQL Query

To verify this is the object which contains useless records, select [queries] → [SOQL Query] to generate following query and View as List.  Click [Query] button to execute.

SELECT CreatedDate,Id,IsDeleted,NodeStatus,ProcessNodeName FROM ProcessInstanceNode ORDER BY CreatedDate ASC NULLS FIRST

From query results, I am sure they are undeleted approval history because IsDeleted are false. Strangely, the returned record count is much more than  [Administration Setup] → [Data Management] → [Storage Usage] reports.

Delete a Record but Fail

When I move my mouse on Id field of a record, Update, Delete, Undelete, Purge, and View in Salesforce are available actions.

Update doesn’t provide IsDeleted to edit; Delete returns result Insufficient Access Rights On Object Id; View in Salesforce shows Insufficient Privileges. I follow the lead to read Insufficient Privileges Errors and check Object Settings and System Permissions on my profile but there is no related items.

Privilege is the Key

Although I found the right tool, there is still privilege issue. Still searching a solution to remove ProcessInstanceNode records.

Generate a Report on ProcessInstanceNode

Create a Custom Report Type for Approval History reminds me to create a custom report type before reporting on ProcessInstanceNode.

Use [App Setup] → [Create] → [Report Types] to create a new record type on  Process Instance as primary object. Select Process Instance Node in related object in step 2. How to clear ProcessInstanceNode records? on StackExchange Salesforce has an illustration on Process Data Model which explains Entity–relationship model of them.

Because I found no Process Instance record using Workbench, my reports shows nothing at all. It means my ProcessInstanceNode are not cascade deleted when deleting Process Instance.

Reference

  1. Chrome Web Store: Workbench Tools for Google Chrome
  2. Mozilla Add-ons: Workbench Tools for Firefox
  3. Salesforce: Data Loader
  4. Salesforce: Developer Documentation: ProcessInstance
  5. Salesforce: Developer Documentation: ProcessInstanceNode
  6. Salesforce: Documentation: Create a Custom Report Type for Approval History
  7. Salesforce: Documentation: Insufficient Privileges Errors
  8. Salesforce: Workbench
  9. StackExchange: Salesforce: How to clear ProcessInstanceNode records?
  10. Wiki: Entity–relationship model
  11. Wiki: Foreign key

Filed under: Information Tagged: Salesforce

Using Key Prefix to Identify Object Types in Salesforce.com

$
0
0

Salesforce.com keeps some useful information in URL. It could be used on redirecting page, identifying objects types, switching records, and etc.

Key Prefix of Standard Objects

There are two useful posts about key prefix of salesforce.com objects. They explain the URL structure and provide a list of standard object key prefix.

  1. Daniel Ballinger’s FishOfPrey.com: Obscure Salesforce object key prefixes
  2. Salesforce Hacker: A very little key [prefix] will open a very heavy door

Key Prefix of Custom Objects

For custom objects, it begins with ‘a01’, ‘a02’, and etc. I create two custom objects and add test records. After comparing URLs of each record to get this rule of my org.

A more reliable method is to use Salesforce Workbench. It helps exploring details of any objects. Use menu [Info] → [Standard & Custom Objects] to select. The object key prefix is keyPrefix in Attributes folder.

Use Formula Field to Identify Object Type

With key prefix, I may add a formula field to categorized the object type of Name field in Activity object.

IF( LEFT( WhoId,3) == "003", "Contact", IF(LEFT(WhoId, 3) == "00Q", "Lead", NULL))

For object type of Related to field in Activity object, here is a sample to identify Opportunity and Account objects:

IF( LEFT(WhatId,3) == "006", "Opportunity", IF(LEFT(WhatId, 3) == "001", "Account", "Undefined"))

 

 

Reference

  1. Daniel Ballinger’s FishOfPrey.com: Obscure Salesforce object key prefixes
  2. Salesforce Hacker: A very little key [prefix] will open a very heavy door
  3. Salesforce: Workbench

Filed under: How-To Tagged: Salesforce

Install and Upgrade vTiger 6.5 to 7.0

$
0
0

TurnKey GNU/Linux: vTiger CRM stable version 14.2 helps to quickly setup a virtual machine running vTiger 6.5. I decide to upgrade to the latest 7.0.

Upgrade from 6.5 to 7.0

Get the File and Unzip

Migration Software (6.5.0 to 7.0.1) file can be download from vTiger: Download Vtiger 7 Open Source.

On OSX, I use Cyberduck and sftp to upload vtigercrm-650-700-patch.zip to /var/www/vtigercrm. Unzip to /var/www/vtigercrm/migrate

root@vtiger www/vtigercrm# unzip vtigercrm-650-700-patch.zip

Change Permission

In [Webmin] → [System] → [Running Processes], it shows apache is running as www-data. Therefore, I use ssh to login to command line and change owner of /var/www/vtigercrm from root:root to www-data:www-data to grant apache to run extract command.

root@vtiger /var/www# chown -R www-data:www-data vtigercrm

Migration

Now, I am ready to run Migration Wizard on https://%5BvTiger IP]/migrate. It  asks my administrator account and password twice. First is on the Migration Wizard page. Then is a vTiger 6.5 login page. In other words, you have to login twice.

I got error message during migration:

Warning: strtolower() expects parameter 1 to be string, array given in /var/www/vtigercrm/vtlib/Vtiger/Functions.php on line 1323

Warning: strtolower() expects parameter 1 to be string, array given in /var/www/vtigercrm/vtlib/Vtiger/Functions.php on line 1323

Restore Permission Brings Trouble

vTiger doesn’t work properly when I restore permission to root:root. I cannot create new leads. Empty screen when click on Related To. It becomes unstable and unpredictable. I have to change back to www-data:www-data to make it work again.

Install vTiger CRM 7.0

Remove vTiger

I decide to remove vTiger from this VM and install from scratch. First, I drop vtiger table using [Servers] → [MySQL Database Server]. Next is to remove /var/www/vtigercrm completely.

Install vTiger 7

Again, I get Source (Mac,Windows,*nix) which is a vtigercrm7.0.1.tar.gz file from vTiger: Download Vtiger 7 Open Source. Use Cyberduck and sftp to upload vtigercrm7.0.1.tar.gz to /var/www. Run following command to extract to /var/www/vtigercrm. Default permission is root:root.

root@vtiger /var/www# tar -xzvf vtigercrm7.0.1.tar.gz

Change Permission

Again, I have to change permission to www-data:www-data or it displays error:

Warning: mkdir(): Permission denied in /var/www/vtigercrm/includes/runtime/Viewer.php on line 58

Warning: mkdir(): Permission denied in /var/www/vtigercrm/includes/runtime/Viewer.php on line 58

After initial setup, I may finally login and test vTiger  7.0.

Reference

  1. Cyberduck
  2. How-To Geek: How to Compress and Extract Files Using the tar Command on Linux
  3. TurnKey GNU/Linux: vTiger CRM
  4. vTiger #1 Open Source CRM Software
  5. vTiger: Administration Guide: Migration
  6. vTiger: Download Vtiger 7 Open Source
  7. Wiki: Secure Shell
  8. Wiki: SFTP

Filed under: How-To Tagged: vtiger

Remove Object ReordType in Chatter Free and Moderator User

$
0
0

To remove record type in Chatter Free and Chatter Moderate User, it’s not that straight forward because there is no Object Settings in Profile Overview. You need to hack URL.

Use this format to generate a URL to access Object Settings in a profile:

https://[your org].salesforce.com/setup/ui/profilerecordtypeedit.jsp?id=[Profile ID]&tid=[Object TID]&pn=[Profile name and use "+" to replace blank]

Get Profile ID

When you click on a profile, Profile ID can be found on URL.

For example, when click on Chatter Moderator User profile, the URL is:

https://ap21.salesforce.com/00e90000000pbIg

The Profile ID for Chatter Moderator User is 00e90000000pbIg

Get Object TID

When you click on a Custom Objects, Object TID can be found on URL.

For example, when click on Incident custom object, the URL is:

https://ap21.salesforce.com/01I90000001hqqQ?setupid=CustomObjects

The Object TID for Incident is 01I90000001hppQ

For standard objects, use the name of the object instead e.g. Account.

Generate URL

To access Chatter Moderator User‘s Incident object setting, use:

https://ap21.salesforce.com/setup/ui/profilerecordtypeedit.jsp?id=00e90000000pbIg&tid=01I90000001hqqQ&pn=Chatter+Moderator+User

Replace Chatter+Moderator+User with Chatter+Free+User if the profile is Chatter Free User.

Reference

  1. Salesforce: can’t deactivate a record type
  2. Salesforce: Enable deleting default record types (without a call to Salesforce)
  3. Salesforce: Problem to delete record type.

Filed under: How-To Tagged: Salesforce

Salesforce Data Loader and Workbench.Developerforce.com: My Missing Manual

$
0
0

I need to work with many non-English letters and encounter some issues with Data Loader and Workbench from Salesforce.com. Therefore, I create this post to keep related notes.

Using Data Loader

When download data from Salesforce.com using Data Loader, be sure to enable UTF-8 options or all UTF-8 characters becomes question marks except English letters.

From [Settings] → [Settings], enable both following UTF-8 options:

  1. Read all CSVs with UTF-8 encoding
  2. Write all CSVs with UTF-8 encoding

Using Workbench.Developerforce.com

When download data from Salesforce.com using Workbench with Bulk CSV option, it is encoded in UTF-8.

Don’t Use Excel to Edit

When you export to CSV from Excel, all UTF-8 characters becomes question marks except English letters. There is no option to export to UTF-8 in non-English Excel.

Process with Google Sheet

I use Google Sheet to process and download as CSV. Everything seems fine.

Issue with Google Sheet CSV

I do encounter issue while using Google Sheet to export to CSV once. The tip is to use Notepad++ to change Encoding to Encode in UTF-8-BOM and save. Then use Data Loader again to process without any problems.

CSV Error for Numbers of Columns and Header Not Match

While uploading a CSV file, I saw an error message like: The number of data columns (x) exceeds the number of columns in the header (y). I have check several times and found there is nothing wrong with my CSV.

Finally, I read Apex Data Loader Error: Number of Data Columns exceeds… and realize that I may only select only one of the two when there is empty spaces in data:

  1. Allow comma as a CSV delimiter
  2. Allow Tab as a CSV delimiter

Reference

  1. Notepad++
  2. Salesforce: Apex Data Loader Error: Number of Data Columns exceeds…
  3. Salesforce: Data Loader
  4. Salesforce: Workbench
  5. Salesforce Stack Exchange: Difference between data loader and workbench

Filed under: Information Tagged: Salesforce

Create Custom Visualforce Page to Replace Default

$
0
0

I want to customize an object making certain fields only available while creating. After creation, you need to click on a button to edit or view hidden data. Therefore, customized edit and view Visualforce pages.

Page Design

I create two different pages for edit and view. Most fields in edit is apex:inputField while view is apex:outputField.

For apex:inputText, use size to define length of visible width whil apex:inputTextarea, use cols and rows to define width and height. It helps to make the layout easier to read. Below are partial example:

<apex:inputText maxlength="255" size="75" value="{!amigoIncident__c.Links__c}" />
<apex:inputTextArea cols="75" rows="7" value="{!amigoIncident__c.Memo__c}" />

For interactive design, enable Development Mode in [Personal Setup] → [My Personal Information] → [Personal Information] page. When you are browsing Visualforce Page, use the horizontal bar with X icon on lower page to view source code and design on the same page.

A sample Visualforce page includes button and related list:

<apex:page standardController="amigoIncident__c">
  <apex:form>
    <apex:pageBlock title="Incident Detail" mode="maindetail">
      <apex:pageBlockButtons >
        <apex:commandButton action="{!edit}" value="Edit">
      </apex:pageBlockButtons>
      <apex:pageBlockSection showHeader="false" columns="2" collapsible="false">
        <apex:outputField value="{!amigoIncident__c.Name}">
        &nbsp;
      </apex:pageBlockSection>
      <apex:pageBlockSection showHeader="false" columns="1" collapsible="false">
        <apex:outputText value="{!amigoIncident__c.Memo__c}">
      </apex:pageBlockSection>
      <apex:pageBlockSection showHeader="true" title="System Info" columns="1">
        <apex:outputText value="{!amigoIncident__c.CreatedDate}">
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
  <apex:relatedList subject="{!amigoIncident__c}" list="Histories" />
</apex:page>

Add a Related List to a Custom Object

In the apex:relatedList example, it doesn’t use subject to specify parent record. For some related list like OpenActivities, it works. But ActivityHistories doesn’t work as describe in VisualForce Activities / Histories List, I have to specify the custom controller.

The parent record from which the data and related list definition are derived. If not specified, and if using a standard controller, this value is automatically set to the value of the ID query string parameter in the page URL.

Partial code to add related list in custom object amigoIncident as below:

<apex:relatedList subject="{!amigoIncident__c}" list="OpenActivities" />
<apex:relatedList subject="{!amigoIncident__c}" list="ActivityHistories" />
<apex:relatedList subject="{!amigoIncident__c}" list="childRole__r" />
<apex:relatedList subject="{!amigoIncident__c}" list="Histories" />

childRole is the Child Relationship Name of a lookup field Incident related to Incident object in customized object Roles. Add __r as explained in not a valid child relationship name for entity Account to access from related object.

Stop Rendering

Because I have design several profiles with different object permission, I got error message when apply the same Visualforce page until I found Hide relatedList if no permissions and Restricting visualforce Page view between profiles. I may use condition rendering in apex:relatedList with rendered=”{!IF($Profile.Name ==’Platform Administrator’, True, False)}” to prevent permission error.

Visualpage Security

Before make it available to others, set security in [App Setup] → [Develop] → [Visualforce Pages] to enable on profiles.

Page Design and Assignment

In Buttons, Links, and Actions of custom object, choose custom Visualforce Page in Override With to replace default.

 

Reference

  1. Salesforce: An Introduction to Visualforce
  2. Salesforce: apex:inputField
  3. Salesforce: apex:inputText
  4. Salesforce: apex:inputTextarea
  5. Salesforce: apex:outputField
  6. Salesforce: apex:relatedList
  7. Salesforce: Hide relatedList if no permissions
  8. Salesforce: not a valid child relationship name for entity Account
  9. Salesforce: Restricting visualforce Page view between profiles
  10. Salesforce: VisualForce Activities / Histories List

Filed under: How-To Tagged: Salesforce, Visualforce

Line-breaks in Visualforce Page and Salesforce1

$
0
0

I have a filed contains long text in Salesforce.com. When I use “\n” to move some to next line, it just display an empty space.

If I use “<br>”, it works with outputText with escape=”false” but suffer from scripting-attacks according to VisualForce: convert carriage returns to html line-breaks in a long text field. This doesn’t work for Salesforce1 because “<br>” is displayed without line breaks.

Line breaks and consecutive spaces in outputText are removed on postback and Laurent Stanevich suggests to use outputField replacing outputText. It works in my case on both browser and Salesforce1.

Reference

  1. GooglePlay: Salesforce1
  2. Salesforce: apex:outputField
  3. Salesforce: apex:outputText
  4. Salesforce: Line breaks and consecutive spaces in outputText are removed on postback
  5. Salesforce Stack Exchange: I don’t know why ‘\n’ new line is not working
  6. StackOverflow: Difference between \n and \r?
  7. StackOverflow: VisualForce: convert carriage returns to html line-breaks in a long text field

Filed under: How-To Tagged: Salesforce, Visualforce
Viewing all 122 articles
Browse latest View live