Support

Blog

Browsing all articles in China Related

Flattr this!

Once again, its been a while since I did a shopping post.

While my expenditures on Taobao appear to be at an all-time high, its mostly on computer related items.

Still, its not all work, and I do get time to research random stuff on occasion whilst sourcing stuff.

This in particular caught my eye at first –

Its a little bit expensive for a toaster, as its a japanese import, so I took a look at the local varieties.

Having a sunny day is obviously affordable for the white collar worker, as can be seen from the pricing above.

But what about the blue collar workers?

…Why yes, they too can also have a happy day.

If Doraemon is not your thing, then what about a most probably unlicensed Pinnie the Wooh, cough, cough toaster?

No love for that?

What about this –

Lastly, because this *is* asia, yes, it does come in Hello Kitty.


I’m still looking for Jesus 🙂

Flattr this!

Once again, random browsing on Taobao brought the need for me to shop for random crap^Hstuff.

This time, I bought a USB eBuddy (for a grand total of 60RMB including shipping)

e-Buddy

eBuddy

The eBuddy is a small MSN / QQ physical avatar that performs certain actions based on its software – e.g. flashing lights, moving its wings, shaking left or right etc.

It looks like a little white angel with MSN color wings.

eBuddy

For a cheap toy, its actually quite cool. Cute too, but cool also.

Out of the box, its aimed squarely at Windows users. As I don’t actually run the devil’s OS, I hooked it up to a Debian box instead.
I was hoping for a little bit of fun integrating it with things, but that was not to be.
There is already a perfectly fine library written in Python that works beautifully to make it dance and sing* here

*Dancing and singing void where prohibited.

The python library is already set to run as a daemon on port 8888, and sits waiting for action out of the box.
The settings below snarfed from the code give an idea of what actions can be given:

Commands:

# GLADNESS =        00
# FEAR =            01
# FIZZ =            02
# PLEASANTSURPRISE =03
# GRIEF = 		04
# FURY = 		05
# QUELL = 		06
# REDHEAD = 		07
# GREENHEAD = 		08
# BLUEHEAD = 		09
# YELLOWHEAD =		10
# BLAME = 		11
# BLUEGREENHEAD =	12
# WHITEHEAD = 		13
# HEART = 		14
# WINGS = 		15
# BODY = 		16
# NOEFFECT = 		17
# ONLINE = 		18
# BUSY = 		19
# DAZE = 		20
# BACKSOON = 		21
# AWAY = 		22
# PHONE = 		23
# LUNCH = 		24
# OFFLINE = 		25

Mostly they consist of flashing various LED’s within the eBuddy on/off and optionally moving the wings or shaking the eBuddy left right.
Simple, but effective.

I use Zoneminder in the office on my Debian based ZFS NAS (HP Proliant Microserver), so thought one fun way would be to integrate the eBuddy to Zoneminder. This also proved to be too easy sadly.

Zoneminder has a wiki entry which gives 99% of whats needed here

I literally had to write 1 line of code to integrate the eBuddy with Zoneminder.

#!/usr/bin/perl -w

use strict;

use ZoneMinder;

$| = 1;

zmDbgInit( "myscript", level=>0, to_log=>0, to_syslog=>0, to_term=>1 );

my $dbh = DBI->connect( "DBI:mysql:database=".ZM_DB_NAME.";host=".ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );

my $sql = "select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != 'None' group by (M.Id)";
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );

my $res = $sth->execute() or die( "Can't execute '$sql': ".$sth->errstr() );
my @monitors;
while ( my $monitor = $sth->fetchrow_hashref() )
{
    push( @monitors, $monitor );
}

while( 1 )
{
    foreach my $monitor ( @monitors )
    {
        next if ( !zmMemVerify( $monitor ) );
 
        if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor->{LastEventId} ) )
        {
            $monitor->{LastEventId} = $last_event_id;
            print( "Monitor ".$monitor->{Name}." has alarmed\n" );
	    #The Single Line of Code - it sends a flash green signal to the Python Daemon
            system ("echo 8 | nc -q0 -u localhost 8888");
	    #
            # Do your stuff here
            #
        }
    }
    sleep( 1 );
}

I think I’ll be getting a couple more of these, as the integration is easy.
Next up, server load monitoring – I can have a couple of these on the top of my desk for each server, and hopefully address each one separately for load purposes – e.g. flash yellow, red on load average, and shake if queue’s are large.
Gimmicky, but useful.

Here are a couple of shots of the current incumbent in situ –

eBuddy

…and one of it actually working.
(It flashes green if someone comes up the stairs and zone minder triggers.)

eBuddy

I’m quite happy I spent the 60rmb, although I would have enjoyed more hacking. I literally spent 5 minutes getting things running.
Thats not a bad thing, but I was hoping for something a little deeper!

Going to order a few more now.
I got mine here – http://item.taobao.com/item.htm?id=1799393549

Recommended.

Flattr this!

As its been a long while since I’ve done a non computer related post, its now time for something completely different.

Anyone who has visited our office has noticed that we receive a bazillion packages daily from my various shopping exploits on Taobao, slayer of money.

I just bought a new house back home, which has started competing with Taobao on the where do I spend my spare change, and I’ve been interested in decorating it with some “art”.
Yes, I know that one persons art is another persons ‘meh – you like that? icky’, but each to his own.

I found a gorgeous looking hi-res map of Shanghai for sale at one quite nicely designed store ( http://www.image1000.cn/ ), and contacted the seller.

Unfortunately he couldn’t sell the canvas image on a roll, as I needed for easy shipping back home, and could only sell pre-framed.

Roll on two weeks later, and I was still thinking about having that in my lounge back home, so decided on making a test order to check out the packaging, and its survivability vs Shanghai kuaidi (delivery) companies.

I picked a minimalist dot version of Mao for 100RMB including shipping, and ordered.
Two days later, Mao arrived.

Unpacking below:

Mao
Fresh from the Kuaidi company!

Mao
Nice packaging touches.

Mao
Uh oh!

Mao
Still well packed.

Mao
Kuaidi vs Packaging, who will win?

Mao
More uh-oh..

Mao
Packaging wins (although it was a close call).

Mao
Phew, looks ok.


Inside packaging (really really well packaged!)

Mao
Even comes with the hanging equipment, which is a nice touch.

Mao
So much attention to detail (plastic cover strip for acrylic front frame “glass”)

Twister^H Mao
Its Twister!

Mao
Oh wait, no, its Mao 🙂

Mao
Amjellybaby models the artwork.

Mao
Finally, in situ!

Overall, reasonably happy with this. Price is reasonable, and it (barely) survived the shipping company, so I think there would be a chance that a slightly better packaged version (i.e. adding a few layers of bubble wrap on the outside) will survive.

So, looks like I’ll be springing the 900rmb odd for the large canvas map version.

Wish me luck!


Addendum

Ordered the large triptych and crossed my fingers that it would survive Emirates.
It made the journey in better shape than the Mao print above did across Shanghai. No dents and zero issues.

Here they are in my new house, awaiting hanging…

Shanghai triptych

Shanghai triptych

Pricey at 900rmb, but worth it. Now I can point at locations on the satellite image and tell people I was here when they come visit the house!

2nd Addendum – final shot of this in place, finally on the wall after 2 weeks of sitting on the floor…

Jul
24

Train Safety

Flattr this!

The recent accident in Wenzhou has highlighted some of the issues that are present in train systems today.

The facts –

One high-speed rail train D301 from Beijing was headed for Fuzhou, this train was followed by train D3115 from Hangzhou to Fuzhou. At 20:34 or so, the train D3115 was hit by thunder, subsequently lost power and stopped.
Train D301 did not, and crashed into train D3115.
Two cars from train D3115 as well as four cars from D301 derailed, some falling off of a bridge.

The trains are from different manufacturers –
D301 – CRH1 (Bombardier Regina, Swedish)
D3115 – CRH2 (Shinkansen E2, Japanese)

Read more »

Flattr this!

As the law has changed regarding pet dogs in Shanghai (again), here are the steps to get your dog licensed.

The new rules state that people can only own 1 pet per household from now on.
The only exception to this is where you had more pets previously licensed in your household; you can continue to renew their licenses, but not add new dogs.

Note that the instructions below are for Xu Hui District, but are similar for other districts.

I suggest buy a plastic file, and keep all related paperwork together.
To succeed in this mission, you’ll need patience, some cash, and some kind of canine.

Ouch that hurt! aka vaccinations

Bring
Dog
Money (few hundred rmb).

In Xu Hui district (also would be ok for other districts), this is the large pet hospital at 2451 Xie Tu Lu
带狗去斜土路2451号打疫苗

You’ll need to ask for a “gou yi miao ban zheng” 办理狗证续证

The dog will get a vaccination shot, price for this varies depending on which vet you visit, but should be less than 100rmb.
You’ll also get a piece of paper. This is called a da zhen ping zheng. This is important, don’t lose it!

If your dog has never been licenced before, you will also need to get an id implanted too.
This is a small rfid tag that gets injected somewhere around the neck area.

This will also cost somewhere in the less than 100rmb range.
You’ll also get a piece of paper for that, again, don’t lose it.

If you don’t have the magic piece of paper, have the vet make another one for you. China runs on small bits of paper that are easily lost, so make sure that you have anything you possibly may need in a folder.

Lastly, don’t forget to get an official fapiao for the above, and keep that together with everything else.

The Joy of Paperwork! (at your local neighborhood police station)

Bring
The rental contract for where you live (or a property ownership book if you own your apartment).
Your Passport (with your work permit / residence permit inside).
The 2 or 3 papers from the vet that you got in step 1.
Your dog.
More money (500rmb)

In Chinese that looks like this – 带上狗证,房产证,护照去徐汇区湖南派出所登记
Take all of the above to your local police station.
(Not all do licenses, but they’ll be able to point you to which one in your district is responsible for doing dog licenses)

In Xu Hui district this is on Xiang Yang Lu, near Fuxing road (opposite the fake electronics mall)

    电话:23037446
    办公时间:8:30am-5:00pm
    地址:襄阳南路203号靠近复兴中路( Xiangyang Nanlu 203#(Near fuxingzhonglu)

Give them all the paperwork you have so far, and 500RMB.
They should give you another slip of paper with a receipt, and a date to come back.
OR they’ll do it all there and then.
This depends on your districts setup.

Success!

Whichever of the above, at some point you’ll collect a pack of goodies!

This will include a dated sticker (this should be stuck on your door)
A Dog licence photo id card (this should be carried whenever you walk your dog).
A dog tag (which you should put on your dogs collar).
Plus some other assorted bits and pieces depending on which dog food company is sponsoring the gifts (last year was a bowl and some dog food).

I usually make copies of everything, and put into that file I told you to make in step one, and throw it into a safe place.

Currently you don’t need to bring photo’s, but from the 15th of June 2011, you’ll need to bring photos.
One side view, and one front view of your dog, in passport photo sized (1×3″) shots.
This was immense fun last time I tried to do this, as my dog doesn’t want to sit still for photo’s, and it took a while to get that done.

At time of writing this is all currently correct, but rules change (eg the we’re not sure about the photo’s thing yet), so have a chinese person call, and confirm first. Make sure that they ask for a clear answer that you understand, as its not unknown for people in China to forget to tell you about some essential item you need to bring, so ask clearly for what exactly is needed, and have them repeat it out to you.

Good luck!

Flattr this!

As I’ve been doing a bit more hardware stuff recently, I thought I’d get some more tools.

Yes, Taobao is wonderful 🙂

I already have a scope – the eminently hackable Rigol DS1052e 50mhz (now running at 100mhz cough).
I already have a bench PSU.
I also have a JTAG device (although its a chinese clone, but hey, it works).
… and I also have a whole bunch of ttl -> rs232 adaptors (as they fry when you’re not careful).
I also have a 3d printer 🙂
I also have a few Arduino bits and bobs, as well as some much more capable ARM dev kits (which I prefer).

What more could I want?

Well, a bus-pirate – but Seeeeeeeeeeed studio still haven’t gotten their sh*t together, and I can’t seem to order from them.
Grumble. Tried again today, but my credit card is rejected as usual. Works on every other site, but theirs..
Still, whilst checking out Seeed Studio’s blog I noted that they mentioned Shanghai (finally!).

Apparently, there’s a hardware hacker dev lab *right* by where I used to live.
They’re up on 50 Yong Jia Lu / website is – http://xinchejian.com/.
I still can’t believe I hadn’t heard about them.

Also slightly annoyed that I missed the last few open days they had.

Going to have to go visit after CNY, and make some friends there 🙂

Lawrence.

Flattr this!

Although I was supposed to be on a plane today heading home, I did something silly and got the dates wrong.
So, after a nice scenic trip yesterday evening to the airport and back, I get to do it all over again tonight.
Although that was a total pain, I did get to spend another day in Shanghai, and luckily enough, it coincided with the new Apple Store opening in the IFC center over in Pudong.

Overall impression – this is good!
I spoke with a number of the staff, and talked about the usual issues here (service, service, service…), and they were all quite understanding, and Apple’s genuinely trying to improve on things – hence their own store, and support in Shanghai (finally).

Shanghai has the biggest Genius bar in the world now. Unfortunately the store is a bit lacking compared to others in Shanghai – no iPad, no iPhone (other than the official one), but they do carry software and iMac’s / Laptops in lots of configurations.
I know where my next iMac is coming from 🙂

Downsides of the store – the moat outside is going to claim lots of victims. Its so subtle that you miss is – who’s idea was that?
We already saw unhappy victims with wet feet while we were leaving. I expect that to be changed in the near future, or the store will have to provide a shoe drying facility!

I also had the only iPad in the store (and possibly China at that point) that could play flash. Ok, there were only 2 iPad’s in the store, but still.. 😉

Photo’s of the store on flickr, which I would upload, but China is being finicky again. Grrr
Should be on the sidebar though.

http://www.flickr.com/photos/sheedl/sets/72157624448891934/

Flattr this!

When DNS goes bad

This year someone in China misconfigured something which effectively exported China’s main method of implementing blocks (man in the middle DNS spoofing) semi globally over the Global Crossing backbone for the last few weeks.

Effectively, China’s blocking, went global (for certain providers).

Read more »

Flattr this!

Currently I have an iPhone (ancient 2G), and have just bought a Dell Mini3i (600RMB with an 18month contract @ China Telecom), as I donated my 3G iPhone to one of the extended family back home.

The Mini3i runs an Android variant called OPhone.

The 3i is a little underwhelming software wise.

Its quite crap at the moment as its sitting on Android 1.0 (OPhone 1.0), but for all intents and purposes Android = Ophone its pretty much the same underneath.

There are a bunch of similar phones to this – the Lenovo O1, LG GW880, Motorola something or other (can’t be hassled to go look) etc.

While I haven’t rooted mine just yet, I have been playing around, and reading the Chinese forums.

Boot loader appears to be similar on all the devices – its made by BORQ’s in Beijing, and appears to be quite basic.

Motorola and O1 seem to have the best support for now, the main problem in the Chinese forums is people bitching about being stuck on older versions.

Some are running 1.6, most on 1.5, and the unlucky few 1.0 “Ophone”
2.0 and 2.1 has yet to hit the mainstream here.

There are people with N1/G5’s (Nexus 1 / HTC G5) on 2.1 though (yes, thats you in Beijing Tom!), pretty much any phone is available, although anything with wifi is essentially grey import from overseas (HK mostly)

Back to the phone –

Thankfully you can install any apps as apk’s, no need to hack for that – so its fairly easy to get info on the innards.

RootExplorer is your friend 🙂

RootExplorer also allows you to remount partitions r/w, so root access is fairly easy too. There are precompiled su binaries for 1.5 out there, although I’ve yet to do my phone.

The Dell mini3 is running on a Marvell Tabor. Fast chip, nice touchscreen, decent resolution, just crap on 1.0.

Firmware files for most of the “ophones” (except motorola) are mff files.

The mff files appear to just be compressed images with instructions for how to write the various partitions out.

eg the Lenovo O1 mff has this in the “mff” zip

2010/02/25 10:53 147,111,936 factory_CHERRY.fbf
2010/02/25 10:53 249 factory_CHERRY.mff.mlt
2010/02/25 10:53 364 JADE_EVB_RawNANDx16.ini
2010/02/25 10:53 327 magic_fbf.ini
2010/02/25 10:53 2,692 magic_fbf_inner.ini
2010/02/25 10:53 10,236,719 mfw.pac
2010/02/25 10:53 54,180 MHLV_NTDKB_h.bin
2010/02/25 10:53 176 MHLV_NTDKB_TIM.bin
2010/02/25 10:53 858 NTIM_td.ini

magic_fbf_inner.ini has the layout

[INTEL_FLASH_DEVICE_INPUT_FILE]
Number_of_Images=24

[IMAGE_HEADER_0]
Start_Address=0x240000
Image_Length=0x40000
EraseBlocks=1
WriteImage=0
VerifyWrite=0

[IMAGE_HEADER_1]
Start_Address=0x6900000
Image_Length=0xf00000
EraseBlocks=1
WriteImage=0
VerifyWrite=0

(etc)

Different phones have different firmware writing software, the Motorola’s are using RSDLite, LG – SML_OMS, CTHall, others something homegrown called Firebolt, which is written by BORQS. I have all the firmware tools already, despite the Ophone8 forums lack of courtesy in sharing, grrr.

Most firmware tools appear similar though functionality wise.
Haven’t played around inside the phone yet to see if its easy to get jtag access, although that was mostly because i couldn’t work out how to remove the top part without breaking it.

If anyone wants more info, or a firmware dump let me know.

Hopefully there is some interest out there in the English speaking world for these!

Flattr this!

As I’m currently in the airport, waiting for a flight back to the UAE, I thought I’d share this small snippet of transparency vs secrecy.

As most China users will know, there is no official agency that “blocks” websites. In fact, most of the time, the government states that sites are not blocked, despite fairly obvious proof to the contrary.

China typically asserts that “connection resets” to sites like Facebook and Youtube are just network issues, despite those network issues solely appearing at the ip addresses associated with the government firewalls at the gateway routers to overseas.

Here in the UAE (Dubai), the government still blocks, but at least they’re upfront about it:
See below for an example of a blocked site

Why is this important?

Transparency is a big problem for western entities doing business in China. As with the recent Google PR stunt/debacle, most companies have no real mechanism for dealing with arbitrary judgements for / against things that affect their business.

A clear and transparent mechanism for dealing with why sites are blocked, coupled with a delisting mechanism would be a good place to start. It would also help to defuse the detractors against censorship – although most countries censor, China is one of the usual scapegoats picked on.

Maybe if China implemented a what (was blocked) / why (it was blocked) / how (to get unblocked) system, detractors would have less to complain about.

Lawrence.

Archives

Categories

Tags

PHOTOSTREAM