Digivation Hack Central

How to fix a corrupt user profile in Windows 7 and Vista: The User Profile Service failed the logon

by on Feb.16, 2014, under Windows

I had a recent issue with someones laptop where I got the

The User Profile Service failed the logon

for a Vista installation. This is the second time this has happened on the same computer.
The first time I recreated the user and copied the data across and repair installed windows.

This time I used the reference below. I had 2 entries for the user under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList, the second one having a .bak suffix. The first one was also brief containing only 2 entries and missing the rest.

So I:

  • renamed the original to a new suffix (just in case)
  • removed the .bak from the other one
  • and set state to 0 (was 0x8000)

Rebooted and voila login worked again.

This is here for my fast reference. YMMV

Ref: How to fix a corrupt user profile in Windows 7 and Vista: The User Profile Service failed the logon

Comments Off more...

Dumping the LG Roboking VR6270LVM

by on Jul.25, 2013, under linux, Nifty Hacks

Having just obtained a shiny new LG Roboking VR6270LVM (AKA HomBot Square) via ebay from korea, my first thought was to convert the Korean speech to something I can actually understand.

The english manual is easy to find on any LG web site, however software updates are a bit more difficult. After searching around a bit I found a software update for this model, though I’m not sure on whether it is useful for me. However, it did give me some hints.

This device is running ARM embedded linux. There is a USB port next to the dust catcher which is used to perform updates.

It looks for a file called update.sh, which if found it executes! It is important that a line in this script has the text

#IS_HIT_UPDATE_SCRIPT=1

usually on the second line.

An example script to dump the filesystem is

 


#!/bin/sh
#IS_HIT_UPDATE_SCRIPT=1

SOURCE_PATH="/mnt/usb"

if ! test -e $SOURCE_PATH/rk.tar ; then

mount >> $SOURCE_PATH/log 2>&1
ls -al / >> $SOURCE_PATH/log 2>&1
ls -al /bin >> $SOURCE_PATH/log 2>&1
ls / >> $SOURCE_PATH/log 2>&1
ls /mnt >> $SOURCE_PATH/log 2>&1

R="bin dev etc lib linuxrc root sbin temp tmp usr var mnt/rwfs"
tar cf $SOURCE_PATH/rk.tar $R >> $SOURCE_PATH/log 2>&1

sync

fi

aplay -c 1 -r 16000 -f S16_LE /usr/SNDDATA/SND_NOTICE_UPDATE_END.snd

/usr/rbin/rpjig.axf /vision /usr/rcfg/config.xml -poweroff 15000 &

exit 0

It will talk when complete.

There are 2 sets of sound files, one male and one female, and both in korean. These are in mono 16k raw audio and can be converted to wav files with sox.


#!/bin/bash

mkdir -p sound/SNDDATA{0,1}

for i in `find . -name "*.snd"` ; do
d1=`dirname $i`
d1=`basename $d1`
i1=`basename $i`
i2=`basename $i1 .snd`
sox -r16000 -c1 -e signed -b 16 -traw $i sound/$d1/$i2.wav
done

The file names are quite descriptive but it would be nice to know what each one says. Then I can rerecord them and make it speak english. If anyone has the english versions of these sound files, I would be grateful.

Also interesting is that it supports wifi. Plug in a compatible wifi USB dongle and upload (using update.sh) wifi.cfg to /usr/etc. The format seems to be


ESSID ssidname
IP
WPS WPS_OFF

but this is untested. It runs dropbear so you should be able to log into it. You may also need to update wpa_supplicant.conf in the same directory with keys for WPA2 as is standard for linux. Supported dongles include rt3070sta, rt5370sta, rt3370sta and 8192cu.

All for now.

Comments Off :, more...

Debugging shared Client/ASP Web Service projects in VS2010

by on May.19, 2011, under Windows

This post details the setup required for combined Remote Debugging server side web services with client programs in the same project. It is here mainly to assist my memory but may be of use to others as I had to dig for a lot of this info.

It assumes you log into the local development machine as a domain user and the remote IIS server is on a different domain with no shared trust.

This applies to VS2010 but should also be relevant to vs2008 and vs2005.

Local Computer Config

You will have logged on the local computer as MAINDOMAIN\user

  • Create a local computer user with the same name and password as your domain one. ( This step may be unnecessary )
  • Change the Sharing and Security Model In Local Security Policy/Local Policies/Network access: Sharing and security model for local accounts
    set Classic – local users authenticate as themselves

Remote IIS Computer

  • Create a local computer user with your domain user name and same password.
  • Add Administrators group to this user.
  • make sure msdeploy works.
  • Add debug rights to new user In Local Security Policy/Local Policies/User Rights Assignment/Debug programs/Add User or Group
  • Change the Sharing and Security Model In Local Security Policy/Local Policies/Network access: Sharing and security model for local accounts
    set Classic – local users authenticate as themselves

msvsmon config

Create a batch file to run msvsmon called runmsvsmon.bat in the base path (e.g. wwwroot\ServiceTest) of the asp service as follows

SET _NT_SYMBOL_PATH=%CD%\bin
cd "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger\x86"
start msvsmon.exe

Run the batch file as the user added above.

This will allow symbols to be used during step into service debugging.

Change the server name in msvsmon to

DEVDOMAIN\user@LOCALMACHINENAME

This allows your user to attach juts by entering the remote ip address (domain search for remote server is disabled in this case) in the Qualifier field in VS and thus works for standard debugging too.

Visual Studio Config

In Debugger Options

  • disable Enable just my code
  • enable Enable source server support

In Web Service project properties

  • Web/Use Custom Web Server/Url – http://remoteip/ServiceTest
  • Package/Publish Web/IIS Web Site – Default Web Site/ServiceTest

In Publish Service

  • username user
  • password is whatever
  • save password checked
  • method WebDeploy
  • URL http://remoteipaddr
  • Site Default Web Site/ServerTest or Default Web Site/Server
  • check Mark as IIS app
  • check Leave extra files

Procedure

Deploy Web service first

This should succeed if msdeploy is working on the remote server.
You should see the files update on the target.
add debug=”true” to compilation tag in web.config.

  <compilation debug="true" targetFramework="4.0">
  </compilation>

Test Tools/Process Attach

If you get a list of processes, you have everything should be working.

Debug Client and Web Service together

Set a breakpoint inside the service module and press F5. It should then break with source.

Set a breakpoint in the desktop client and step into a web method.

Comments Off :, , , , , , , more...

Prep Learning Games

by on May.04, 2011, under Educational

Having a son in prep this year has led me to research learning tools and games. He is already quite confident with using a web browser and bookmarks for finding his favorite online games and playing them unsupervised. Once on a site like cartoon network, he can find new games quite easily.

If you allow unsupervised access, remember to jail/restrict their account so they cant install or do anything accidentally to the computer.

Here is a collection.

I may also write some if I cant find any more suitable ones.
The key motivator using experience with my son is something exciting and/or funny when you get it right. It also needs to be verbal/spoken as they cont read yet.

Sight Words

http://www.mrcpl.org/literacy/lessons/sight/index.html

http://roythezebra.com/reading-software/tricky-words/tricky-words-1.html

Comments Off :, , more...

Using a Windows CE 4.20 SDK with VS2005 and VS2008

by on Nov.23, 2010, under WinCE

I have had the requirement to use a windows CE SDK with Visual Studio 2005 and 2008. This is desirable because they have better/newer ARM compilers, as well as being able to integrate a combined Native/.NET solution in 1 place for a single step build.

The hint on how to do this came after playing with Qt. Qt Comes with a program (continue reading…)

Comments Off more...

Git Tricks and Tips

by on Nov.19, 2010, under linux, Nifty Hacks

Maintaining Vendor Branches

For the case where you have a vendor tarball or zip source bundle, these are effectively managed in a branch.

If the vendor releases a new version, the update process is:

git co vendor
mkdir zzz
mv * zzz/
mv .* zzz/
mv zzz/.git .
rm -rf zzz
git commit -a

Now you can merge or rebase your development tree to the new vendor release.

Some useful Git links.

Refs:
http://cheat.errtheblog.com/s/git
http://sourceware.org/frysk/build/git-fu.html
http://sandofsky.com/blog/git-workflow.html

Comments Off more...

How Smart Meters can be Fooled

by on Sep.20, 2010, under Solar

As we all know, smart meters are being rolled out everywhere so that electricity companies and charge by time of use. This means that when you want the power most and so does everyone¬† else, they will increase the tariff for that period. I prefer my flat rate but apparently this is not a choice if you want a premium rate feed in tariff for your solar system. It will cost us at least $150 more per year for the power we buy with AGL’s 3 rate tariff.

The old disc analog power meters record power/current usage with a motor which spins a disc, and turning the counter in a calibrated way.

The new smart meters are digital. This means they sample the current and voltage waveform for a period of time and then do some maths to calculate the resultant power used in that period. This is then recorded.

There are several designs for smart meters, a common one using an MSP430 micro, but this could as easily be a PIC or an AVR. These devices generally have an A/D converter with multiple inputs. These A/D converters can only sample so fast. They also can only sample 1 input at any one time.

The sample rate would typically be in the order of 500us to 1ms due to limitations in the hardware. This leave gaps between the samples where power could be acquired leaving no trace on the meter. Then there is also the time between sample bursts, where the calculations are done or another phase/meter input is sampled. There is no record of anything used in this period either. If a second input is sampled, the first input is not sampled. No record of this either.

Then there is also outlier detection and removal. This means any sample that is not near excepted value compared to other adjacent samples is discarded, though not all meters would necessarily implement this algorithm, but it does guard against noise creating high false readings which customers may object to.

I have direct evidence that at least 1 product does this. The Fronius inverter which a colleague has had installed for his PV system draws 70W at night, measured with a plug in  power meter from Jaycar and also measured at 314 mArms. Looking at the current and voltage waveform on an oscilloscope, it shows several pulses, the main one just after peak voltage, and has a duration of between 100 and 200us. The EM1200 meter installed does not register this current draw at all!

The crux of this is that you could design a power supply along these principals, and get free power. This power could then be fed immediately back through a suitable grid connect inverter, the power which would be registered by the meter.

Conversely, if you get the timing wrong, the meter may record a higher than average value by several times.

I wonder how long it will be before this is fixed. ;-)

There is also the legal question. Is Fronius breaking the law.

Comments Off more...

No Sound in Limited User Account

by on Sep.17, 2010, under Windows

Recently I needed to do a repair install on Windows XP, after which sound was no longer working on limited user accounts. After extensive searching I realized no one had a solution. The device driver was ok and operating and sound was working fine on administrator capable accounts.

The strange thing is that the Realtek HD sound app worked Ok on the LUA. I concluded from this that the software enumerator was at fault, specifically the registry keys that would have to be read for the software enumerator to read its current list.

Use regedit to change the permissions of the tree on currentcontrolset to fix this issue. Log in again and its all good.

Comments Off more...

Optimal String Sizing for PV Systems

by on Apr.23, 2010, under Solar

Optimal string sizing for a given inverter can improve your return on investment.

As an example, I will use my system as an example. The PVI-5000-OUTD-AU efficiency plot is given below.

Aurora Efficiency Plot


The important panel parameters are:

Panel: TH175M24
Pmax: 175watts
Vmp: 36.2V
Imp: 4.85A
Voc: 43.9V
Isc: 5.30A

It can be seen from the inverter efficiency diagram that the sweet spot is at 50% full power and 345V string voltage. Note that it has 2 MPPTs. These may be independently specified.

Now the 28 panels for 4.9kW need to be split between the MPPTs such that the Pmax string voltages are near the optimal 345V. This gives us 2 optimal and a symterical choices:

  1. 2 x 9 Panels in parallel + 1 x 10 panels. This gives string voltages of 325.8V and 362V.
  2. 2 x 10 panels in parallel + 1 x 8 panels. This gives string voltages of 362V and 289.6V.
  3. 2 x 7 panels in parallel + 2 x 7 panels in parallel. This gives string voltages of 253.4V

The open circuit string voltage for this inverter must be less than 600V. This is 439V for 10 panels, so this parameter is ok.

By inspection of the efficiency plot, configuration 1 is the best. In fact is it 0.3% better than the symmetrical configuration, which would result in about $10 per year more income/power at 68c/kWh.

The MPPT which has 2 strings in parallel has a greater weight attributed when choosing panel configuration as it supplies more power.

Refs:
Aurora PVI-5000-OUTD-AU Datasheet
TH175M24 specs

Comments Off :, , , , more...

PV System Install Phase1

by on Apr.23, 2010, under Solar

The panels are up but the Aurora inverter is still coming due to supply issues in mid May.
I have opted not to obtain an alternative GCI due to the excellent efficiency of the powerone aurora. It is generally 2% or more better than others currently able to be supplied at short notice so worth waiting. 2% is worth 98W at full power, and derated, works out to about $100 per year.

All things going well, we should be generating power and income in June some time, fingers crossed. Hopefully AGL wont stuff us around like others I know when we apply for the premium rate tarrif too.

PV Panel Install

4.9kW PV Panel Install with 28 x 175W Mono

Comments Off :, , , , , , , more...