Category Archives: Hacking

FTDI TTL232R-3V3 to Visonic PowerMax

Online information on RS232 communication with a Visonic PowerMax Plus/Pro home security system describes the pinout of a 10-pin header. The photograph below shows the 4-pin RS232 interface of a regular PowerMax system. Counting from left to right, the RXD (yellow wire) of the FTDI TTL 3V3 cable connects to pin 2. Pin 3 is used for TXD (orange wire). The fourth pin is used for ground (black wire).

HACKRF_ERROR_LIBUSB

I have been struggling to get my HackRF One working again on a new laptop with the latest Ubuntu release. Although being detected as USB device, the hackrf_info utility continued to stop working with the following error:

Found HackRF board 0:
hackrf_open() failed: HACKRF_ERROR_LIBUSB (-1000)

Repeatedly starting hackrf_info resulted in a proper response on all occasions except for the first call. The HackRF One was also not functional in other programs. Info from various mailing lists seemed to point to the recentlt introduced hackrf kernel module. However, unloading this module or adding it to a blacklist did not bring a solution for my case. Eventually, it turned out that the firmware of the HackRF does not support USB suspend. All that was needed was to add the USB device ID to a blacklist (/etc/default/tlp) and start TLP again as superuser:

USB_BLACKLIST="1d50:6089"

A similar solutions exist in case laptop-mode-tools is used: [Hackrf-dev] HackRF, USB Autosuspend, etc.

Zoomify, TilePic and other mosaic

Several sites are using the TilePic image format to show sections of a larger image. The TilePic file format contains the image data for a limited number of resolutions (zoom levels) and all image parts (tiles) have the same dimensions. The first level contains the full image scaled to a single tile. The second level could contain 4 tiles of the same size, each containing a quarter of the image data at twice the resolution of the first level. The third level then contains 4 tiles for each tile of the second level, resulting in a total of 16 tiles for the full image. The advantage of the TilePic format is that the client only needs to download the specific tiles for the shown part of the image from the level with the correct resolution. The websites usually provide zoom and scroll functions to magnify a part of the image.

Continue reading

Tilepic scripts (2)

On request, the script to download and reconstruct TilePic images was modified for Windows users in a quick and dirty way. The requirements for using the script are installed versions of ImageMagick and wget for Windows. Place the following code in a text file, adjust the first two lines to point to the TilePic image and the locations of the installed programs, and change the extension of the filename to .bat to make it an executable script. The script will download all tiles with the highest resolution data. It can take several minutes to append all rows of tiles to make the final image, so be patient.
Continue reading

Tilepic scripts

Several sites are using the Tilepic image format to show sections of a larger image. The Tilepic file format contains the image data for a limited number of resolutions (levels) and all image parts (tiles) have the same dimensions. The first level contains the full image scaled to a single tile. The second level could contain 4 tiles of the same size, each containing a quarter of the image data at twice the resolution of the first level. The third level then contains 4 tiles for each tile of the second level, resulting in a total of 16 tiles for the full image. The advantage of the Tilepic format is that the client only needs to download the specific tiles for the shown part of the image from the level with the correct resolution. The websites usually provide zoom and scroll functions to magnify a part of the image.

Downloading the high-resolution image from the Tilepic file requires some knowledge on the location of the file on the server. This information can be found in the source code of the webpage and may for example be /photo/tilepic/image.tjp. The following script will download all tiles from all levels of the Tilepic image defined by $file.
Continue reading

3D CAD models

Some time ago I have been playing around with the Solid Works 3D CAD design software. The idea was to fully model a Heckler & Koch USP Expert 9mm gun by taking accurate measurements from the real deal and to use this CAD model in an animation movie. The two screen dumps below show the design of the slide is almost completed.

screendump1 Continue reading