Wednesday, April 05, 2017

removing malware/adware from Intex phone - deux

My earlier post about removing adware and malware from the Intex phone was too optimistic. The pop-ups asking to install UC Browser and so on had not stopped. So, I tried to delete files which I thought were causing the issue, by directly deleting files from /System/Apps. But then, when I tried to reboot the phone, it went into a loop, saying "Optimizing apps 1 of 72" or something like that, and would not start. So the phone was soft-bricked.

I thought it would be a good idea to reflash the firmware and use Root Uninstaller or some such tool instead. But after flashing using SP Tool, found that the phone was hard bricked. Hard-bricked meaning that the phone would not charge, would not go into recovery mode if switched on with volume down also.

After initial attempts to get it fixed by the local mobile repair guy - "Please try the Intex service centre" - and service centre - "Please bring the item, we will look at it and then tell you how much it will cost" - explored the ways to get it back to working condition. And found this guide. Warning - that page is not safe to open without an ad-blocker, and perhaps even with an ad-blocker!

So, the basic idea is - install the correct drivers, remove the battery, flash the boot loader first, then flash the rest of the firmware.

As mentioned on that page, the issue seemed to be wrong firmware. I thought I would install the latest firmware by using Intex_Aqua_4G_Strong_V06_Indian_SER_20160408-150449 but apparently my phone only accepts Intex_Aqua_4G_Strong_V03_1_8_Indian_SER_20160622_MT6735M

Another issue was that the driver was not installed properly on my WinXP machine. Installed the VCOM drivers properly on a Win7 machine, and then the firmware update went smoothly. Then uninstalled lots of bloatware, malware and adware, using Root Uninstaller which keeps a backup of the uninstalled apk, rebooting after every doubtful uninstall. Now at last the phone seems to be clean.

Some points which I noted were:

  • Kingroot seems to need a SIM installed in the phone to root.
  • Malwarebytes might be interfering in Kingroot's process, so I uninstalled it before trying to root again.
  • Also, prevented the screen from going to sleep. Not sure if this is important, though. 
  • Unfortunately I did not note down the names of the apps I removed. Everything with Intex in the name, also App Age Helper or something like that, and the three which malwarebytes pointed out. 
Edit - One issue remained. Resolved in this post

Monday, April 03, 2017

pkg install on octave

Octave has many Matlab compatible packages, but they need to be installed and loaded using
pkg Load pkgname
and similarly
pkg unLoad pkgname
This actually adds it to octave's path.

But before that, the packages have to be installed. On my Mint Linux 18 install, had install liboctave-dev first using apt-get and then inside octave,
pkg install -forge -verbose signal
pkg install -forge -verbose control
etc.


Saturday, April 01, 2017

line ending issue for Linux bash script - bad interpreter

Faced the issue of

/bin/bash^M: bad interpreter: No such file or directory

on Linux Mint, for a copy-pasted file from Windows. I knew that this was most probably due to a CR-Linefeed issue. The default text editor, xed, did not seem to fix it. Finally, as this page suggested, used
:set ff=unix
in vim and then saved the file with :wq - solved.

Edited: 1st April 2017 - :set ff=dos is for Windows style CR/LF .... 

Thursday, March 30, 2017

octave idiosyncracy

While operating a loop in GNU Octave, I wanted a counter to be displayed. In the script, this needed
disp(k);
fflush(stdout);

before other statements, and in the Octave command window,
more off;
to turn paging off.

Friday, March 17, 2017

dcraw speeds

It would be useful to be able to edit the dcraw code to make it convert only a region of interest - conversion times are quite long.

On Windows 8, running on an i7, 7.8 sec per image for 14 megapixel CR2 file from a Canon 1100D.
On Macbook i7 with Linux Mint 18, 4.4sec
On Windows XP, running on a 1.9 GHz Athlon, 12 sec.

Converted using
dcraw -v -4 -H 0 -W -w -q 3 -T

Sunday, March 12, 2017

removing adware from Intex Aqua 4G Strong mobile phone

The Intex Aqua 4G Strong mobile phone running Android 5.1 which I had purchased to try out Reliance Jio had annoying adware and bloatware in the firmware. I uninstalled as many as I could, but some of them could not be uninstalled. I tried preventing notifications from them by long press on the notification to pull up the app's notification settings, and unchecking notifications from those apps. But still, on every restart, some app would try to install UCNews etc from outside Google Play store, and would be blocked by the security setting to Not Allow Apps from outside the Play store.

Finally thought I should get rid of this malware / adware.


  1. Installed and ran Malwarebytes Anti-Malware app.
  2. It identified the Malware as two apps, with the path to the apks being in the /system/ folder.
  3. Since the apps were masquerading as System apps, they could not be uninstalled except as Root. So, installed Kingroot via the XDA developers forum to root the device. 
  4. Ran Root Checker Basic to check for root - done. 
  5. Installed Root Browser.
  6. When running Root Browser, it asks if it can install some utilities. Said yes, it installed busybox tools. These are necessary to remount the volume as rw, and remove from system folder.
  7. Navigated to /system/apps and removed the folders containing malware.
  8. Ran Malwarebytes again to check that those were removed.
  9. Removed Kingroot through its uninstall option.
  10. Checked that root is now disabled.
  11. Removed Root Checker.
  12. Checked again with Malwarebytes that all is well. Done. 
Edit - this saga continues in another post here

Monday, February 20, 2017

GPT partition - issues with re-partitioning new hard disk

http://knowledge.seagate.com/articles/en_US/FAQ/207837en?language=en_US

described my issues with partitioning a new hard disk. Solution, as given there, was to use the command prompt,
diskpart
list disk
select disk
clean
exit

and then initialize the disk with Disk Management. 

Monday, February 13, 2017

configuring a DLink DCS-942L camera

In May, I had struggled with port-forwarding, virtual server on router etc while setting up a DLink DCS-942L home network camera. Now, re-configuring it to use a JioFi 4G router, just had to remove the static ip using the Windows setup wizard, then WPS to connect to the wifi network, and that was it. No manual port-forwarding was needed. 

Thursday, February 09, 2017

some notes on download speeds

There was a planetarium show which was offered for a free download as a single 150 GB file from an FTP server. Some notes on my experience trying to download it.

I tested the download and found that FTP download is limited to 1 Mbps for us per connection over Tata internet 14 Mbps line.

With CuteFTP, max 4 connections = 4 Mbps.

With our server in the US, single connection on 1 Gbps line to backbone, 80 Mbps.

Downloading from our US server to Studio / Planetarium over SFTP - 8 Mbps, maybe will go up to the rated 14 Mbps at night.

So, if similar speeds are experienced, probably the best way would be to download to our US server, and then download to Studio/Planetarium in batches.

Tuesday, February 07, 2017

ode45 on octave

Trying the gnlse numerical solution for SCG from the Dudley book using GNU Octave - the Matlab clone. The Octave "port" needed some modifications.

  1. The report function doesn't work properly, so probably can be omitted. Instead of outputting a percentage for every step, it outputs at the end. Maybe it is a difference in the flags returned by the ode45 function.
  2. Had to add 'InitialStep', 0.001 to the odeset parameters - or else the error becomes too large and ode45 exits.
  3. Instead of Z which was linspace(0, flength, nsaves), gave [0, flength] as the parameter to ode45 - or else the ode45 in Octave ignores RelTol and AbsTol. 
  4. Then, spline to create a linearly spaced array of our desired spacing.
So, instead of 
[Z, AW]=ode45( @rhs, Z, ifft(A), options .... etc
called it as
[Zoctave, AWoctave]=ode45( @rhs, [0, flength], ifft(A), options .... etc
and then
Z     = linspace(0,flength, nsaves);
AW = spline(Zoctave, AWoctave,Z);


Then, running time - 

Octave modified ugnlse = 166 sec on i7
Matlab  = 281 sec on Athlon

Since python code got 9x speedup on the i7, I guess the Octave ode45 + spline is slower than the Matlab ode45. Still, running on the i7 gets the advantage of more RAM. Doesn't give the out of memory error so easily. 

Monday, February 06, 2017

pynlo on Linux Mint running on i7 Macbook Pro 4GB

Got a Macbook for doing some tests, computations etc.
OS X Snow Leopard 10.6.8
Intel Core i7
2.66 GHz
2 cores
4GB RAM

Made it dual boot with Linux Mint 18.1 Cinnamon using rEFInd, installed Anaconda 2.7 for pyNLO.

Anaconda installed with no issues. But pip install needed
apt-get install python-pip
apt-get install python-setuptools
apt-get install python-dev

pip install pyfftw
gave permission errors, so did
pip install pyfftw --user
needed
apt-get install libfftw3-dev

python SCG.py did not work - no module named matplotlib
pip install matplotlib --user

Then needed
apt-get install python-tk

Finally working. But colours were different in the pcolor plot.

Changed colormap of pcolor using
cmap=plt.get_cmap('viridis') inside pcolor function call.

On my Athlon 32 bit Windows XP laptop - SCG-Head-sc.py - runs for 15:33 = 933 sec and Mem Error
On the i7 - the same script runs for 1:42 = 102 sec, no Mem Error

So, more than 9x faster.


Sunday, February 05, 2017

status page from uptimerobot

Uptimerobot.com have created status pages now, which can be made public also. Our status page is at
radiosai.org/status

Had to make the custom url a redirect, could not make it a subdomain, since Cloudflare complained that two separate accounts cannot CNAME each other. 

Tuesday, January 31, 2017

trying vlc-warp build and other warping on Macbook

The vlc-warp code, when directly tried a build on Linux Mint 18.1 running on an i7 Macbook Pro, gave the error that
configure: error: libavcodec versions 56 and later are not supported yet.
http://stackoverflow.com/questions/18559322/configure-error-libavcodec-versions-55-and-later-are-not-s

When compiling on a Live DVD of Ubuntu 12.04, compiles OK. But that build will not run on the Linux Mint 18.1 with accelerated graphics. And the Live DVD will not boot with accelerated graphics! So, as of now, am pausing these efforts.

Trying the recommended way to compile on Mac OS - that needs the latest version of Xcode, and our Mac is running 10.8 Snow Leopard.

Tried the Quartz Composer patch from Paul Bourke - that also had some version compatibility issues, I guess, did not work on first few attempts.

Then directly tried the compiled warp-player from Paul Bourke - that itself was skipping frames when trying to warp and play a 50 Mbps 2K fulldome movie. So, pausing these efforts to make a realtime warping player work on this machine. 

Monday, January 30, 2017

Airtel SIM language selection loop

An occasional problem with Xiaomi Mi3 phone - Airtel sim language selection menu comes up again and again - seen for example after a change of SIM.

Solution seems to be to shut down the phone and start it again.

problem logging on to Nettigritty phpMyAdmin - likely cyberoam issue

PB reported, "I am not able to access phpMyAdmin through Nettigritty Plesk. Any specific steps I need to do to get access to it?"

hn: "What happens when you click on the databases tab on the left, and then on phpmyadmin?"

PB: "Had tried this. It does not give access to phpMyAdmin page. It takes me to the login prompt.
Tested this on Firefox 43.0.4 and Safari 9.0.3"

hn: "If you are in "incognito mode" or something like that, the authentication may not work? It is working fine for me. Or it may be some javascript problem? Maybe try after clearing cache? or is it a cyberoam caching issue?"

PB: "It worked on my home computer. So cyberoam could be the cause of this issue."



Wednesday, January 25, 2017

Fisheye to Equirectangular

Jason Fletcher has a post about converting footage from Fisheye to Equirectangular in After Effects. Similar to my Photoshop conversions to fisheye, but the other way around. Would be a useful reference for my conversions - by seeing where the images appear.

Wednesday, January 04, 2017

Airtel 3G speeds

To add to my Jio speed test posts, here are Airtel 3G speeds 3-4 pm at Puttaparthi - the times are visible in the top left corner. Not too shabby :) and definitely better than Jio during peak times.




And, a few days ago at 8.15 pm, with Airtel dongle,




Monday, January 02, 2017

offline fulldome option on Macbook pro - Gaia Sky

Since I had trouble compiling Stellarium360 to run on the Macbook Pro I have got as a loaner, tried out other options - Gaia Sky has a planetarium mode. But fisheye only, no support for mirror-dome. At high resolutions, my machine is unable to keep up refresh rates with Gaia Sky. But it could be used for offline rendering.

stellarium360 on Linux Mint 18.1

Linux Mint 18.1 Cinnamon works fine, dual booting with Mac OS 10.6.8 Snow Leopard, on an i7 Macbook Pro. Mageia Linux, the recommended option for Stellarium360, blanks the screen and / or crashes the system while trying to boot. So, tried compiling Stellarium360 on Linux Mint 18.1. But ran into problems.

ran the install dependencies for Ubuntu script, and ran ./configure. Configure complains that
checking for SDL2/SDL_image.h... yes
checking GL/glew.h usability... yes
checking GL/glew.h presence... yes
checking for GL/glew.h... yes
checking for ptrdiff_t... yes
checking for GraphicsMagick++-config... yes
checking for sdl2-config... yes
checking whether byte ordering is bigendian... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... no
checking for fabs in -lm... no
math library not found
checking for Mix_OpenAudio in -lSDL2_mixer... no
configure: error: *** SDL2_mixer library not found -  ***

But
libsdl2-mixer-dev is already the newest version (2.0.1+dfsg1-1).

I believe this has something to do with changing
-lSDL2_mixer to -lSDL2 or something like that at some point in the configure script, because the API call MixOpenAudio has shifted from one header to another or something? Not sure, just a guess.

But meanwhile, I thought Stellarium360 would work with spherical mirror systems also. Since it won't, then I will pause and rethink my efforts :)

Wednesday, December 28, 2016

setting up SPF and DKIM with CPanel and WHM

CPanel and WHM make the process of setting up SPF and DKIM fairly straightforward.

To open the CPanel of a particular user from WHM, typing Account in the top left search box shows "List Accounts" - Home -> Account Information -> List Accounts. There, clicking on the CPanel icon opens up CPanel for that user account.

Within CPanel of the relevant domain, typing DKIM brings up the required link - Home -> Email -> Authentication

A single click on that page enables or disables DKIM and or SPF.

(Actually I had run the certificate creation etc using scripts under cpanel running as root user and so on, but most probably all that was not necessary.) 

Wednesday, December 14, 2016

problem with BuTT overwriting recordings

I had entered the wildcard for index as filename%n - but then BuTT was saving a file called filename%n.mp3 and was prompting to overwrite old recordings. 

The correct wildcard for index is %i - and for timestamp, it is %H%M%S - have now changed to %i as given at
http://butt.sourceforge.net/manual.html

Tuesday, December 13, 2016

raw 14-bit images with Canon 1100D

According to wikipedia, our Canon EOS 1100D camera is capable of saving to RAW 14 bit CR2 format!
To convert linearly,

http://www.mit.edu/~kimo/blog/linear.html
suggests dcraw with the following commandline - 

dcraw -v -4 -H 0 -W -w -q 3 file.nef

below is a command which can be saved as a batch file (filename.bat) which works on Windows XP for linear conversion to tiff, for all files in the folder. Tested working on Windows 8.1 also. 

for /r %%i in (*.CR2) do dcraw -v -4 -H 0 -W -w -q 3 -T %%~nxi

A similar shell script on Linux / Mac would have the following form, adapted from
http://www.tuxradar.com/answers/484

for f in ~/path/*.CR2
do
dcraw -v -4 -H 0 -W -w -q 3 -T "$f"
done  

The -T makes dcraw output a TIFF file instead of the default Portable Pixmap PPM file. 

Sunday, December 11, 2016

upgrade to live broadcast system

After five years, the live audio broadcast method at mandir has changed. There were a couple of unexplained random shutdowns of the Macbook Pro, so PB decided to upgrade hardware and software. Current setup uses physical cables instead of JackOSX, and upgraded versions of Reaper and BuTT on a Mac mini running Mac OS Yosemite. Compressor is also hardware - our trusty Behringer MDX2200. Settings were adjusted for fast attack and slow release (1.5 sec). Lots of gain to compensate the compression. Level set to +4dBu and not -10 dBV.


Sunday, November 13, 2016

Issues when using Google Docs fonts for Malayalam

When entering Malayalam text with Google docs, Firefox on Windows XP, one cannot choose the font - only one font seems to be available. This font also had issues like showing

instead of
and so on.

So, I used MS Word and the Rachana font instead, which looks good. But this has an issue - chillaksharams are automatically joined to the next letter whenever we save and re-open the document - like
à´®ാà´°്‍à´—്à´—à´¤്à´¤ിà´²്‍_à´—്രഹങ്ങള്‍_സഞ്à´šà´°ിà´•്à´•ുà´¨്നതും becomes à´®ാà´°്‍à´—്à´—à´¤്à´¤ിà´²്‍à´—്രഹങ്ങള്‍സഞ്à´šà´°ിà´•്à´•ുà´¨്നതും

My workaround was to add the character _ after each such letter, and finally, using the Find and Replace tool, change the font colour for this _ character to white, so that it is not visible.

This issue with web fonts seems to be well documented. Following the advice on the comments on that page, I installed Meera and other fonts given at https://smc.org.in/fonts/
After a restart, now I see à´ª്à´°à´•ാà´¶ം - rendered as
Meera seems to have now become the default on Google Docs and Blogger on Firefox / Chrome, replacing the buggy Windows default Karthika. Now, probably, I can directly write with Google Docs instead. 

Friday, November 04, 2016

How to edit a Hindi document in Google Docs

Copy-pasting from an email sent to one of our collaborators:

I assume that you are using Google docs on a desktop computer. Then, when you click on the links I sent, Google Docs will open up. In the toolbar of google docs, please choose the "Select Input" button, which may be showing a Hindi A letter, as shown in the screenshot below.


Unless you know Hindi typing, the Devanagari phonetic option is the easiest to use. If you choose that option, if you type padaarth, it will give a list of options, and just pressing the spacebar will choose the topmost option, which would be पदार्थ
In case your window is too small, you may need to click twice in order to get to the Select Input button, as shown in the screenshot below - first click on More... and then on the Select Input button. 


Friday, October 28, 2016

Some speed tests and battery info

To add to my previous post on Jio 4G. The speed tests are taken at different times of the day, time can be seen at top right.

 











But the speed tests done with servers outside India shows that Jio's gateways are congested.
versus a server from the US,

The same test, when done with a BSNL broadband connection limited to 1 Mbps gave the following - 
and

And now a trend line showed by the battery app on the Intex Aqua, when left on as a wifi hotspot, wifi sharing enabled, but without much usage - 






Edit - One more post about Airtel speeds done on 4th Jan 2017. 




Saturday, October 15, 2016

Friday, October 14, 2016

USB tethering Android phone using Windows XP

During my Jio trials, I wanted to try both wifi tethering, which is easy but drinks battery, as well as USB tethering. On Windows 7, simply enabling USB tethering on the phone Settings -> More -> Tethering and wifi hotspot -> USB tethering was sufficient - the OS recognised the connection and got IP addresses by DHCP etc.

On one Windows XP machine, I found that the same procedure worked, with the phone being recognised as a Windows mobile internet sharing device, since I had earlier installed drivers for an old Windows mobile phone on this computer. Full USB2 speeds listed - "Connected at 475 Mbps". Actual download speed was about 3 Mbps when I tested on Jio.

On another Windows XP computer, the windows mobile driver had not been installed, and installing the inf file as given at
https://support.google.com/nexus/answer/2812516?hl=en
did not help. Windows did not recognise the driver as being suitable for this device.

Tried installing a driver from Intex, the manufacturer of the phone, from
http://www.intex.in/Resources/Index
but that also did not help. 

Thursday, October 13, 2016

Reliance Jio notes - pros and cons - mini review

Since my Xiaomi phone was showing some problems due to a crack on the screen and a dunking in water, I thought I would get a backup phone. And with 4G support in order to use the Reliance Jio welcome offer of free sim + free data + free calls upto 31 December. Got the cheapest 4G phone advertised with VoLTE - Intex Aqua 4G Strong.


Got a barcode by entering my Aadhaar number into the MyJio app, got a free SIM in ten minutes from a nearby shop, got thumb-print scanner verification done there itself. Though the dealer said the network would start working in another hour, it took another 6 hours or so, until at night the data connection on the SIM started working - activated.

Incoming and outgoing calls were not happening. Tried installing Jio4GVoice app to make outgoing calls over VoLTE - outgoing calls started going through. But not incoming calls. After 4-5 days, incoming calls from other Jio numbers started to work. Perhaps incoming calls from other networks would also work after a few more days. Solution suggested by Jio dealer was to install JioChat app - not sure how that would help. 

Battery life of this phone is not stellar, as the reviews suggest. But for Rs. 3500, no complaints in using this as a backup phone. Just on 4G standby, battery drains in 10 hours or so. Tethering via USB or wifi also drains battery quite fast, though USB tethering also charges the battery. 

As this indiatoday post indicates, there are many issues with Jio. The reliability issues are so much that anyone who needs a phone to work all the time must have another number from another provider. Interconnect issues apart, even Jio to Jio calls have problems due to people going offline - though this is probably due to their using other network options instead of Jio. Can use it as a free toy till Dec 31, that would be my policy.

Speeds - apparently Jiofi devices have greater speeds than sims put inside mobile phones. I generally get around 5 Mbps, with speeds dropping to 1 Mbps in the evenings. Early morning peak speed of 15 Mbps. Torrents are probably throttled - we got around 2 Mbps over a half hour test run. Also, the speeds are limited after 4 GB per day (as of now) as shown in the MyJio app below.



      

With Jiofi device, as tested by my colleague V, has gone upto 50 Mbps also,


In general, the DNS services on Jio are bad - changing to Google public DNS immediately improved browsing responsivity. Streaming videos are generally good - HD streaming on the JioTV app and on YouTube. On Vimeo, sometimes spotty, sometimes OK.

Edit: One week post-activation also no incoming calls. So, called up customer care at 199. Spent around 20 minutes on hold before a polite agent picked up. Apologetically gave me separate complaint numbers for voice and sms not being received, giving a 48 hour resolution time. Got a truncated sms from Jio tech support during the 48 hours. Finally, around 3 days later, incoming calls started working. 



Monday, October 10, 2016

email ids for a new domain

Similar to my earlier posts, copy-pasting from an email I sent:

Google Apps for domains (now called GSuite) no longer has the free option for new customers.
https://support.google.com/a/answer/2855120?hl=en
"As of December 6, 2012, Google stopped offering Free edition to new customers. If you already had the Free edition, you can continue using it for free"

 Microsoft Live email  has also stopped new registrations for free domain support -
http://www.zdnet.com/article/microsoft-ends-support-for-custom-domains-in-free-email-service/

Zoho offers free for upto 10 users only,
https://www.zoho.com/mail/help/email-hosting-with-zoho.html

There are many paid options, I could discuss them with you if you are interested. And for the extremely tech savvy, you can also run your own mail server. Initially when we started with our domain's emails, we used to forward the emails to gmail from our own mail server. But that is a lot of hassle.

If you want Google GSuite free, an option would be to get the educational version, which remains free. But that has terms and conditions.
https://support.google.com/a/answer/2856827?hl=en

Sunday, September 25, 2016

formatting bold lines in MS Word table

Needed a specifically formatted table with some bold lines and some lines without bold face. Did the bold lines as per
http://superuser.com/questions/276778/how-to-adjust-the-thickness-of-some-lines-in-a-word-table

That is,
"Under Table Tools/Design menu, go to Draw Borders and adjust the line values to your preference. Then click on Draw Table and a pencil icon will appear. Click on any line and voila! The line is now set to your liking."

Wednesday, September 21, 2016

speed comparison - Matlab vs C vs python vs perl

I had found C code to be around 150x faster than Matlab for my implementation of the Monte Carlo code in Matlab.

User time:        3 sec for the C program
elapsed_time =  453.2500 sec  for the Matlab program

This stackoverfloe discussion has some interesting points to make - use Matlab first to get correct results, then increase speed with C, beware of errors in C libraries.

These benchmarks show python to be 3x to 100x slower than C - so, translating from Matlab to python in search of speed gains may not make sense.

These benchmarks show perl having similar speeds as python for loops - so I needn't explore perl, either.

Friday, September 16, 2016

miui permissions

On the Xiaomi Mi3 phone which runs the MIUI skin for Android, the method for setting permissions for apps is slightly different from the method for stock Android phones. The method for MIUI is via the Security App on the home screen, Security -> Permissions -> Permissions -> (Choose the type of permission like Contacts etc) -> enable or disable per app.

This is for MIUI Global 7.5, running on Android 6.0.1

Sunday, July 17, 2016

Income tax e-filing with e-verification

In earlier posts, I had detailed the process for e-filing Income tax returns in India. This year, from Assessment Year 2016-17, the verification can also be done online, by logging onto Netbanking portal of a bank where my PAN number is associated with my account. So, no need to print and post the ITR-V form.


In HDFC bank's netbanking portal, the e-verification is currently available under Requests - Income Tax E-filing on the left-hand side.

Around a month after I submitted the return in June, my tax refund has been credited, too.

Sunday, July 10, 2016

checking for bad blocks on hard disk

The IBM ThinkCentre given by K for use by Ke's son had some disk issues - the hard disk was my former 160 GB laptop hard disk. Probably bad sectors and so on, so I had to do the Linux equivalent of running scandisk. Ubuntu 16.04 apparently doesn't support shutdown -Fr now for scanning on reboot - maybe due to systemd?

So, booted using USB flash drive and ran
sudo umount /dev/sda1
sudo e2fsck -c /dev/sda1

Apparently e2fsck with the -c option marks bad blocks using the badblocks program. 160 GB drive took 1 hour 30 minutes to scan - would have taken around 45 minutes if not for the 97 errors.

Output of badblocks 97/0/0 apparently means  read/write/corruption errors. Since I'm doing a read-only test, only the read errors show up.

Sunday, July 03, 2016

browsing Windows shares with Master Browser down

The Studio network's master browser was set as the local server, which now has smbd service stopped. So, smb4k, konqueror etc were not displaying shares when queried with smb hostnames like smb://hostname
- ip addresses were required.

In order to query the ip addresses, google led to this post, so a listing, albeit clunky, is obtained with
nmblookup -S WORKGROUP
where WORKGROUP should be replaced with the name of the workgroup in the network. smb4k lists the workgroup names, so that can be a first step.

Edit: PB adds a better way:
nbtscan -qe 192.168.127.0/24

Thursday, June 23, 2016

converting putty key to open ssh keys

Used the method given here to convert, using
puttygen mykeyfile.ppk -o ~/.ssh/id_rsa.pub -O public-openssh
and
puttygen mykeyfile.ppk -o ~/.ssh/id_rsa -O private-openssh

After moving the keys to .ssh, we also have to chmod 600 or else ssh will not take these keys by default. We also need to name them id_rsa and id_rsa.pub for ssh to use them by default, without having to specify ssh -i keyname username@server.

fixing dual-boot time differences

With earlier versions of Linux, the method was to choose UTC = yes in /etc/default/rc5 and so on. With Ubuntu 16.04 and above which use systemd, the method is to enter
timedatectl set-local-rtc 1

Monday, June 20, 2016

behaviour of virtualdub frame processing

If we choose Process every other frame (decimate by 2) - the resulting avi would have a framerate half that of the source.

For example, a 30fps source, with this decimate by 2 results in an output at 15 fps. If that 15 fps output is re-saved using direct stream copy choosing 30 fps as output frame rate, then we get a 2x speeded up video. A two-step process.

In order to get 2x speeded up video in one step, choose to Change frame rate to 60 fps, and then Convert to 30 fps.



Tuesday, June 14, 2016

cloning laptop hard disk

My laptop hard disk started showing SMART errors with Crystal Disk Info. Got a new Seagate 1 TB SSHD for replacement. Macrium Reflect Free could not clone - the bad sectors made it abort. Clonezilla did the job in around 4 hours for the 160 GB hard disk with three partitions, using an external USB dock for the new hard disk.

But the cloned hard disk did not boot. Booted with Windows XP install DVD, went into recovery console and did fixmbr. Then XP booted, but showed only C and D drives. Since in any case I would need to copy files from E:, might as well increase the size of C: by deleting D:. Used Partition Wizard for increasing C: size, created D: and E: as fresh partitions, and left free space for Linux. RichCopy copied over the D: and E: contents, ignoring errors, in just about 90 minutes. Now most apps work as expected, except some which complain about path not found - maybe they look for My Documents in C:.

Later, installed Kubuntu 16.04 on a trial basis, using mini.iso and a network install - the process took around 90 minutes.

Tuesday, June 07, 2016

checksums on Windows

As mentioned on this page, installed and tried out WinMD5Sum and Checksums calculator. Found that one of my iso downloads had a checksum error.

Wednesday, June 01, 2016

WHM + CPanel setting up ssh access

To set up shell access via ssh to a server for which I have Web Host Manager (WHM) and CPanel access:

1. Import my existing ssh public key to the server via the CPanel of the relevant user - by clicking Manage SSH keys - for this, as this post mentions, the key should be prefaced with ssh-rsa and should not have line breaks within the key.
2. The key should be authorized - from the Manage SSH keys interface, by clicking on the Manage authorization link. Now ssh login via key exchange using that key would be possible, for that user.
3. In order to get to a root shell, that user has to be added to the wheel group, after making sure that user is in a full shell and not a jailed shell - via WHM in Home >> Account Functions >> Manage Shell Access and Home >> Security Center >> Manage Wheel Group Users respectively.

Sunday, May 08, 2016

problems with X crashes on newer Ubuntu

My Ubuntu install has had problems with random freezes after an upgrade to 12.04. Finally, when starting to do some serious simulation work, I decided to do something about it.

The first thought was that firefox was causing the crashes, since the freezes would start most often while starting firefox. But then, found the crashes happening when starting other apps as well. Suspected X, or the display driver, and wanted to use vesa instead. Many of the methods listed, like blacklisting nouveau, did not work with 16.04  - even after reboots, nouveau driver was being listed as used by lsmod.

Final solution was to create a /etc/X11/xorg.conf - which does not exist by default. As mentioned at many places, the procedure to do this was:
Switch to a console. Ctrl+Shift+F2, for example.
Kill the display manager with sudo service lightdm stop (or whichever dm is running)
Generate a new xorg.conf with sudo X -configure
Edit the xorg.conf.new created in current directory, replacing all instances of nouveau with vesa
Move it with a rename to /etc/X11 with sudo mv xorg.conf.new /etc/X11/xorg.conf
Restart X with sudo service lightdm start

Unfortunately with Vesa, the screen refreshes are very laggy, even with Lubuntu. But no crashes. 

Saturday, May 07, 2016

Thursday, May 05, 2016

python using a single core for numpy

A point which came up when using pynlo:

A longish reply for the question why python uses only one core for numpy -
http://stackoverflow.com/questions/15639779/why-does-multiprocessing-use-only-a-single-core-after-i-import-numpy

In short, core affinity can be reset using
os.system("taskset -p 0xff %d" % os.getpid())
after the module imports. But this would be useful only for multi-threaded programs, of course. 

Wednesday, May 04, 2016

mounting a samba share with read-write permissions

Mounting a shared network drive on our internal server running Ubuntu - to make it read and write enabled, PB reports the command to be:
sudo mount –t cifs //ip-address/Share_name /local/mount/path –o username=correct_uname,uid=local_uid,gid=local_uid

Then, the local_uid user has read + write permissions.

Edit: 11 July 2016

This post about listing hostname with ip address is useful.

Also, PB adds one more tip - for mounting shares with spaces, use single quotes
sudo mount -t cifs '//192.168.1.1/SHARE WITH SPACES' tempmount  -o username=guest,password='',nounix,sec=ntlmssp

Tuesday, May 03, 2016

installing and using pynlo

Looking around for supercontinuum generation literature, came across PyNLO's documentation. Tried to install and use it. Was a bit of a struggle at first, but finally it all came together.

Issues:

  1. Anaconda3 version 4.0 installation on Windows XP failed - reported that it failed to change path variable etc, but more importantly, the exes were not running - "this is not a valid Windows executable".
  2. On Ubuntu 14.04, tried a direct pip install. Some dependency issues. Thought upgrading to 16.04 would help - ran out of hard disk space - 13 GB. Formatted and installed Lubuntu instead. With many hiccups on the way - like while doing a manual partitioning, we must not touch the swap space - because that is where the installer stores the installation files!
  3. With Anaconda3 and pynlo, errors like Missing parenthesis in call to print - so had to install Anaconda2 instead.
  4. Trying installation with pip install pynlo - installation of the required pyfftw failed with the error  fftw3.h: No such file or directory - it needed libfftw2-dev as mentioned in the comments at this post
  5. After pynlo installed also, running the example script gave errors IOError: [Errno 2] No such file or directory: .../pynlo/media/fibers/nist_fibers.txt and on copy-pasting general_fibers.txt to nist_fibers.txt, an assertion error - pynlo/interactions/FourWaveMixing/SSFM.py, line 662, in conditional_fftshift assert chksum == np.sum(abs(x)) AssertionError
Solutions:
  1. Currently pynlo needs Python 2.7 to run, won't run on Python3. So, install Anaconda2 and not Anaconda3. 
  2. On Windows, this page says that Windows XP is supported only for Anaconda versions 2.2 and below, so downloaded 2.2 instead of the latest.  
  3. Installing libfftw2-dev on Linux with apt-get install libfftw2-dev solved the pyfftw install issues. Similarly, on Windows, the way to install it is given at https://pypi.python.org/pypi/pyFFTW#downloads - ie. download the fftw dlls and put them in the same folder as the pyfftw wheel folder before install. The pyfftw whl file was installed as pip install wheelfile.whl without any issues. 
  4. Using the latest git code solved all the pynlo issues, using
    pip install git+https://github.com/pyNLO/PyNLO.git like this post
  5. Git for windows was installed from https://git-scm.com/download/win
  6. On Windows XP, everything was 32 bit, and the example took 55 seconds to run. On 64-bit Lubuntu, it ran in almost the same time. Lubuntu's desktop CPU meter indicates that it was using only one core of my dual-core Athlon, ie. 50% cpu.   

freeing up space on ubuntu

This post has lots of useful information in the answers. I removed libre-office and old kernels to get 1.5 GB. For the removing the old kernels, I followed
1. uname -r to know current kernel
2. sudo apt-get remove kernelname1 kernelname2 etc after doing
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
sudo apt-get install localpurge
and
rm -Rf /tmp
etc.

The listing of all packages with sizes with
dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -nr | less
is also a nice trick to use. 

Monday, April 25, 2016

too many files bug and php error reporting

Our audio search page had a bug where if too many files were selected, the results would not be displayed. With the help of S & B, constructed a workaround. The form was submitting all fields of the large table, instead of only submitting the hidden variables which had the fileids. So, made the main form submit to a dummy destination, and made another form with the hidden variable, submitting to the actual destination. That solved the issue, which was that there were too many fields being submitted. We did not have to change max_input_vars.

While troubleshooting, we wished to see detailed error reports. The way to do that was
ini_set('display_errors',1);
error_reporting(E_ALL);

for each php page.

Wednesday, April 06, 2016

cyberoam fail-over issue

PB had a problem where the 2nd gateway was not being automatically used as failover when the main gateway failed. Apparently it was due to the way in which Cyberoam had been configured. Tech support explained it, and PB fixed it. 

Tuesday, March 29, 2016

Xmms alternative

P reports that Xmms is no longer available on Ubuntu 14.04, and some of the ubuntu forum posts have broken links. His solution was to recompile and use Audacious instead. 

dns limitations on our mail server

We were doing some explorations of the feasibility of remote hosting our mail server which sends out daily emails to around 50,000+ subscribers. Seeing some posts about rate limits to Google public DNS servers etc, and our own experiences with DNS failures, we should perhaps run our own DNS server as well as mail server if we plan to shift the email server. 

Sunday, March 27, 2016

Firefox problems with HTML5, Vimeo and Youtube

One issue seen with Firefox - Vimeo embedded player not appearing on screen - seems to have been sorted out at some time - the current version 45.0.1 does not seem to have this issue. Or is it that it still has issues with embeds like iframe src="//player.vimeo.com/video/xxxx instead of src="https://player.vimeo.com/video etc ? There are lots of people with issues with Firefox and Vimeo.
http://techawakening.org/vimeo-videos-not-working-in-firefox-solution/2490/

Then there is the persistent stutter - for audio as well as video using html5 playback from Firefox on Windows. The only solution for that seems to be to force Flash player playback. This can be done for youtube as in my earlier post.



problem reading memo field

After a PHP upgrade from 5.3 to 5.5, one of our php applications reading data from an Access .mdb file had an issue - other fields were displaying fine, but the data from the memo field was showing blank.

After poking around for a couple of days, PB finally found the solution to be the one suggested in the comments at
https://bugs.php.net/bug.php?id=52658

That is, he had to add the optional cursor_type parameter SQL_CUR_USE_ODBC like
$cnx = odbc_connect('$databaseName', 'user', 'pass', SQL_CUR_USE_ODBC);

 Then it works. 

Tuesday, March 22, 2016

Airdroid vs ES File Explorer

One more post about my Xiaomi Mi3 phone. Though this is probably applicable to all Android phones.

I'd earlier used ES File Explorer to transfer files to and from Windows shares to the phone over Wifi. But when transferring to shares with a large number of files, or while transferring large files, ES File Explorer would keep popping up a 'Failed' dialog box, and would need repeated 'Retry' attempts to transfer multi-MB files. Finally looked for alternatives, and found Airdroid's features include file transfer. I use it in 'local network' mode, by typing in the ip address, so extra charges, no need of external network etc. ES is still useful for local file browsing etc.

Xiaomi Mi3 with Android 4.4.4 - soft home and back buttons

After my last post about my phone, there were some more developments. Now the headphone socket does not work at all. But thankfully the earpiece works fine. Then, after frequent falls onto hard cement floors, the left corner of the screen cracked slightly, and the home, back and recent apps buttons on the bottom bezel of the phone stopped working.

Since I had heard of apps with 'soft home button', I installed several of them. None of them seemed to work with Xiaomi's MIUI. Then I installed MyHomeButton which creates a notification in the notification pull-down screen. This worked, but with the drawbacks that:
  1. It would not start on rebooting the phone - I have to remember to open the app settings, turn off and turn on the check-boxes for Home and Recent Apps, then the notifications would appear. 
  2. No back button.
  3. Use requires a swipe from the top to bring down the notification bar, a swipe sideways to view the notifications, and then a tap to activate the home button. A bit cumbersome.
I lived with the above drawbacks till today, when I installed Back Button Gesture Launcher. Or rather, the trial for the paid app. Since it is a paid app, it had a somewhat helpful 'Help' section, which mentioned that for the onscreen button to be visible, what settings need to be enabled on Xiaomi -
  1. Settings -> Installed Apps -> Downloaded -> Back button -> Permission Manager -> Display pop-up window, Enable. 
  2. Settings -> Additional Settings -> Accessibility -> Back button -> Accessibility, Enable. 
Now, this app is a paid app, and one of the comments directs users to install the Back Button app instead, which is a free app. So I did that, after uninstalling Back Button Gesture Launcher. Granted the permissions again, and ready to go. A small issue with this app is that the icons don't seem to be movable from their location on the right side of the screen. But that is probably not a big issue.


Tuesday, March 08, 2016

funny characters seen in Putty session

After a server upgrade (I think), I started seeing funny characters when using Putty to ssh into our local server, like

P suggested this might be the solution,

That is, change character translation in Putty to UTF-8. The setting is in Window -> Translation. Worked.




Sunday, February 14, 2016

smooth plot in Matlab

This post has some useful techniques for using in Matlab, for smoothing data using
http://stackoverflow.com/questions/12987905/how-to-make-a-curve-smoothing-in-matlab

If curve-fitting toolbox is present, smooth can be used. Or we can roll our own, as mentioned in the link.

Saturday, February 13, 2016

video stabilization plugin for virtualdub

Video stabilization used to be available only in high-end video editing software. Realized now that Virtualdub has a plugin, too! And its development dates back to  2003. Used the Deshaker plugin from
http://www.guthspot.se/video/deshaker.htm
for a video of an oscilloscope trace, pretty good!

Friday, February 12, 2016

multiple issues with sending bulk email

SSSIHL tied up with Benchmark for sending some 4000 emails, they wanted to make it into a newsletter every couple of months. There were multiple issues with the email sending.

  1. The first time around, the sssihl.edu.in SPF record had not been updated to include benchmark servers, which resulted in spam filtering blocks for most of the mails. Along with SPF update, Benchmark also recommended whitelisting the Benchmark mail server IPs for sssihl.edu.in mail servers. 
  2. Found that Google Apps allows whitelisting. Updated the SPF record.
  3. Then found that the SPF record was returning an error, too many lookups, via the test at  http://www.kitterman.com/spf/validate.html - googling showed that having Godaddy's  include:smtp.secureserver.net in the SPF record causes a very large number of lookups. Moved the sending of emails from the Godaddy server to google apps, removed that include, then the SPF validated. 
Finally most of the emails went through after the valid SPF. 

cleaning up C drive

All these years, I had relied on various tips and tricks for cleaning up C drive on Windows, and had never used the Properties -> General tab -> Disk Cleanup utility's "Compress old files" feature, because it used to take a long time to run. But yesterday I did, and it made 9 GB available on a drive which had only 600 MB free!

Add 2 GB to Google drive storage

K sent me an email telling me about "an annual ritual by Google. I did it last year too and got 2GB."

Do the security checkup and get 2GB added:
http://www.theverge.com/2016/2/9/10940046/google-drive-free-2gb-space-security-checkup

http://googledrive.blogspot.com/2016/02/safer-internet-day-2016.html

Have now added a google calendar reminder for this :)

Tuesday, February 09, 2016

Apache 403 Forbidden errors

P had a problem after he migrated data from an old hard disk to a new hard disk on our internal server. A couple of folders in the hard disk were supposed to be available via the local webserver - but after the migration, those were returning 403.

Finally, the issue turned out to be permissions for the parent directory. Gave the permissions, also had to add Indexes to the Options line in apache2.conf for one of the folders, all done.

https://wiki.apache.org/httpd/13PermissionDenied

Sunday, February 07, 2016

retuning tv set-top box

Doordarshan DTH, now called FreeDish, migrated from INSAT-4B to GSAT-15. P sir and R called me for re-tuning their set-top box. Since the satellites are nearby, there was no need to re-align the antenna.

R had managed to enter the correct values of frequency, polarization and symbol rate in TP edit mode. It only needed a scan of the correctly entered transponder values. The relevant menu item was in the Installation menu, Scan current ANT.