Sunday, October 08, 2017

removing duplicates

Found some duplicate filename entries in our schedule page remote database. PB found that these were due to some files with filenames beginning with a carriage return - ASCII 13 -

and he found there were 144 such duplicated files.


I found that these had been added in the early days - double digit index numbers - and so could be deleted - did

SELECT * FROM `name_of_table` where LEFT (fileName, 1) = '\r'

and then deleted all those 141 records using the phpmyadmin interface.

Sunday, September 24, 2017

Intex Aqua 4G Strong and Airtel 4G - solved

Unfortunately, my Intex Aqua 4G Strong handset does not seem to work with Airtel 4G network. The issue could be that Airtel's 4G is on LTE band 40 (2300 MHz) which does not seem to be supported by this handset. So, currently, even when Airtel4G is seen as an available network using Settings -> More -> Cellular Networks -> Network operators, and when chosen, shows "Registered on network", the status shows 3G, and apps like Coverage and Phone tester show the connected cell to be WCDMA / HSPA and not LTE.

Phone tester was earlier indicating that this handset was not reporting GPS connections. Maybe it lacks antennae for GPS and LTE band 40? Using Phone tester with the Mi3 would take a couple of minutes for first connecting to a GPS satellite, and later, after closing and opening the app, would connect within seconds even indoors.

Edit: I emailed 121 at airtel dot com with my 4G connection issue. They called back in the evening, saying that it was an issue at their end, "we would like to inform you that due to some technical issue, internet service on your mobile was not working. However, we have reset the internet service for your mobile.
We request you to restart the handset before using the internet service."

I restarted after seeing their email, and the phone connected to 4G  :)

updated budget airline flying experience

I had posted in 2007 about flying Air Deccan. Since Air Deccan no longer exists, maybe I should write about my recent trip on Spicejet.

Ticket price was supposed to be Rs. 1600 or so for CCJ to BLR, hand-luggage-only fare. Somewhere in the online booking process, I was charged some more, so it became Rs. 1900. Somewhat comparable to the Rs. 1800 (Tatkal) II AC railway ticket price.

Ticket and ID is required while entering the airport. Security check was relatively hassle-free, no lines when I arrived one hour before my flight time. No tag needed for hand-luggage. CISF personnel insist on paper boarding pass so that they can rubber-stamp it - whether web check-in or normal check-in - so the mobile boarding pass is not of much use. They also asked me to take out electronic items from my bag and put them on a tray for X-ray. The waiting lounge was full of passengers - Air India flight to Mumbai was four hours late, those passengers were being provided with breakfast in the lounge when we were boarding. Low-floor buses to and from the aircraft at both airports, a Cobus 3000 at BLR.

As noted in my previous post, the flight attendants are a bit rushed for time, trying to manage the very short turnaround times. They were doing the safety drill when the aircraft was rolling towards the start of the runway, just completing when it started the takeoff run. The Bombardier Q400 managed the 350 km trip in just 35 to 40 minutes of flying time. Another five minutes for taxiing and so on. A bit of turbulence over the Western Ghats as usual - maybe for five minutes or so. Also a big downdraft just before landing. Otherwise quite smooth.  The pleasant-mannered cabin crew managed to serve pre-booked meals and free water for quite a few passengers during this short flight.

The flight seemed to be full - I had chosen the last row window seat, 20D, for the little bit extra legroom. At nearly six feet, I was reasonably comfortable, with an inch or two to spare between my knees and the seat ahead. But the seat reclines only a couple of inches.

Overall a good experience, with only the taxi fare from the airport being an extra cost as compared to the train journey. 

Monday, September 04, 2017

upgrading from Korg Nanokontrol to Nanokontrol2

I mapped the MIDI CC signals of the Nanokontrol2 to Reaper following the method given at
http://hnsws.blogspot.in/2010/08/korg-nanokontrol-and-reaper.html

with the important difference that the Nanokontrol2 had to be plugged in keeping the
Cycle and Set 
buttons pressed to make it go into the MIDI CC mode, as mentioned in the instruction booklet supplied along with the device.

I tried rebooting the computer, the setting seems to be remembered. So, probably for daily use, this pressing of buttons at startup may not be needed.

In case you have issues with it, you may need to disconnect the Nanokontrol2, and connect it back keeping Cycle and Set buttons pressed.

(Specific to our use - other functions are similar as before, except that there are 3 buttons for each row instead of 2 for the earlier Nanokontrol - the lower buttons are mapped to SOLO for the slider tracks, the upper buttons are mapped to SOLO for the knob tracks. The middle buttons are left unused for now.)

Thursday, August 31, 2017

splitting a multi-track wav file into separate channels in Reaper 3.5

Right-click on the track, choose Item processing -> Explode multichannel audio or midi items to new mono items 

Sunday, August 13, 2017

avoiding dead time on radio during live broadcasts

From an email sent to my colleagues.

It has been our practice to avoid dead time on the radio during mandir live broadcasts by playing the file BI.mp3 which can be found on the desktop of the mandir mac.

The procedure is -

  • drag and drop the BI.mp3 into the track corresponding is knob 4 (input 12) ahead of time, if you anticipate a period of silence

  • click on the record enable button - red button next to the fader on the onscreen mixer - to disable record enable (so that the mp3 gets played out instead of the input from that channel)

  • fade in the music within 2-3 seconds of silence, and fade out similarly. 

  • Once bhajans start (or some program starts where input 12 is needed) again click record enable to enable that input.
  • Another point to be noted is: Please DO NOT save the project when you quit. (If recorded, the wav file is saved automatically.)

Wednesday, May 17, 2017

converting a FAT32 volume to NTFS and backups

With WCry and other malware in the wild, I wanted to take a full system backup of the Acer laptop. Decided to go with Windows built in backup - Start -> Run -> ntbackup

Around half an hour later, ntbackup complained that the drive it was writing to was FAT32, and does not allow files larger than 2 GB (or 4GB? I forgot). Decided to convert it to NTFS, retaining the data on it.

Ran convert from command prompt. It failed, complaining that there was insufficient memory. Moved over the existing files to another hard disk and then tried convert again. It again complained of insufficient memory. Probably a 2 TB volume is too much for it on a 32 bit system. So, Control Panel -> Administrative Tools -> Computer Management -> Disk Management. Deleted the partition, created it again as NTFS.

While formatting the new volume, I wanted to see what would happen if I do not choose Quick Format. Format took 5 hours for the 2 TB drive!

And after that, the backup of C, D and E drives, creating a 239.4 GB single file, took around 12 hours. 

Sunday, May 14, 2017

stopping unwanted notifications on Android

Some apps bring up annoying notifications. Examples - the activation messages for Cloud Messaging on Xiaomi phones, Airtel's and Paytm's "offers" and so on. An easy solution was to pull down the notification bar, click and hold the notification till a box appears with "App Info" - may be seen as an exclamation mark icon. Click on that, which gives an option to block notifications from that app. 

preparing Mandir Live Files for Download

From an email by PA.

Steps to process live files

1. Open finder and click on ‘Mandir Live Recordings’, click date modified

2. The first few files will be that morning's and the previous days

3. Open ‘Magic Cutter’, drag and drop the file with yesterday’s date. Morning file will end with ‘_1’ and evening with ‘_2’

4. Double clicking on the wave will give you the split marker. Place one marker just when ‘Omkar’ of vedam starts and one before ‘Omkar’ of bhajans start. (You will need to connect the earphones to the mac mini's 3.5 jack to hear the file)

5. Then click ‘Split’

6. Now it will ask for where to save. Click the drop down on top of the dialogue box and select the folder ‘Split Files’

7. It will take 2 seconds to complete. Then repeat the same for Evening file.

8. After both files have been split, close Magic Cutter. In the finder go to the folder ‘Split Files’ in the sidebar.

9. Once there, again click date modified. You will see 6 files with names different from the rest. Date followed by ’_01_01’ and so on.

10. Now delete the 2 files that have the announcement. (They will be the 2 files with least size)

11. Now rename the files just like the other files in the folder. Morning vedam and bhajan files should have the date and end with '_AM_VEDAM' and '_AM_BHAJAN' respectively
Evening vedam and bhajan files should end with '_PM_VEDAM' and '_PM_BHAJAN' respectively

12. After renaming, close Finder and open 'Filezilla'

13. In the menu right on top of the monitor, click bookmarks and select the bookmark, 'Split Files'.

14. Once the connection is established, transfer the files that you just renamed. Double-click files one by one, or select, drag & drop.

Friday, April 28, 2017

Blender links

Some Blender links which I found useful:

https://blender.stackexchange.com/questions/124/how-to-emulate-a-number-pad-and-3-button-mouse

https://blender.stackexchange.com/questions/644/why-does-the-zoom-sometimes-stop-at-a-point

https://www.youtube.com/watch?v=zmY_mn6Ue2g

In this tutorial, there is a mention of how the output may look grainy if the object in blender is not scaled up. But I was not successful in improving my OCT renders though I scaled up the cube 2 or 3 times.


Tuesday, April 25, 2017

installing the latest blender on Linux Mint

I needed to install Blender 2.78 for compatibility with files created on Windows with 2.78. The Linux Mint repository (Ubuntu repository) carried the earlier version of Blender. So, followed this guide to install 2.78.

sudo add-apt-repository ppa:thomas-schiex/blender
sudo apt update 
sudo apt install blender

To go back to the default version, I need to do
sudo apt install ppa-purge 
sudo ppa-purge ppa:thomas-schiex/blender

Wednesday, April 19, 2017

updated live broadcast procedure

My old post on Mandir live broadcast procedure needs an update. A lot of steps have been removed.

  1. Power on procedure is:
    (a) UPS input on
    (b) UPS on
    (c) Tascam US-1641 power on
    (d) Compressor on
    (e) MacMini power on
    Power down procedure follows in the reverse order.
  2. In case they don't start automatically, start Reaper and BuTT. 
  3. The setup can be tested by playing the output of reaper. Reaper channels 1-8 are mapped to sliders 1-8 on the Korg NanoKontrol. Channels 9-14 are mapped to knobs 1-6. Channel 5 is also mapped to slider 9, since slider 5 has some issues.
    Channel 12 (knob 4) has instrumental music and 
    Channel 13 (knob 5) has the pre-live announcement pre-loaded.
    Channel 3 (slider 3) has the full mix output of PA mixer coming in.
    Pressing play on the Korg NanoKontrol allows you to test whether the BUTT gets signal when knob 5 is opened, as seen by the lit up LED-style indicators on BUTT.
  4. Start playback of pre-live Announcement in Reaper approximately 3 minutes before desired start of live broadcast.
  5. Press the 'Play' button in BUTT to start live broadcast on AsiaStream + TeluguStream.
  6. Fade out knob 5 and allow knob 6 to maintain around -12 dB at the output when the program starts. Playback can be stopped with the stop button on the NanoKontrol.
  7. Recording of programs is mapped to Channel 15 which is record enabled. The spacebar is the shortcut key.This recording is not necessary for daily bhajan and vedam - BuTT records those automatically.
  8. If recording is in progress, if a filler instrumental is to be added, BI.mp3 can be dragged from desktop to Channel 12 (knob 4) which has record enable DISABLED - the dull red ar button.
    Unless the track has record enable Disabled, playback will not occur from the track.
  9. The same procedure as above can be used to drag and drop the ANN_END_LIVE end announcement file for playout at the end of special program broadcasts.
  10. The ambient hall mic is connected to the XLR input Channel 8 on the Tascam, and this is opened for bhajan chorus etc.
  11. The live broadcast is stopped by hitting the stop button on BuTT, and answering 'Yes' when asked if the recording can be stopped. 

Sunday, April 09, 2017

enabled showing text for location in Nemo

and enabled textual location address in Nemo file browser, after installing dconf-editor, by checking show-location-entry in org nemo preferences.

Friday, April 07, 2017

removing old kernels

After a kernel update, found on Mint Linux that there were quite a few old kernels present, which must be using up quite a bit of disk space. As suggested by a post at
https://forums.linuxmint.com/viewtopic.php?t=234076

did

sudo apt-get install byobu
sudo purge-old-kernels


Seems to have cleared up nearly 700 MB.

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.