Thursday, 21 February 2019

Trend Micro Office Scan causes bluescreen (BSOD): PDC Watchdog timeout


PDC WATCHDOG TIMEOUT

We had complaints from users, mainly with Microsoft Surface Pro, that they suffered from random bluescreens (BSOD - Blue Screen Of Death).

BSOD: PDC Watchdog timeout

Trend's typo

The solution is a bit hard to find, because in their support database, they refer to the problem as

"DPC Watchdog Violation"
(at 2019-02-21)
rather than:
"PDC Watchdog Violation"

So I couldn't find it, when I googled it. The solution is described on their site here:


They refer to it as "Solution ID:1121872"  the file is "Ti_1500_win_en_AMSP60_hfb1278.exe"

Also promising, although we already should have that (from Oct 2018):
Solution ID:1121200  File: "Ti_1500_win_en_AMSP60_hfb1248.exe" (see here)

Also for OfficeScan?

From the support website, it is not clear of that also works for Office Scan.
We haven't rolled the fix out at this moment. I'll add a success/fail notice once we have done that.

Wednesday, 20 February 2019

SSTV from the ISS - or - How Windows 1803 ruined my weekend

Dell Latitude e6400 audio problems - or so I thought

Ok, I had noticed that for a while my trusty old Dell Latitude e6400 had stuttered on audio playback. But as I hardly ever use that Laptop for video or music, I didn't really care.
Big mistake!

SSTV weekend on the ISS

I was very happy to read, that ARISS announced an SSTV event  for February 8th to 10th. After some initial tests from home on Saturday. I decided that a trip to the open fields with some tech stuff to capture images from space was a great father & son activity.
The Saturday tests went ok with the antenna indoors and my daughter's laptop:
Not great, but promising SSTV image
So far so good. So I packed my SDRPlay RSP2pro, a HB9CV antenna, some cables and my Dell Laptop.

In the field

The plan was to capture the ISS-pass from 12:50 to 13:00 CET with SDRuno and process the captured I/Q data later. This went quite well and thanks to the fact that we could see all of the satellite band, we heard interesting FM traffic on 145.960MHz from stations all over Europe.

On a handheld, we would have missed
this unexpected signal
When finally the ISS came into view, we saved the whole pass to a .wav I/Q file, at the same time trying to decode the SSTV on my mobile with BlackCat's SSTV app. This worked rather poorly, but as it was very windy, I didn't think much of it.
Despite of that, I knew that audio on the laptop was a bit choppy. But that should not affect the I/Q recordings that didn't pass the sound driver.

Discontinuity!

Ok, once we had that, we wanted to see what we got and replayed the I/Q file to MMSSTV through VB Virtual Audio Cable. (Differnt PC, than before.)
Ouch! That didn't work out.
Ok, I could even hear that, when listening to the recording, approx. every five seconds, the interval between the sync pulses was shorter than expected. This meant, that the Dell Laptop completely froze every 5 seconds, and it was quite possibly not just a sound problem.

Windows 10 Version 1803 broke my Laptop

After re-installing drivers one-by-one from the Dell Support Website, it is extremely likely the storage driver was the culprit: After I had reinstalled the Intel Rapid Storage driver from Dell's site, the problem went away.

I also read here, that disabling the eSATA port in the BIOS also fixes the problem.

Unfortunately my collection of SSTV recordings is pretty much unusable, unless I resort to filling some silence or noise manually. That Sunday was fun but did not yield any results. (Apart from fixing my laptop in the process.)



Thursday, 27 December 2018

Lightning to 3.5mm headphone adapter power comsumption

Observations on a lightning-to-3.5mm headphone adapter's power consumption

Podcasts or audio books are a great way to start a good night's rest. And five to ten minutes of listening is usually all it takes to knock me out. Pretty much regardless of the content, as long as it is not music. (Music is too engaging. I'm funny that way.)
Earlier this year, the company issued new iPhones for the employees, and I got a shiny new iPhone 8. Which is, unlike the iPhone 6s I had before, water proof. Clearly a plus for a runner and long distance hiker. (Please excuse the poor job google does translating that. I write for a German audience in that blog.)
But now the 3.5mm phone jack is gone and I love my trusty old earphones.

The Adapter

Apple offers a lightning to 3.5mm headphone adapter at an amazingly low price. (For an Apple product, that is.) But from the very poor (if not devastating) reviews it received, I concluded it was useless. So I looked for alternatives and found this one:


hoco ls6
I got the Hoco ls6 from my trusted Chinese source here. It is much more sturdy that the original Apple adapter and has the added benefit of having a charge port.
The ls6's charge port
The only downside I found so far was, that it is poorly shielded against RFI picked up by the headphone cable.

Where's the charge gone?

At night, I set the iPhone's timer to end playing after 15 minutes, plug in my favourite (because of their low profile) Sennheiser CX 300 in-ear headphones and fall asleep almost immediately, only to find my phone's battery almost empty about seven hours later.
Listening for 15 minutes can't be that bad, and I haven't seen the phone discharge that quickly with the screen off, especially in power save mode.
This is not a huge issue, but worth investigating. The "battery" menue in the settings now is a lot of help when dealing with power issues.
After 24 hours of moderate use, the charge graph of the phone looked like this:
Battery graph
I think it is pretty obvious: The adapter uses some of the phones power. This is not amazing as such. There is a nice analysis over on ifixit.org that shows the details of what it takes to get audio in and out of the lightning connector.
From what we see here, it looks like the adapter does not play well (if at all) with the iphone's power management. From the moment it is plugged in, it appears to draw a constant current. Actual use does not seem to make a huge impact:
Used the phone normally after unplugging the adapter.
Effect is not so obvious.

This means that the adapter does not play well with the iPhone's otherwise very elaborate power management.
Some sites claim that the ls6 is mfi certified by Apple. The phone does not show a warning message, so that might well be true. But I can't find the adapter in Apple's database here.
All of this raises a few questions:

  • can devices connected to the lightning port take part in the phone's power managment?
  • does the original Apple adapter have a lower power consumption?
  • has anyone made similar observations when using HDMI, or VGA adapters on the phone?
  • I haven't tested that with the standard earpods the phone came with yet. Same thing?
Edit 20181228:
I have tried the same with the original earpods (i.e. the ones with the lightning plug). This looks like a much more efficient setup.
Original lighthing earpods
The discharge during the night is a lot lower. The curve drops in the morning when checking the night's mail and social media.

Looks like I have to get myself an original Apple adapter for my Sennheiser earphones.




Monday, 10 December 2018

iPhone / iPad driver missing after installation from Microsoft-Store

How to fix iPhone drivers manually

Install iTunes from Microsoft store

I installed the latest version of itunes (Dec 2018 - 12.9.2.6) from the Microsoft-Store. This was the first time I did that. All previous updates were either direct downloads or downloads from within iTunes itself.

No more drivers?!

Previous iTunes installers had uninstalled older versions and installed both the device drivers and iTunes. The version from the Microsoft-Store app removed the old iTunes and it's drivers, but did not install new device drivers.
This error message came up:
Missing drivers

Windows-Update vs Device-Manager

Although the error message in iTunes suggests trying windows-update, it really is the device-manager that does the trick. You can call it directly from the command line with: devmgmt.msc


And sure enough, there is an Apple iPhone listed there. But that is not sufficient. Right-click the iPhone and click "update drivers". Let the PC look for drivers on the internet.

Update success!!
It adds two new USB-Devices:

Back to iTunes

iTunes now fully recognizes the iPhone / iPad


It is not quite clear to me why the installer from the Microsoft-Store behaves that way, but anyway:
Problem solved.

Saturday, 3 November 2018

Linux on a HP Chromebook 11 G5 - First steps

Cool, a free Laptop! Now what?

Google currently gives away free Chromebooks to promote GSuite and other cloud services. Once the Chromebook had served it's purpose to do an interview through Google hangouts, the device remained with us. (Which is probably cheaper than sending sales-reps to any mid-sized company.)
Google most likely got a good deal out of HP getting rid of their 2016, 5th generation model of the 11" Chromebooks for them. (Current devices are G6 (6th generation))

HP Chromebook 11 G5 running Linux (Project Crostini)

The specs

You can't expect stellar specs from a Laptop that goes for unter 200€, a 10 year old Core2 Duo will still have more processing power.

HP Chromebook 11 G5 ee

  • Intel Celeron N3060 / 1.60 GHz (2.48 GHz) /2 MB cache, 2 cores
  • Intel HD Graphics 400 / 29.46 cm (11.6 in) 1366 x 768 screen + HDMI out
  • eMMC SSD 16GByte
  • 4GByte RAM
  • WiFi 2,4/5GHz
  • Webcam (720p) Speakers/Mic - Headphone jack
  • 2xusb 3.0 Ports
  • SD Card slot

Of course it has enough grunt to run the Chrome browser plus some apps at an acceptable speed. It easily beats my Raspberry-Pi's desktop performance.
And despite being very plasticy, it feels quite sturdy and doesn not bend or creak.

Chromebook 11 with sleeve

Microsoft Office 365

Quite unlike what Google probably intended, I installed Microsoft's Office 365 apps from the playstore. This integrates nicely with my E3 plan for Office 365. The usual Word / Excel / PowerPoint jobs are not much of a challenge for the little machine. The documents stored in OneDrive are instantly accessible.
PowerPoint in all it's glory
I tried some of my larger PowerPoint presentations and was amazed that all of them worked very well. Including the embedded videos.

Linux?

Before potentially ruining a percectly useable machine, my first attempt was to go the easy route and use what Google has already provided: Crostini
Other than other Chromebooks, the HP 11 G5 has to be set to update it's Chrome OS from the Beta channel. (No need for the developer mode, though.)

Change the channel
Switch to beta

After a restart, the Linux option is available in the chrome://settings menue
Inside the VM

This installs a VM along with a terminal application and a shared folder. Everything looks and feels pretty much like Debian stretch.
Now I can run some super exciting software:
xeyes - a classic :-)
I also installed thunderbird as a proper e-mail client, gnuradio and gqrx. The latter two suffer from the still missing USB support, so they won't talk to external SDR hardware.

The shortcomings of Crostini

For some, Crostini might be good'nuff already. If you need sound, hardware accellerated graphics and USB-access, it is not ready at the time of writing. (Nov 2018)
So it is quite possible, I'll try crouton (a chroot solution) some time soon. See here for more on crouton. (I'll keep you posted.)



Monday, 22 October 2018

Fix iPhone USB disconnects from Microsoft surface dock

iPhone 8 frequently disconnects - update your dock firmware

My iPhone 8 disconnected from my Microsoft Surface Laptop frequently, and reconnected immediately. I tried several cables, re-starting the phone & computer. Nothing helped.
This was especially annoying because I couldn't transfer photos and videos reliably from the phone.

Surface Dock updater

What solved it for me (at least for the moment), was to update the surface dock firmware.
I got the latest version from Microsoft here.
Microsoft dock updater

Several rounds needed?

I ran the updater three times (taking about 5 minutes for each round), following the instructions of the updater each time.
Finally re-running the updater reported:

Dock firmware fully updated
And that seemed to fix it. The iPhone now syncs with iTunes reliably and I can transfer data without disconnects.

Tuesday, 2 October 2018

How to build a low cost applause-o-meter

Building an applause-o-meter with a WS1361

1)The task

When a friend asked me if I could build an applause-o-meter (clap-o-meter, clapometer, applausemeter) for a concert, I thought that should be quick and painless. - I was wrong.
But not knowing what one is up against can be a blessing. And so it went:
Detail of the application: Progress bars as bargraphs


2) The Hardware

So I bought the cheapest sound level meter I could find at my favourite Chinese seller that sported an USB interface: The Wensn WS1361, also sold as HY1361.
See this article about the driver setup to get it up and running with the original software in this blog post.
The other things needed for the applause-o-meter are a projector and a computer running a current version of Windows.

3) The software

For my purposes, the supplied software is pretty useless. So I set out to write my own software for reading the meter.

3.1 libusb-win32 vs libusb

While the SoundPCLink  software relies on libusb-win32, I found a fantastic project for using the libusb at libusb.info. Full support for Visual Studio 2017. - Very handy.
You need to change the driver for the WS1361 from libusb-win32 to libusb (Winusb) with Zadig.
Change the driver with Zadig
If you don't see the WS1361 listed, check the "list all devices" option.

3.2 Simple c++ sound level reader

After a little time it took to understand the library, I wrote a very simple command line tool to read a single db value from the meter:


 /*  
  * ReadSoundMeter: Read DB Value from WS1361 / HY1361 sound level meter  
  * 2018-09 by AReResearch (Andy Reischle)  
  * www.areresearch.net  
  * Inspiration and many lines of code taken from  
  * Pete Batard <pete@akeo.ie> 's example code to libusb, xusb.c  
  */  
 #include "pch.h"  
 #include <stdio.h>  
 #include <stdint.h>  
 #include <stdlib.h>  
 #include <string.h>  
 #include <stdarg.h>  
 #include <C:\Buffer\SoundMeter\libusb-master\libusb\libusb.h>  
 #define CALL_CHECK_CLOSE(fcall, hdl) do { int _r=fcall; if (_r < 0) { libusb_close(hdl); ERR_EXIT(_r); } } while (0)  
 #define ERR_EXIT(errcode) do { perr("  %s\n", libusb_strerror((enum libusb_error)errcode)); return -1; } while (0)  
 #if defined(_WIN32)  
 #define msleep(msecs) Sleep(msecs)  
 #else  
 #include <time.h>  
 #define msleep(msecs) nanosleep(&(struct timespec){msecs / 1000, (msecs * 1000000) % 1000000000UL}, NULL);  
 #endif  
  // Future versions of libusb will use usb_interface instead of interface  
  // in libusb_config_descriptor => cater for that  
 #define usb_interface interface  
 int r;  
 static uint16_t VID = 0x16C0;  
 static uint16_t PID = 0x05DC;  
 static void perr(char const *format, ...)  
 {  
      va_list args;  
      va_start(args, format);  
      vfprintf(stderr, format, args);  
      va_end(args);  
 }  
 static double test_device(uint16_t vid, uint16_t pid)  
 {  
      uint8_t resultat[2];  
      libusb_device_handle *handle;  
        
      handle = libusb_open_device_with_vid_pid(NULL, vid, pid);  
        
      if (handle == NULL) {  
           perr(" Failed.\n");  
           return -1;  
      }  
        
      r = libusb_control_transfer(handle, 0xC0, 0x04, 0, 0, resultat, sizeof(resultat), 1000);  
      if (r < 0) {  
           fprintf(stderr, "Error during control transfer: %s\n",  
                libusb_error_name(r));  
      }  

      libusb_close(handle);  
        
      return ((resultat[0] + ((resultat[1] & 3) * 256)) * 0.1 + 30);  
 }  
 int main(int argc, char** argv)  
 {  
      libusb_context *ctx = NULL; //a libusb session  
      r = libusb_init(NULL);  
      if (r < 0)  
           return r;  
    }  
      printf("%f\n", test_device(VID, PID));  
      libusb_exit(NULL);  
 }  

3.3 And some visual basic

Writing a Windows forms application in C++ turned out a lot harder than expected. It feels like Microsoft had never even intended that to go smoothly.
So I took an extremely ugly approach to call the above command line tool and read it's output into a visual basic windows forms application. The way I did that eats half the CPU power of a brand new i5 machine.
But I needed a quick solution. After the better half of a night of coding, I had a working version.

applause-o-meter GUI (German)
As you might see from the screenshot (German, sorry), the idea is to have three contesting pieces of music per group and three groups.
The audience can "vote" one of the three pieces of each group to be played fully that evening.

4) The performance

A few brief words explaining voting procedure was all that it took. This was the first time that had been done in church music, and as a part of a city-wide, cultural event, it was received very well by the audience.

Showing the results after the performance
Unsurprisingly, J.S. Bach's Toccata in d-minor made it 1st among the 12 pieces.



PS: The visual basic code is quite ugly and needs some tidying before publication. If you are in dire need of a clap-o-meter, please leave a note in the comments and I will make the code available regardless of it's shortcomings.



Intersting WS1361 links: