Welcome

Pacific Simplicity is the home to my tech blog of sorts, aiming to assist and provide information easily to other Linux users and Open Source hackers out there.  It contains articles on Linux, system admin hints, scripting, programming embedded systems, OpenWRT and of course Drupal . Check it out and don't forget to comment!

Posted: Wed, 05/25/2016 - 17:17

We spent some time looking at RFCOMM sockets in C using libbluetooth (bluez)... and we found this treat:

If you use the same channel for both the src and dest struct sockaddr_rc, or rather both as zero - it will never work. Apparently according to documentation on the internet - 0 - means, pick a free one. It actually doesn't and it will result in:

Posted: Tue, 05/24/2016 - 15:55

Working on a project and supervising an intern - I decided that it would be nicer if I had a good example of a detached thread generator which also provided a parameter (as a structure).

#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

/* This is the structure you could use to pass parameters to the threads */
typedef struct thread_params_s {
        int param;
} threat_params_t;

Posted: Tue, 05/24/2016 - 09:30

I recently ordered several BT adapters which have the CSR chip in them, but the ALL have the same address. Here is a simple little hacky script I made:

Posted: Wed, 05/18/2016 - 15:15

Simple read XML example written in C using Libxml2 - notice recursions for hosts etc...

Posted: Wed, 05/18/2016 - 12:11

Here is an extended example using some base-code borrowed from https://github.com/carsonmcdonald/bluez-ibeacon. This code wasn't all that well written and needed ALTBEACON support - so here it is with my changes.

The most notable parts are: