22 November, 2009

Windows to Linux file synchronization over ssh: Unison solution

The aim: Portable and simple solution (no administrative right required on both sides) to synchronize files from Windows to Linux machine over insecure network (trough ssh) using Unison (ie. using only freeware software).
The problems: There is no ssh command line client in Windows.

Here are the important details:
I have used Unison (version 2.32.52), runtime GTK+ 2.14.7a environment from the Pidgin project (as described on the unison's page), plink.exe (version 0.60) and small script to point unison's sshcmd to plink.exe.

1) Create a new folder and unpack the two executable from Unison ("Unison" in my case).

2) As user install GTK somewhere.
- add the c:\somewhere\GTK\2.0\bin to the PATH variable in the system settings.
- or copy all files from \GTK\2.0\bin to the Unison folder. Then copy the whole (not the content) "etc", "lib" and "share" folders as well in the same folder.
3) Download and copy plink.exe in the "Unison" folder.

4) In notepad copy paste the following line
@c:\pathtoputty\plink.exe -ssh -P 22 -pw [mypassword] -l [myusername] -load [myputtysavedsession] "unison -server -auto"
change to fit your configuration and save it as "plinker.bat" in the "Unison" folder.
If you use pagent from the PuTTY then you can omit the username and password and use ssh-keys as usual (then also your password will be safe)

5) On the linux computer download or install unison. It will be good if you match the version on the Windows machine or vice versa. If you download the static binary, put it somewhere in your $PATH.

6) Start the Unison Gui version and configure your profile. This will fail, because ssh is not specified. Go to C:\Documents and Settings\yourprofile\.unison and add this line to the profile you have created.
sshcmd = plinker.bat
This and the GTK assumes that you have started Unison from its folder.

6) Start again - this time it should work. Enjoy.

Note: In point 4 you might need to provide the full path to the unison binary on the Linux machine.
Note: Since the configuration for the server address is actually specified in "plinker.bat" (it actually overrides the address specified in unison) you will need another script to connect to another server.

The original idea for the plinker.bat script is taken from here.

08 November, 2009

GlobalSat BU-353 gps receiver

Product details on the vendor's web page.

Well, this is my first experience with GPS receivers, so I am not in a position to compare performance with any other receiver. The general opinion, from the countless reviews in the Net, is that is very sensitive and fast to fix the position.

My intention is to use the receiver with my Eee PC 901 in the rare occasions when I need a GPS navigator or rather as a small home project.

First impressions: smaller than what I was expecting from the pictures, reasonable length of the cable (1.5 m), time to fix from cold start 15~20 minutes from inside the room in my apartment and about 4~5 minutes in a car.
Under Windows XP the initial setup is quite simple. There is a small standard tool provided on the installation disk "GPS Info" that can connect to the virtual serial COM port and communicate with the receiver - excellent to check on the status of the module.
Under Linux, most probably you will need "gpsd" to communicate with the device. I have installed "GPSDrive" from synaptic that has also pulled all the necessary dependencies including gpsd.

WARNING:(read this before you experiment yourself). I have used EeeBuntu 2.0 that has the necessary modules but for one or another reason does not starts the gpsd daemon when you insert the USB. This is not a serious problem, since as user one can easily start the program with: gpsd -bnN -D 2 /dev/ttyUSB0 . DO NOT forget the "-b" OPTION!!! From the gpsd man page

-b

Broken-device-safety, otherwise known as read-only mode. Some popular bluetooth and USB receivers lock up or become totally inaccessible when probed or reconfigured. This switch prevents gpsd from writing to a receiver. This means that gpsd cannot configure the receiver for optimal performance, but it also means that gpsd cannot break the receiver. A better solution would be for bluetooth to not be so fragile. A platform independent method to identify serial-over-bluetooth devices would also be nice.

And this is the whole story... I have managed to lock my device the very first time I have tested it under Linux (didn't use the "-b" option). It became almost inaccessible. "GPS Info" was showing garbled output while the led remained off. I have almost accepted the damage since 5 minutes without power did not help. A suggestion on the net says that it needs 72 hours to drain completely and reset. The better solution: Under Linux, start gsmd with the "-b" option. Then connect to the the daemon by "telnet localhost 2947" and then type "n=0" to set the sirf-III chip or firmware to output NMEA strings only. Here is the original post of the solution.

The common tools, to get some info from the GPS receiver under Linux are:

xgps: simple test client for gpsd with an X interface. It displays current GPS position/time/velocity information and (for GPSes that support the feature) the locations of accessible satellites.

cgps: client resembling xgps, but without the pictorial satellite display and able to run on a serial terminal or terminal emulator.

as well as xgpsspeed, gpxlogger, cgpxlogger etc.

30 July, 2009

Lenovo ThinkPad T61 (7664R6G) - just a few words

In general, perfect laptop for the work place and occasionally as a mobile computer. Quite good performance under WinXP SP3 and AVG Free 8.5. 2GB of RAM and 2 cores makes it easy to run Linux in a VirtualBox to avoid the dual-boot solution. Decent wide screen resolution and proper options to scale the external display (for presentations).

Windows XP from scratch:
I have used WinXp Pro SP2 slipstreamed installation following this guide: XP SP2 Clean Install - Less Trivial than expected.
The key points are:
  1. change the SATA from AHCI to Compatible in the BIOS.
  2. install the usual way.
  3. install the Intel Chipset Support and Intel Matrix Storage Manager Driver for Windows XP from the support page.
  4. reboot and change back to AHCI in the BIOS.
  5. if everything is OK continue with the rest of the drivers and software.

Note: This will also destroy your recovery partition and the ThinVantage boot manager or whatever it is.

At the time when I did the installation, the wireless drivers were a bit buggy and ware not recognized by the ThinkVantage Wireless Assistant - so that one left aside and currently I use the build in Windows wireless assistant.

I have skipped many of the tools from the package including the Power Manager and Active Protection System - pretty much the minimum.

So far, the only problem I have encountered is: during charging process of the battery. The GPU temperature get too high and the BIOS speeds up the fan that runs constantly during the charging time (even after that), until I put the computer in sleep mode and awake it again or restart. It seems the the area and sensor in question does not get cooled by the fans at all, because the CPU and all the other areas get quite cool but this particular remains unaffected.
As temporary solution, when the noise bothers me, I run TPFanControl that works quite well on the particular issue.

Clean ThinkVantage System Update cache folder:
The System Update program stores the downloaded packages in C:\Program Files\Lenovo\System Update\session. You can delete all folders and files but keep ...\ststem\, ...\temp\ and these two files: QuestResponse.xml and updates.ser.

Pros:
  • very good performance, 2GB RAM...
  • USB ports on both sides, 1Gb wired network...
  • convenient dimensions - close to A4 paper format - it fits easily in a bag with paper folders, articles, printouts etc.
  • hot key to switch of the screen light - (well, I am quite sure when I will not need the computer for a while, so standby/hibernate settings are set to manual)
Cons:
  • nothing that is worth mentioning.
Links:
Lenovo support forum: T61 and prior T series ThinkPads
Review IBM/Lenovo Thinkpad T61 Notebook
Essential Hotfixes and Tweaks

26 July, 2009

Configure Win XP TCP/IP settings from a limited account

I have occasional problems with my Internet provider when theirs DNS sever is down or does not respond for whatever reason. I have found recently that I can use different DNS server to overcome the situation. The remaining inconvenience is that one cannot change the TCP/IP from a limited account... unless one uses a command line shell with administrative rights.

Here I have found all I needed to change the parameters on the fly: Configure TCP/IP from the Command Prompt. First I have set the new DNS setting for my wifi connection the usual way, then I have dumped the setting to get the correct syntax.
netsh -c interface dump > filename.txt
The LAN connection still had the DNS set to the DHCP server, so from those two configurations I have created these two scripts to alter the settings:

to set up static DNS:
netsh interface ip set dns name="Wireless Network Connection" source=static addr=xxx.xxx.xxx register=PRIMARY
netsh interface ip add dns name="Wireless Network Connection" addr=xxx.xxx.xxx index=2
and to set up DNS from the DHCP server:
netsh interface ip set dns name="Wireless Network Connection" source=dhcp register=PRIMARY
- Change "Wireless Network Connection" with the network connection you want to configure.
- Replace xxx.xxx.xxx with your primary and secondary DNS addresses.

Another alternative is to use a graphical interface to change between different connection profiles: NetSetMan. It looks quite good but I use VirtualBox and that one has its own subnet address and configurations. I got the impression that the setting are applied to one of the network adapters but it is not clear to me what happens to the others... Using the netsh.exe I know for sure which adapter I am messing with. Also on some places I use the LAN most of the time then for a while the wifi with several different profiles (whatever is the local wifi access), then back to LAN. It starts to get messy. Usually I need the static DNS only in cases when the ISP's DNS does not work.
Update: From the support forum of the program it is clear that the setting in each profile are affecting only the selected network driver: NetSetMan & VMWare. This means that one can create a "static DNS" profile and select an adapter to which the settings should apply.

05 July, 2009

Eee PC 901, 12GB SSD, Windows XP

General considerations:
For those that own such configuration it is well know that the computer can't survive long without serious intervention of the original set up. The computer comes preconfigured with WinXP SP3 without hibernation and paging (virtual memory) but the space left on the C: drive is not enough even for the Windows updates that inevitably should be applied. A "must do" action to save you laptop is to clean and free some valuable space: read this sticky post on the EeeUser forum How to clean up space on your C: drive in Windows XP. Without most of these tasks, your computer is useless.

BIOS:
I am still running the original BIOS version 1101 and I don't have any particular problems except the uneven brightness levels that does not bug me enough.

04 July, 2009

Sony cordless headphones: TMR-RF850R and MDR-RF840RK.

Overall, very similar devices but with some significant differences in detail. The most annoying problem of the older set (TMR-RF850R) is the sudden white noise when the input signal disappears and the transmitter switches off automatically - it just blows my head!
On the newer set (MDR-RF840RK) this is fixed (and some other annoyances) but they have introduced another annoying feature (yes, build in features) - very bad and drastic sound level normalization. It is so bad that if you listen to a song the volume can noticeable fluctuate up and down! Also the max volume is so low that is not enough to drown some ambient noises...

As a very general conclusion - I would not buy again any of this headsets if I needed to.


TMR-RF850R

Mediocre design and sound quality.

Pros:
  • loud sound
  • comfortable
Cons:
  • sudden loud noise when the signal disappears !!!
  • extremely difficult to fit properly on the cradle !!!
  • manual rotary channel tuning


MDR-RF840RK

Good design but mediocre sound quality.

Pros:
  • very good design
  • easy to fit on the cradle
  • easy channel selection
  • very quiet when the input signal is missing !!!
Cons:
  • very bad automatic volume normalization !!!
  • as consequence - not loud enough sound - I can easily hear ambient noises even on max !!!
Update: I have made a small movie illustrating one of the problem with the older set.




Specifications: MDR-RF840RK
Main Features:
* Transmission range up to 100m
* 40mm driver units for deep bass response
* Hassle-free recharging by placing the headphones on the dock (headphone charged via electromagnetic induction)
* Automatic On/Off for headphones making your batteries last longer
* Rechargeable Battery will keep the music going
General Data:
* Open Air Type: No
* Closed Type: Yes
* Dynamic Type: Yes
* Wearing style: Over band
* Driver unit (mm): 40.0
* Frequency response (Hz): 20 - 20,000
* Magnet: Ferrite
* Power ON indicator: Yes
* ON/OFF function: Power turns ON automatically when headphones are worn
* Mute function: Volume level decreases when RF signal is weak or not received
* Diaphragm: Pet
* Volume control: Yes
* Battery number: 2.0
* Battery type - normal: AAA
* Battery type - rechargeable: Ni-MH
* Battery life - normal (h): 28.0
* Battery life - rechargeable battery (h): 18.0
* Recharging time - from 0 to full (h): 16.0
* Weight (g): 300.0
Transmitter:
* Transmission type: RF
* Signal range (m): 100.0
* Charging stand type: Standing
* Battery charge method: Automatic
* Battery charge indication: Yes
* Power ON indicator: Yes
* Distortion rate (% at 1 kHz): <1
* Transmitter frequency range (Hz): 30-12,000
* Transmitter power ON/OFF: Signal transmission starts when audio signal is detected
* Available channels: 3.0
* Stereo mini jack input: Yes
* RCA jack input: Yes
* Weight (g): 220.0
Supplied accessories:
* AC adaptor: Yes
* Rechargeable battery: Yes
* Connecting cords: Yes
* Plug adaptor: Yes
* Dimensions:
* Width (mm): 112.0
* Heigth (mm): 245.0
* Depth (mm): 310.0
Please be aware that the features/specifications can differ from country to country.