WD My Passport Pro SSD – SMBv2 / Win 10

To enable SMBv2 compatibility on the Western Digital My Passport Pro SSD, so that it supports Windows 10, go through the following steps.

1) Enable SSH access via the admin console
2) Use PuTTy/etc to log into the console
3) nano /etc/samba/smb.conf
4) add the line
[global] workgroup = WORKGROUP
server string = MyPassport Wireless Pro
netbios name = MyPassport
protocol = SMB2

5) run /etc/init.d/S75smb restart
6) try and browse to the \\ IP of the disk drive
7) If you can’t login (username admin) reset the password by typing
8) /usr/bin/smbpasswd -a admin
Enter the new password
9) Finally restart Samba again (per 5)
10) Profit?

Note, if your username/password isn’t recognised, use [email protected] as the username within Windows.

Booting Windows 2016 on HP G8 Microserver MicroSD Card

As good as FreeNAS has been, most of the clients on my home network are Windows based and speak CIFS/SMB,  and I’ve not had great success with FreeNAS reliably/stably serving these protocols.   Under load, the shares sometimes lock up and stop responding, and permissions can be a bit hit and miss.

FreeNAS support forums drink their own special brand of cool aid, so I’ve decided to try Windows, which, whilst being part of their own borg collective has a much wider base of users and obviously native integration with my client base.  So I’m piloting Windows Server 2016 with its various storage capabilities to see how it compares.
I’ve got a HP Microserver G8 which as well as 4 disk trays, supports a fifth SATA device via an additional ODD port, an internal USB and a MicroSD port, as well as various external USBs.
My FreeNAS is a previous N54L Microserver, which installs and boots easily to a USB drive, but Windows is a bit more pig-headed at booting from USB/MicroSD devices.
However, with the help of Daniels Tech Blog  I have managed to get my Microserver booting from the MicroSD Card
Daniels instructions are more or less spot on, except for one change.
list disk
select disk x
create partition primary
format quick fs=ntfs label="SD"
assign letter=C
dism /Apply-Image /ImageFile:D:sourcesinstall.wim /index:2 /ApplyDir:C:
bootsect /nt60 C: /force /mbr
bcdboot C:Windows

I couldn’t get that final line to write to the MicroSD. I kept getting errors about BCDBOOT not being able to write the files, or unable to find the source location. However, I read the documentation about BCDBOOT at Microsofts MSDN site and happened upon the command for writing to USB devices.

bcdboot C:Windows /s C: /f ALL

This seems to work fine, and a reboot allows Windows 2016 to boot.

Adventures with the Omnima LCD Panel

I have recently picked up an Omnima LCD panel, a 3.5” QVGA (320×240) USB powered LCD panel with an SDCard slot and the ability to control it like a serial device over the USB port using the included cable.

Having an ARM7 based processor and a 2D graphics engine, it promises to be a great little versatile display panel for outputting information not requiring a full screen (sensor information e.t.c, news feeds, that sort of thing).  Plus, many of the LCD panels available on the internet either require an additional controller or some curious interfacing to be able to drive it.  For not a lot of cash, this prebuilt solution seems to be an ideal choice.

So that’s the good bit – the bad bit is that there doesn’t seem much support for it.  The supplier forums are quiet at best (and not accepting new sign-ups) and there doesn’t appear to be much documentation other than the PDF’s on the Omnima website/forum.  I suspect there may be more available if you buy the SDK tools, but these are expensive to say the least.  Plus, I don’t have that much interest in writing new code for the screen CPU because I believe the inbuilt functionality is enough, and I’m not skilled in C++ development.

Anyway, the screen (version 3 as shown on the website) itself works with LCDSmartie (I’m using v 5.4.1) and the DLL included in the forum worked after a fashion.  The OmnimaLCD.cmd file included in the ZIP file isn’t quite right.  The standard command ends up rendering every serial command to the screen, rather than the result of the command.  The below command sets it up properly.

#@Term MW Off
#@Term FW Off
#@FrColor 0 255 0 0
#@FloatWin Open 10 10 240 320
#@Line MW 10 10 50 10
#@Line MW 10 50 10 10
#@Line MW 10 190 10 230
#@Line MW 10 230 50 230
#@Line MW 270 10 310 10
#@Line MW 310 10 310 50
#@Line MW 270 230 310 230
#@Line MW 310 190 310 230

This turns off any terminal command writing to the screen, creates a black box on the screen, creates a float window to render the text in, and draws some nice green lines at the edges screen which I think look quite nice.  One thing to be aware of,  you can use 4 x 20 screen setting as recommended, and you can use 4 x 40 setting.  However, on the latter, if the text exceeds the screen width, you get text wraparound where it runs around onto the left of the screen.  Not so bad if you don’t have scrolling text and format your text lines appropriately.  Also, the on screen left position seems to be set in the DLL file – I had a bash at editing what looked like the command in a HEX editor, but to no avail.

A note really for myself – the line plotting code consists of x horizontal poz, x vertical poz, y horizontal poz, y vertical poz. 

The one thing I need to work out now is how to render pictures to the screen – apparently supported, but I’m not getting much joy with it.  The graphics processor apparently supports JPEG pictures, but when I try and load it, the unit locks up and needs a power cycle.  The documentation suggests I need to use the “oimage tool” to convert from JPG, PNG e.t.c to a compatible format:-

To generate files suitable for loading using FileToSSD you can make use of the oimage tool. This tool can load all popular image file formats such as jpg, gif, bmp and more, and save the file in the SSD compatible format.

I’ve Googled the heck out of oimage and SSD compatible format, but can’t find anything of relevance – if anyone has any clues, please leave me a note.  I’ve asked Omnima directly, but not yet had a response.  Given that the device is basically a mini picture frame, it would be nice to be able to load and display pictures as well as vector graphics, especially as the latter can be quite slow (I would guess at 500ms per line) on the LCDSmartie example above.  The documentation suggests that picture loading can be quite quick, but we’ll see. 

Finally, id like to get it working in LCD4Linux – I cant see it being too difficult if its just got to send information via text strings, but that’s a project for another time.

e.On Smart Meter development.

I have an eOn AMPY (Now Landis Gyr+) Smart Meter to monitor my electricity usage as well as a similarly enabled Gas Meter.   It also comes supplied with an eOn branded ‘ecometer’ which shows you energy usage on a current, daily, weekly, monthly and quarterly basis.  Because the smart meter is attached to the grid via a GPRS/GSM modem link, it is also ‘tariff’ aware, such that it gives an indicative figure on your bill.

However, the bit between the ecometer and the supplier’s website is where it all goes wrong – if you want a detailed understand of your power usage, you’re a bit stuck.  Because you can only see ‘current’ usage as a number, if you want to know how much you were using 15 mins ago, you’re stuffed, because the display isn’t detailed enough, and the website only updates on a monthly basis,

So, my plan is to try and understand the technology to see if there is a way of extracting the ‘live’ data as its transmitted from from the meter to the ecoMeter display, and I intend to track my progress here.

So, to start:-

Meter is an AMPY 5236E-Y which apparently has an mbus low power radio in it.
The ecoMeter display is an AMPY Model 5262

Inside the 5262 is a PCB with the LCD soldered to the front of it. However, there is a daughterboard tucked behind the LCD with a TI CC110, what looks like a Crystal Oscillator (ACT K7 26.00SCA) and a chip I can find no data on, but has the serial number 90-13026 037 something 7373vg.
Unfortunately I can’t currently see the controllers on the main board because of the LCD, but there is one ‘major’ microprocessor, and one small one. I suspect this is really just a logic chip and LCD driver.  The motherboard has the following stickers on it:
There is also a 9 point (3×3) contact patch on the back of motherboard which may be either a programmer or output. This is accessible from outside the case, if that makes a difference.

What I need to find out:-

More about the MBus Protocol
If there is any encryption between the meter and the display panel.
Any control panel options for the ecoMeter – e.g. is there a PIN to set or the like, and how this relates to the meter itself. Additionally, are there any hidden menu’s e.t.c.