Support

Blog

Browsing all articles in Uncategorized

Flattr this!

I bought a Phicomm R1 Speaker for 150RMB delivered, its supposed to have Wifi and a config app, but the App registration is apparently broken.

The Phicomm R1 speaker has Android installed, unfortunately the configuration app for the speaker is no longer working as noted, so you can only use Bluetooth unless you hack it (Bluetooth is available via a triple press of the top button).

For some crazy reason, the speaker has a fairly decent cpu, and is running Android (albeit without a display, which is annoying, but not completely unfixable); we can connect via adb.

Download adb tools here – https://www.xda-developers.com/install-adb-windows-macos-linux/ and stick in your path.

Set the speaker to Wifi (long press of the top button), and connect to the Phicomm_R1_xxx network.

Mine setup a network on 192.168.43.0/24, with a gateway of 192.168.43.1

adb connect 192.168.43.1:5555

adb shell ls -al

drwxr-xr-x root     root              2016-01-21 16:50 acct

lrwxrwxrwx root     root              2016-01-21 16:50 bcm4329_cybertan.hcd -> /etc/bluez/bcm432x/BCM4329B1_002.002.023.0389.0000_Cybertan-Foxconn_Cls2_extLNA_EDRmaxInputLev+PeakDEVM_NT.hcd

-rw-r--r-- root     root       148936 1970-01-01 08:00 rk30xxnand_ko.ko.3.10.0

drwx------ root     root              2018-04-28 10:50 root

-rw-r--r-- root     root       252134 1970-01-01 08:00 vcodec_service.ko

lrwxrwxrwx root     root              2016-01-21 16:50 vendor -> /system/vendor

Yup, that worked!

Ok, so we can see the thing at least! Lets get some screen viewing software installed. I’m on OSX, so its a simple brew install..

This seems to work reasonably well – https://github.com/Genymobile/scrcpy

brew install scrcpy


#load ADB first as above on the default unconfigured wifi ip
adb connect 192.168.43.1:5555
scrscpy

You should now be able to see the device display, and the internal app called Pandora. The pandora app is a rather useless one – it basically doesn’t work. So ignore..
We need to install other tools.

#allow any app install
adb shell settings put secure install_non_market_apps 1

Next up, configure wifi on the thing!

#install adb wifi tool
wget https://github.com/steinwurf/adb-join-wifi/releases/download/1.0.1/adb-join-wifi.apk
adb push adb-join-wifi.apk /data/local/tmp/adb-join-wifi.apk
adb shell /system/bin/pm install -t /data/local/tmp/adb-join-wifi.apk

#change YOURSSID, and YOURWIFIPASS as appropriate..
adb shell am start -n com.steinwurf.adbjoinwifi/com.steinwurf.adbjoinwifi.MainActivity -e password_type WPA -e ssid YOURSSID -e password YOURWIFIPASS

It will hopefully setup the wifi. You’ll need to wait for it to ‘timeout’ and tell you wifi setting failed; it will then connect to your normal wifi as set above.

Once on your ‘normal’ wifi, you can adb connect again to the normal ip.
I installed airpin.apk to setup Airplay, now I can connect to the speaker in iTunes, and play. Good enough!

It can be downloaded here – http://www.waxrain.com/product_en.html
Install in a similar manner as other apk’s, then use screen mirroring to config the name.
I called mine phicomm

#copy and install airpin APK
adb push AirPin.apk /data/local/tmp/AirPin.apk
adb shell /system/bin/pm install -t /data/local/tmp/AirPin.apk
#run the screen mirroring to configure directly on the device
scrcpy

You can go further and remove the Xiao Xun (小讯) listening software, and install something else, but I haven’t bothered (yet). Mine is still unconfigured.
This is detailed in Chinese over here –
https://www.right.com.cn/forum/thread-855587-1-5.html

Flattr this!

The mail software has been completely revamped to support additional security precautions.

Failed logins will be blocked by ip address for 1 hour. (5 fails to trigger a 1hr block)

Senders can only send mail from their authenticated email address.

Outgoing mail is now also inspected for spam, if tests fail, sending will fail.

DKIM signing is now possible, we are in the process of implementation and testing.

SSL connections are now set to a minimum of TLS1.2 and 2048bit encryption, as per internet standards.

Support for connecting to servers still using old insecure protocols has been deprecated (i.e. not supported anymore).
The protocol insecurity issue is explained in more detail here –
https://weakdh.org

This has impacted some deliveries to outdated servers, which still use outdated software.

We can resolve these issues on a case by case basis if you forward support the relevant bounce messages.

If you see bounce messages with errors similar to this –
SSL routines:tls_process_ske_dhe:dh key too small;
SSL routines:ssl_choose_client_version:unsupported protocol;

The recipients server’s SSL key setup (the key they use for encryption for their mail server) is an issue.
Their keys are too small, and vulnerable to eavesdropping, and ideally need to be updated, as their communications are vulnerable.

 

Apr
30

Cert updates

Flattr this!

Certificates for *.computersolutions.cn have been updated to use letsencrypt from April 2019 onward.

Flattr this!

Despite having friends that have broken limbs skateboarding, I decided to buy myself an Electronic Longboard.
I’m still a kid at heart, despite my ongoing age…

Screen Shot 2015-09-18 at 10.11.00 AM

The board I chose to buy is what looks like a copy of the Boosted Board. The design is different though, but its close enough to look like a copy of sorts. Mine is from a company called BenchWheel out of Hangzhou, and although mildly expensive, isn’t too bad in Electric Skateboard pricing terms, especially in comparison to the similarly specced Boosted board at $1499.

I was originally planning to get the Stary board, as its made in Shanghai, and I was watching their Kickstarter, but sadly they don’t seem to want to sell it locally.
So, I scanned Taobao for similar products, and decided on the BenchWheel, as it looked reasonable quality-wise compared to the other options.

BenchWheel is currently available on Taobao for 2899RMB (about 450$USD odd at this moment in time)

They have 2 models for sale – the B board, which is a standard longboard, and the C board, which is a skinnier board at the ends.

Screen Shot 2015-09-18 at 10.11.45 AM

I bought my BenchWheel on Monday, had it delivered on Wednesday (the magic of Taobao), and have been riding it for a whole 2 days now. I’ve never ridden a skateboard or longboard before, and I’m finding it very easy to ride. I’m already comfortable using it on the road for short trips in light traffic here in Shanghai. Took me about 5 minutes to find my balance, and after about an hour riding around my compound avoiding pedestrians and small rodent sized dogs I felt comfortable enough to take it outside on the street with the bigger traffic.

So far I’m quite happy with it. Top speed is faster than I want to go still, and the battery life is quite decent @ +-20km. The entire bottom length of the board is essentially battery.

Having played with most of the things available here, from e-scooters to airwheel’s, I think a Longboard is the most fun/ practical in daily use, especially for last mile from metro -> home.

All in all, it feels like a decent quality item. The parts are solidly built, and it doesn’t feel like cheap crap.
I haven’t tried a Boosted board or other US brand boards though, so can’t compare to those, but I do know what cheap crap feels like, and this isn’t that.

Some notes on using it
The BenchWheel has a carry handle, but I think there needs to be something smoother around the handle as the sandpaper gets rough.
Its light enough to carry short distances, which is good.

Remote control feels comfortable to use. The speed acceleration is good – its not crazy from stopped, it feels like they ramp up in a curve rather than giving you full throttle immediately. Braking on the other hand feels like they give you too much – you need to be more careful braking as its almost too fast on the controller.

Controller could do with some labelling, there are way too many leds that show different colors (red or green).
The bottom 3 show board battery status. The top two are speed allegedly, although they do flash when the board isn’t sync’d.
The remote and the board time out if not used and left on. The lights stay on, but the remote does nothing. Turning both off then on again resolves that. Looks like it does that when left 3-5 minutes unused. I’ve already hit that once or twice tonight talking to people about the board and not using it for a few minutes, then it doesn’t want to work.

My manual is in Chinese, and the instructions are not very clear – I had initial issues syncing the remote with the board despite reading the instructions, and repeating the steps a couple of times.
Their online support was good (aliwang), and I resolved it, but the manual needs to be much clearer.

I’ve actually had a go at making a better english manual here – http://computersolutions.cn/downloads/benchwheel/

I’ll re-iterate, this is really fun to ride. I’m actually excited to go out and ride around, which is good.
I’ve also been quite lucky in that I haven’t fallen yet. Having a brake and not going too fast helps a lot, as you can just jump off if you feel like falling.

Some tech details
N5065 270KV motors x 2 – Not sure what brand, haven’t opened it up yet.
Batteries in a 6S 4P (22.2V nominal @ 6 x 3.7V/ 25V peak/ 20v get off the board before you kill the batteries 😉 ) config using 18650’s @ 8800MAH / 210WH
Wheels are 80x45mm 78A hardness
Board is 920x240x15mm
7.9KG total weight.
Has a carrying handle cut out in the board (useful!)

Dual motors @ 1800W

Expanded view
Screen Shot 2015-09-18 at 8.59.16 AM

Underside view
TB278_6eXXXXXawXXXXXXXXXXXX_!!25106345.jpg

Whats missing
It feels like a strong version 1.0
That said this is whats missing:

    • Lighting – they need to add underlighting to the board (they actually came out with some the day after I bought mine, grr!, so will be adding mine when it arrives in my next taobao shopping order).
      Carrying handle – great idea, but the board sandpaper surface chafes, so it needs some smoother tape around the handle area.
      Design – There are tons of cool skateboard designs. BenchWheel have completely ignored that and gone with a horridly bad logo font choice and rather basic and bland black board color. This totally needs some work. Luckily you can buy cool stuff on taobao, so thats a fairly easy remedy.
      Packaging – Very white box. Mine actually came slightly damaged, although the board was fine. They need to work on that.
      Battery indicator – The Marbel board has a battery indicator on the board. They need to add something either on the top of the board, or underneath the board with a bar for charge value like you get on electric mopeds and scooters. I might mod mine to add that, as thats fairly easy to do. There is a battery indicator on the remote, but its not too accurate / useful.
      Manual – the existing one isn’t so clear on a few things, even in the Chinese manual.
  • Some action shots below.

    20921767554_59ae162d35_k

    21356686058_7bec4abf8a_k

    21356301820_795dd6d824_k

    20923405313_3799292a18_k

    Full set on Flickr

    Video:

    Flattr this!

    Screen Shot 2013-05-26 at 2.59.04 PM

    As I have an invested interest in consistent electricity back home (see my other recent post on Solar for details) and have been in discussion with the council about net metering and grid tie, I’ve been doing quite a bit of random reading regarding electricity distribution and its various facets.

    Not many of us know that the power company / municipality also uses in-line signalling (aka ripple control) to implement power control and load shedding, so I thought I’d do a little writeup on that.

    Many of us have noticed that streetlights don’t always come on, or go off when its light or dark – they appear to be on a timer system.

    What most people don’t know is that the timer system controls are actually implemented centrally at substations, and these add signals to the power lines to tell the equipment to turn off / on when instructed.

    This is done using ripple control codes.

    With ripple control, a small signal is added to the incoming A/C at a distribution location – eg a substation. This signal is read by a special relay in place on the larger circuits (typically the Geyser), and turns power off or on when the electricity company requires – usually when power is scarce, and they need to shed some load.

    As this signalling can work on multiple channels, each listening relay can be set to listen to a specific channel, and used to power specific things on / off remotely (e.g. Streetlights).

    In South Africa, we use DECABIT signalling to tell things to turn off and on, as well as the older K22 signalling standard.

    When load shedding needs to occur, the electricity distribution system needs to act fast to avoid system failures. Most things are automated, and happen in order of timing.
    Implementations of the protection mechanisms in place have a specific time to occur – eg a latency. Responses to conditions also have a latency – eg getting additional idle power plants online to provide more power when needed, so its important to the grid to have multiple control and response mechanisms to respond to loads. Each response mechanism also has a different cost impact, so its also important to the electricity provider to best manage these.

    A diagram of this is below (Excerpted from http://www.anime-za.net/tech/literature/Enermet_Farad.pdf ):

    Screen Shot 2013-05-26 at 3.44.21 PM

    For light variances in load, frequency changes as generators speed up or slow down to supply enough electricity to the supply. If there isn’t enough supply to meet load, then frequency drops, and large scale equipment will disconnect until load decreases. This happens almost instantaneously – responses to these issues resolve with a latency of within a few milliseconds to a second. This is called Under-Frequency Load Shedding (UFLS).

    Screen Shot 2013-05-26 at 3.38.27 PM

    As seen in the diagram above Eskom implements automated under frequency load shedding in an increasing percentage margin based off frequency rates.

    (Additional details are in the PDF below)

    http://www.systemoperator.co.nz/f3210,36010947/Appendix_A_-_A_Collation_of_International_Policies_for_Under_Frequency_Load_Shedding.pdf

    The next set of load shedding is the one we’re interested in – ripple signalling. If the system still has too much load after 1 second, then it sends out a signal over DECABIT to turn off more equipment. DECABIT signalling has a latency of about 7 seconds – a minimum DECABIT signal frame is 6.6 seconds, so this is a second stage response to issues.

    As each substation can be connected to up to 20,000 homes/customers (depending on substation load capacity), this allows localized load shedding where its needed, when its needed.

    Eskom calls this Demand Market Participation, and has roughly 800MW of systems added into this mechanism. Municipalities are particularly keen on putting loads onto these mechanisms via DECABIT compliant relays, as this saves them peak power fee’s when loads are high – if they can temporarily cut off power to consumers for 10 seconds – 10 minutes for non-essential high loads, then they can substantially reduce what power costs them from Eskom, and make additional profits.

    A good writeup on Demand Market Participation is below:

    http://www.enerweb.co.za/brochures/AMEU%20Conference%20-%20Enerweb%20VPS%20Paper%20-%20201109%20-%20%20V1.0.pdf

    Eskom benefits as they can temporarily avoid adding more infrastructure to cope with growth.
    This has been the case for a few years now, but it only delays the inevitable – you do need to invest in infrastructure, not incentivize clients to use less.

    Eskom also has a secondary mechanism (using the same theory – lets encourage you to turn off power) called VPS. They have an additional 50,000MW of connections using this on a contractual basis – typically industrial users., and are looking to increase this number.

    Its only been through introduction of these mechanisms that we’ve been able to stave off grid collapse. Its gotten so bad, that industrial users have been looking closely at what they can do to provide their own power when Eskom can’t.

    Other countries – notably Germany, and the UK, have allowed consumers to become producers, by encouraging localized small scale production of electricity, thus helping the grid without requiring additional investment from the incumbents. This is called net metering – where both inputs and outputs are metered.

    Eg – if you have a solar system that provides excess power during the day, it can feed into the grid – (when it needs it most), and they’ll credit you for your participation.

    So far, South Africa has been rather reticent to implement this, as the short sighted vision is that its “stealing” from the incumbents profits.

    A choice excerpt from that PDF is this –
    Residential load can also be incorporated within the VPS, particularly when integrated with Smart Metering systems. Numerous pilot and small scale projects are being undertaken within both Municipalities and Eskom in response to the DOE’s Regulation 773 of 18 July 2008.

    The Department of Energies regulation can be found here –
    http://www.energy.gov.za/files/policies/Electricity%20Regulations%20on%20Compulsory%20Norms%20and%20standards%20for%20reticulation%20services%2018Jul2008.pdf

    These state that all systems over a certain size require that smart metering be installed by 2012. As you may have guessed, quite a few municipalities have not met this deadline, and Eskom has been dragging its feet on that too.

    Ironically, introduction of smart metering would actually help the grid here in South Africa, as IPP’s (independant power producers) would make the grid more stable by providing additional energy when needed, and at a lower cost than the incumbents can create it for.

    This however does have its issues – most municipalities generate revenues from Electricity, and so are loath to change the status quo, even when it would benefit the country from a whole.

    So, its unlikely to be implemented in the short-medium term, unless the government drags them kicking and screaming through the process.

    In summation, this –

    486837_586695331355335_1633072872_n

    Lawrence.
    ———

    References:
    http://en.wikipedia.org/wiki/Zellweger_off-peak
    http://www.anime-za.net/tech/ripple_index.html
    http://mybroadband.co.za/vb/showthread.php/134334-And-so-I-have-proved-the-ripple-control-system-is-buggered
    DECABIT Ripple Signal Guide
    Thesis on the financial implications of relaxing frequency control as a mechanism.
    http://www.energy.gov.za/files/policies/Electricity%20Regulations%20on%20Compulsory%20Norms%20and%20standards%20for%20reticulation%20services%2018Jul2008.pdf – DoE Regulations
    http://www.enerweb.co.za/brochures/AMEU%20Conference%20-%20Enerweb%20VPS%20Paper%20-%20201109%20-%20%20V1.0.pdf – Demand Market Participation
    http://www.systemoperator.co.nz/f3210,36010947/Appendix_A_-_A_Collation_of_International_Policies_for_Under_Frequency_Load_Shedding.pdf – Load Shedding in International operators

    Flattr this!

    First my tale of woe:

    I just got burgled back home, and they took two of my laptops. One was a small hackintosh Mini9, which I’m not too worried about, but the other was a top of the line IBM Thinkpad which I’d just donated it to my cousin for his studies.
    Sadly we didn’t have insurance, and the likelyhood of getting it back is close to zero. I will be watching Gumtree closely though for the next few weeks!

    As anyone who owns a laptop can tell you, the most worrying things to worry about are:

    The dreaded coffee spill
    (only 1 client this month – get those keyboard… er… condoms!)
    The whoops I dropped it, now my hard drive is dead / screen is broken
    (Too many to mention, you do have backups right?)
    and the most dreaded of all…
    The oh @#$! I left it in a Taxi. Or if you live in South Africa – someone affirmative actioned it..

    While #1 and #2 are relatively easy to recover from (albeit costly), #3 does pose issues.

    There are solutions though.

    One such solution is one I’d suggested to my brother to install prior to the theft – install Prey. Unfortunately for me he hadn’t done it, doh!

    Prey (http://preyproject.com/) is an elegant solution to hardware protection.
    Its an install and forget free service that tracks up to 3 computers (more on a paid basis).

    How does it work?

    You install the Prey software on your computer, and signup for an account (all part of the install).
    Their software then silently runs in the background. There are zero options to set, just install, and setup a user account.
    Its really set, and forget.

    Nothing happens until the computer goes missing – then you can choose from a variety of different useful actions, ranging from taking a photo of the person using the computer (assuming like most laptops these days it has a built in webcam), to monitoring what they’re doing by taking snapshots of the current screen. This is all done silently without the thief knowing that its going on.

    This is great for catching them on Facebook, uh Kaixin001 and spotting their user name.

    Below is a view of the logged in screen for my current laptop

    The modules page shows the list of items I can turn on when needed.

    The useful ones will be the webcam, and session photo captures. Geolocation is a crapshoot in China, and having the IP info is pretty useless here unless you know someone at China Telecom.

    Hopefullly this will be one piece of software that I never use 🙂

    Highly recommended for those with expensive equipment that moves around.

    Flattr this!

    One of our clients has a large eLearning website that we maintain.
    They’re based out of Bangkok, so they flew me up for some onsite work, part of which culminated in this plugin here.

    eFront is a Learning Management System, similar to Moodle.
    Its billed as a User Friendly Learning System, although having used it, I’d say thats a bit of a white lie! 🙂

    More on eFront here – http://www.efrontlearning.net/

    eFrontWPI Plugin Overview

    This plugin provides single login functionality for WordPress / BBPress and eFront

    It will optionally create an eFront user if one does not exist (option to set this in plugin settings).
    For login to function the WordPress user and password must be the same as the eFront username and password.

    Plugin is based on the v1 api provided by eFront. Should work with v2 also.
    To use the v2 api, simply change the eFront URL to the appropriate URI

    IMPORTANT NOTE:
    This plugin requires cURL (php5_curl) to be installed as a pre-requisite.

    Instructions

    Upload this folder into your wordpress / bbpress plugins folder.

    Typically ->
    [your wordpress folder]/wp-content/plugins/

    Activate plugin, then go to eFrontWPI Plugin Settings, and enter the appropriate data:

    * eFront URL should be the full URI for the eFront API on your server.
    eg
    http://www.yourservername.com/eFront/www/api.php
    or
    http://www.yourservername.com/eFront/www/api2.php

    * Admin Login
    The eFront Admin user (suggest create a user for the API to use)

    * Admin Pass
    The eFront Admin user pass

    * Create User checkbox
    Check if you want a user automatically created.

    * Current eFront token
    This is a read only field which shows the current eFront API token (if any).
    This is a good way to check if the plugin is working – if you have a token, it should be working.

    Download here – eFrontWPI v1.0

    Flattr this!

    During the research into LCD updating on the T6x IBM’s, I learned a few new things.

    One of those was that I had some of the parts lying around the office necessary to make a projector.
    As my office desk typically looks like a mad scientist uses it, I thought I may as well add some more goodies to fill the missing bits.

    First up was an LED light off taobao. As the 100 watt ones are still a little pricey, I’m going with a 50w one for testing purposes.
    Visitors to the office who still have LED driven holes burned into their retina’s agree that yes, it is quite bright.

    Probably not bright enough for our purposes, but good enough for testing.

    Some photos of that here –

    The hokey CPU fan cooler hooked up to the back adds to the effect.

    The LED comes in a variety of color temperatures, ranging from yellow white, pure white, through to blue white, we chose pure white, as thats closest to what they normally use in projectors.

    Projector and fan came to about 400rmb including shipping. Seller was quite nice to deal with too, and advised us which would be best for the purpose.

    Now that our lighting requirements were minimally in place, we looked at the next requirement.

    LCD screens.

    As the 2 or 3 people that read this blog are aware, I just bought some rather nice QXGA LCD’s. These would be quite nice to use for a projector, but, unfortunately, getting hold of controllers for them is a little bit harder than I thought it would be.
    I did manage to find some, but the prices are a little high, so I put that on the back burner for now. I will be looking into that again in the near future though.

    First, a little detour onto the subject of LCD’s.

    Essentially LCD’s are mass produced these days by a small handful of manufacturers, and the controllers for LCD’s are also mass produced.
    Controllers pretty much come in a few different capacities, but essentially they’re all the same featurewise.
    You buy a controller based on the maximum resolution it can handle, then program it for the LCD you have.

    Controllers are dirt cheap – most can be found for 20rmb low end eg SVGA, through to 120rmb for medium end – eg 1920×1200 /DVI+VGA.
    This means that most laptop screens can easily be reused as desktop screens for reasonably cheap prices.

    TV’s are also essentially exactly the same as screens now, so the hardware is exactly the same.
    Controllers for TV are usually a little more expensive, but not overly so. I bought a multi-input (HDMI, VGA, Tuner etc) with USB for 200rmb.
    Different chipsets do better jobs at HD, but its very very generic stuff these days.

    You need an invertor board for the lighting (if its not an LED based LCD) – those go for 10-20rmb.
    You need a controller card to drive the LCD. (Most sellers will make you a cable for your specific LCD, and program the controller for a minimal charge)
    You need a power supply (typically 12v 3amps+-).
    Lastly you need a case.

    We gave this a test run with a salvaged a 14″ LCD from a hosed laptop.
    We bought a controller board (20rmb), power supply + empty screen casing (130rmb) off taobao. While it wasn’t necessarily worth it to do that, we did learn that its fairly easy.

    Programming controllers is also pretty straightforward, but I’ll probably expand on that in another post.

    As I wanted an HD capable projector I looked at what the smallest size HD screen (WUXGA) available on the market today is – that happens to be the Samsung LTN154U1
    I got mine for about 500rmb.

    Most people will be wondering right now at this point how an LCD screen is going to be used in a projector.

    Essentially LCD’s are transparent – an LCD screen typically comes sold ready to use. This means its shipped with lighting built in, plus a reflective back surface.
    We’re going to need to denude the LCD off all that – I’m going to have to disassemble the LCD display, and take out all the non-essentials. What I’ll end up with will be transparent, and fairly delicate.
    Hopefully I won’t break anything when I take the LCD out of the casing, and remove the lighting, backing etc. Breaking it will be costly!

    Next we’ll need a way to shine our light source through the LCD.
    While we have a strong light – it won’t be very useful as is, as the light will mostly be concentrated in the center of wherever its pointed at.
    So, we need a way to disperse the light in a directed way.

    Typically this is done with a Fresnel. Fresnels are rather cool lens typically made out of plastic. They magnify or reduce anything passed through them.
    We’ll be using a fresnel in front of the LED light to disperse the light evenly through the LCD.
    Once its through the LCD, we’ll be using another Fresnel to concentrate the light back into a smaller focal area, so that we can throw it through a lens, and see something on a screen.

    For a 15.4″ screen, we need a 400×320 sized 330mm Fresnel, and a 500mm Fresnel.
    The 330mm (aka our collimator) will be placed in front of the light source, the LCD will be placed 10-15mm in front of that, then finally the 500mm (aka our collector) to concentrate the light + display output into a nice ready to use focal area for our rather expensive triplet lens.
    We’re using a 500mm triplet as the lens, mostly as all the projector websites are using those for 15.4″ screens.

    Fresnels were fairly cheap – 80rmb each or so.

    The lens was rather more expensive. Ours was close to 600rmb with shipping!
    When it arrived, we saw why. It definitely feels like its worth the money.. Unfortunately ours arrived with a crack from shipping, so we had to send it back. The replacement should arrive in a day or three.

    While I haven’t setup the fresnels yet in action, I did test out the controller board, and LCD.

    Photo’s below of everything.

    While I haven’t built any casing yet, I’m fairly confident we should be able to knock something up quickly to house all the parts.
    Hopefully ours will be sturdier than this professional build I saw online –

    Flattr this!

    So far in this series, we’ve learnt a few things.
    First, is that this hardware is quite nice for hacking purposes, as they’ve left the uBoot in a nice state, and have easily accessible debug ports.
    Second is that doing this kind of thing isn’t really that complicated, and can be quite fun.

    We’re pretty much ready to start doing our own coding, as we know how the images are packed, and we can use the uBoot to either flash onl the romfs on or own, or alternately roll a complete linux + romfs binary image.

    For that, we’ll need to be ready to roll up our sleeves, and actually do some development (finally!).

    Getting a development environment setup is our next step, as we’re ready to test out adding binaries.

    I’m using Debian, but most Linux environments should be similar. OSX is BSD based, and more of a pain due to Apple not putting everything needed in the normal places, so I’m doing this in a VM on my Macbook under Debian.

    Go grab a copy of “NUC700 Series MCU uCLinux BSP.zip” from here http://www.metavert.com/public/NO-SUPPORT/

    Setup a VM for Debian (not going to cover that) or install Debian or similar.

    Copy the zip file to /home in the OS you use.

    cd /home
    mkdir N745
    cd N745
    unzip ../NUC700\ Series\ MCU\ uCLinux\ BSP.zip

    You should now see something like this:

    :/home/N745/NUC700 Series MCU uCLinux BSP# ls -al
    total 68
    drwxr-xr-x 6 root root 4096 2009-05-15 20:02 .
    drwxr-xr-x 3 root root 4096 2010-04-30 02:23 ..
    drwxr-xr-x 3 root root 4096 2009-05-15 20:06 bootloader
    drwxr-xr-x 2 root root 4096 2009-05-15 20:03 bsp
    drwxr-xr-x 2 root root 4096 2009-05-15 20:02 doc
    drwxr-xr-x 4 root root 4096 2009-05-15 20:02 mkrom
    -r--r--r-- 1 root root 44632 2009-03-27 11:49 NUC700 uClinux BSP Release Note.pdf
    debian:/home/N745/NUC700 Series MCU uCLinux BSP#

    Unfortunately the build *really* doesn’t like long filenames, so lets move all this to the N745 folder, and get rid of the annoyingly named folder.


    /home/N745/NUC700 Series MCU uCLinux BSP# mv * ..
    /home/N745/# cd ..
    /home/N745/# rm -r NUC700\ Series\ MCU\ uCLinux\ BSP/

    We still need to unzip the BSP, as its compressed, so go into bsp


    /home/N745/# cd bsp
    /home/N745/bsp# tar -xzvf NUC700BSP.tar.gz
    NUC700BSP/
    NUC700BSP/arm_tools.tar.gz
    NUC700BSP/install.sh
    NUC700BSP/arm_tools_3.3.tar.gz
    NUC700BSP/build.tar.gz
    NUC700BSP/applications.tar.gz
    NUC700BSP/uClinux-dist.tar.gz

    Yay, yet another bloody subdirectory. Sigh.


    /home/N745/bsp# cd NUC700BSP
    debian:/home/N745/bsp/NUC700BSP# ls -al
    total 183300
    drwxr-xr-x 2 shanghaiguide shanghaiguide 4096 2009-03-26 22:38 .
    drwxr-xr-x 3 root root 4096 2010-04-30 02:29 ..
    -rw-r--r-- 1 shanghaiguide shanghaiguide 29521418 2009-03-26 21:55 applications.tar.gz
    -rw-r--r-- 1 shanghaiguide shanghaiguide 43742203 2009-03-26 21:22 arm_tools_3.3.tar.gz
    -rw-r--r-- 1 shanghaiguide shanghaiguide 36108739 2009-03-26 21:11 arm_tools.tar.gz
    -rw-r--r-- 1 shanghaiguide shanghaiguide 5643452 2009-03-26 21:24 build.tar.gz
    -rwxr--r-- 1 shanghaiguide shanghaiguide 4370 2009-03-26 22:31 install.sh
    -rw-r--r-- 1 shanghaiguide shanghaiguide 72439431 2009-03-26 20:53 uClinux-dist.tar.gz
    debian:/home/N745/bsp/NUC700BSP#

    Run the install – I’ve decided to install the whole shebang to /home/N745

    Note – The observant amongst you will notice I’m running this as root.
    This is NOT recommended. I’m running under a VM solely created to play with this, so I don’t really care if I break it (as I can roll back to the initial install image fairly easy in vmware). Don’t do this yourselves (unless you want to break things).


    debian:/home/N745/bsp/NUC700BSP# ./install.sh
    firstly install arm_tools.tar.gz -->/usr/local/
    wait for a while
    successfully finished installing arm_tools.tar.gz
    now begin to install build.tar.gz,applications.tar.gz and uClinux-dist.tar.gz
    Please enter your absolute path for installing build.tar.gz, applications.tar.gz and uClinux-dist.tar.gz:
    /home/N745
    /home/N745 has existed
    please wait for a while, it will take some time
    whole installation finished successfully!
    debian:/home/N745/bsp/NUC700BSP#

    We finally have our build environment unzipped, and its sitting in nuc700-uClinux.

    debian:/home/N745# cd nuc700-uClinux/
    debian:/home/N745/nuc700-uClinux# ls -al
    total 24
    drwxr-xr-x 6 root root 4096 2010-04-30 02:31 .
    drwxr-xr-x 7 root root 4096 2010-04-30 02:31 ..
    drwxr-xr-x 7 root root 4096 2009-03-25 00:44 applications
    drwxr-xr-x 2 root root 4096 2009-03-26 21:23 image
    drwxr-xr-x 12 root root 4096 2009-03-26 04:54 romdisk
    drwxr-xr-x 10 root root 4096 2009-03-26 06:50 uClinux-dist
    debian:/home/N745/nuc700-uClinux#

    uClinux-dist has the default binaries we want, plus we need to configure the kernel, so lets visit there first (the more adventurous can look at the other folders)


    debian:/home/N745/nuc700-uClinux# cd uClinux-dist/
    debian:/home/N745/nuc700-uClinux/uClinux-dist# ls -al
    total 84
    drwxr-xr-x 10 root root 4096 2009-03-26 06:50 .
    drwxr-xr-x 6 root root 4096 2010-04-30 02:31 ..
    drwxr-xr-x 2 root root 4096 2009-01-22 23:27 bin
    drwxr-xr-x 3 root root 4096 2009-03-26 06:50 config
    -rw-r--r-- 1 root root 18007 2009-01-22 23:29 COPYING
    drwxr-xr-x 3 root root 4096 2009-01-22 23:27 Documentation
    drwxr-xr-x 11 root root 4096 2009-01-22 23:29 freeswan
    drwxr-xr-x 5 root root 4096 2009-01-22 23:29 lib
    drwxr-xr-x 15 root root 4096 2009-03-26 06:50 linux-2.4.x
    -rw-r--r-- 1 root root 3228 2009-01-22 23:28 MAINTAINERS
    -rw-r--r-- 1 root root 7977 2009-01-22 23:27 Makefile
    -rw-r--r-- 1 root root 4935 2009-01-22 23:29 README
    -rw-r--r-- 1 root root 1654 2009-01-22 23:29 SOURCE
    drwxr-xr-x 158 root root 4096 2009-01-22 23:28 user
    drwxr-xr-x 4 root root 4096 2009-03-12 03:54 vendors
    debian:/home/N745/nuc700-uClinux/uClinux-dist#

    Looks like it should be fairly easy, right?
    Wrong.

    The default build doesn’t work. Why would it be that easy.

    You’ll end up with issues like:

    entry-armv.S:782: Error: Internal_relocation (type 210) not fixed up
    (OFFSET_IMM)
    entry-armv.S:784: Error: Internal_relocation (type 208) not fixed up
    (IMMEDIATE)

    So, we need to make sure we start off fresh.
    Also, note that we’re building for an N745 cpu, so we’ll need to configure that at the make config stage.
    Lastly, and EXTREMELY important, is that we’ll need to put our required tools in the path.

    DO NOT FORGET TO DO THIS
    sample PATH below:

    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/arm_tools/bin


    debian:/home/N745/nuc700-uClinux/uClinux-dist# PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/arm_tools/bin

    debian:/home/N745/nuc700-uClinux/uClinux-dist#make clean

    Now we have a choice - Recommend use make xconfig if possible.
    You need to have a GUI, and have tk installed. (apt-get install tk)
    Otherwise run make config, and run through the tediously large amount of questions

    OPTION#preferred

    debian:/home/N745/nuc700-uClinux/uClinux-dist#make xconfig

    OPTION#not recommended

    debian:/home/N745/nuc700-uClinux/uClinux-dist# make config
    config/mkconfig > config.in
    #
    # No defaults found
    #
    *
    * Target Platform Selection
    *
    *
    * Choose a Vendor/Product combination.
    *
    Vendor/Product (nuvoton/nuc710, nuvoton/nuc740, nuvoton/nuc745) [nuvoton/nuc710] (NEW) nuvoton/nuc745

    [For the rest, I used the defaults (except for the Network Tools questions, which I said Y to all)]

    Continue here from whatever menu (x)config you used.

    debian:/home/N745/nuc700-uClinux/uClinux-dist#make oldconfig

    [Needed, or compile doesn't work]

    debian:/home/N745/nuc700-uClinux/uClinux-dist#make dep

    [A gazillion pages of info later, we have a build environment!]

    We’re finally ready to use our weapon of mass destruction.


    debian:/home/N745/nuc700-uClinux/uClinux-dist#make
    ...

    It should compile without issue.

    Next step is to mount our created rom image, and copy the binaries off, or just go to the compiled folders, and get the binaries.

    I’ve done this step already, and have a zip file of a few useful files ready.

    -rwxr-xr-x 1 root root 110888 2010-04-30 03:50 ftpd
    -rwxr-xr-x 1 root root 55164 2010-04-30 03:52 ping
    -rwxr-xr-x 1 root root 1201904 2010-04-30 03:51 ssh
    -rwxr-xr-x 1 root root 1219864 2010-04-30 03:51 sshd
    -rwxr-xr-x 1 root root 118004 2010-04-30 03:45 telnet
    -rwxr-xr-x 1 root root 45460 2010-04-30 03:45 telnetd

    file *
    ftpd: BFLT executable – version 4 ram
    ping: BFLT executable – version 4 ram
    ssh: BFLT executable – version 4 ram
    sshd: BFLT executable – version 4 ram
    telnet: BFLT executable – version 4 ram
    telnetd: BFLT executable – version 4 ram

    Download that here – arm7-nettools

    All we need to do now is mount our romfs image, unzip the arm7-nettools.zip, copy the arm7 bFLT binaries over to bin, add telnetd, sshd, and ftpd to our /bin/init, and rebuild by running genromfs on our filesystem.

    We can then finally flash our new romfs, and test it out.

    Don’t forget that romfs is a read only file system, so we can’t modify it by mounting it. We need to mount, copying everything to elsewhere, do our required bits and pieces, then rebuild.

    eg

    mount -o loop -t romfs still_unsure.img /mnt/test -r

    mkdir /mnt/new
    cd /mnt
    rsync -arv /mnt/test/ new
    cd new/bin
    wget http://www.computersolutions.cn/blog/wp-content/uploads/2010/04/arm7-nettools.zip
    unzip arm7-nettools.zip
    rm arm7-nettools.zip

    [We need to also edit init]
    pico init

    Add

    sshd&
    telnetd&
    ftpd&

    eg –
    cat init
    mount -t proc none /proc
    mount -t ramfs none /usr
    mount -t ramfs none /swap
    mount -t ramfs none /var/run
    mount -t ramfs none /etc
    mount -t ramfs none /flash
    mount -t ramfs none /home
    camera&
    sshd&
    telnetd&
    ftpd&
    sh

    Change to the next directory up, and lets run genromfs

    genromfs -d new -f testrom.img
    debian:/mnt# ls testrom.img
    testrom.img
    debian:/mnt# ls -al testrom.img
    -rw-r–r– 1 root root 3329024 2010-04-30 04:18 testrom.img

    In theory, this should be usable (famous last words!).

    Unfortunately, I can’t try testing on that at home, as all the equipment is at the office, but that should be fairly easy.

    Probably also some small config issues to sort out, as ftpd, telnetd and sshd will probably choke without their related /etc/whatever config files needed, but we can sort that out via serial on the debug ports.

    Mar
    23

    Cube vs Cube

    Flattr this!

    Obviously I’ve had waaaaaaaaaay too much fun with my newly purchased coffee machine today.
    Photo’s (and story) below.

    Its a match of the titans.

    Frog design vs A+P Cahen.

    No rolls barred, its Cube vs Cube.

    In the left corner, we have the old, the venerable…

    G4 Cube

    Part frakkin Toaster, part computer, (ex) fishtank, part space heater.

    VS

    The newcomer with an attitude, he’s shiny, and he isn’t afraid to show it off.

    Le Cube

    Read more »