Silent, Classic Danish city! Aabenra Yacht Club was the main attraction with the side by camping site that made me intrigued to get to that place. This popped up in the Navigation map on our way to Copenhagen (København) .
bleno writeup (updated)
A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals. Need a BLE central module? See noble. Note: macOS / Mac OS X, Linux, FreeBSD and Windows are currently the only supported OSes. Prerequisites OS X install Xcode 10.9 or later Linux Kernel version 3.6 or above libbluetooth-dev bluetoothd disabled, if BlueZ 5.14 or later is installed. Use sudo hciconfig hci0 up to power Bluetooth adapter up after stopping or disabling bluetoothd. System V: sudo service bluetooth stop (once) sudo update-rc.d bluetooth remove (persist on reboot) systemd sudo systemctl stop bluetooth (once) sudo systemctl disable bluetooth (persist on reboot) If you’re using noble and bleno at the same time, connected BLE devices may not be able to retrieve a list of services from the BLE adaptor. Check out noble’s documentation on bleno compatibility Ubuntu/Debian/Raspbian sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev Make sure node is on your path, if it’s not, some options: symlink nodejs to node: sudo ln -s /usr/bin/nodejs /usr/bin/node install Node.js using the NodeSource package Fedora / Other-RPM based sudo yum install bluez bluez-libs bluez-libs-devel Intel Edison See Configure Intel Edison for Bluetooth LE (Smart) Development FreeBSD Make sure you have GNU Make: sudo pkg install gmake Disable automatic loading of the default Bluetooth stack by putting no-ubt.conf into /usr/local/etc/devd/no-ubt.conf and restarting devd (sudo service devd restart). Unload ng_ubt kernel module if already loaded: sudo kldunload ng_ubt Make sure you have read and write permissions on the /dev/usb/* device that corresponds to your Bluetooth adapter. Windows node-gyp… Read more
Multi-threading in Python: A quick guide for python multithreading
All the resources for multi-threading python programming. import threading Thats all is there in python multi processing! Of course you should know what to use where? I found this great slideshare option that you should go through to get up and running in python multi processing. An Introduction to Python Concurrency. Semaphore is the oldest parallel processing concepts. Which of course highly useful for any multi processing programs. For me it was a SPI Bus accessed using a raspberry pi. There are 4 chip selects and each communication event is a new thread. To provide access to a single bus, semaphore was used. Its implementation is straight forward in python. parallelProc = threading.Semaphore(1) #parallelProc is the object that holds the semaphore and allows only one concurrent process. now, it might get painful to get the acquire and release right, but otherwise it is great! def communicationEvent(): parallelProc.acquire() print ‘Doing bus transactions here!’ parallelProc.release() Finding time for adding more of the concepts in the future One might think life just got easier with multi-threading, but thats when shit gets real! (Ned Stark way of telling)
BLE pairing vs. bonding
Just a quick writeup on the difference between pairing and bonding, since these terms get used interchangeably. I think this has to do with the usage of ‘pairing’ in Bluetooth Classic, or BR/EDR. As far as Bluetooth LE is concerned, pairing and bonding are two very distinct things. The short explanations are that pairing is the exchange of security features each device has, and creating temporary encryption. Bonding is the exchange of long term keys AFTER PAIRING HAS OCCURRED, and STORING THOSE KEYS FOR LATER USE. Pairing is not the creation of permanent security between devices, that is called bonding. Pairing is the mechanism that allows bonding to occur. Pairing Pairing is the exchange of security features. This includes things like i/o capabilities, requirement for man-in-the-middle protection, etc. The client side begins this exchange. The client essentially says ‘hey, i’d like it if you had these features’. The server replies, ‘yeah, well, this is what I can do’. Once this exchange is made, the security that will be used has been determed. For example, if a server supports just noInput/noOutput for i/o capabilities, the Just Works pairing mechanism is going to be used. Once the pairing feature exchange is complete, a temporary security key is exchanged and the connection is encrypted, but only using the temporary key. In this encrypted connection, long term keys are exchanged. These keys are things like the (long term) encryption key to encrypt a connection, and also things like a digital signature key. The exact… Read more
Unveiling the Mysteries of BLE GATT: A Comprehensive Guide for Computer Savvy
As a seasoned computer professional, you’re likely no stranger to the world of wireless communication. With the proliferation of IoT devices, Bluetooth Low Energy (BLE) has emerged as a popular choice for device connectivity. At the heart of BLE lies the Generic Attribute Profile (GATT), a crucial component that enables seamless data exchange between devices. In this article, we’ll delve into the intricacies of BLE GATT, exploring its architecture, key concepts, and practical applications. What is BLE GATT? BLE GATT is a protocol that defines how devices interact with each other over BLE. It’s a hierarchical structure that facilitates the exchange of data between a peripheral device (e.g., a smart sensor) and a central device (e.g., a smartphone). GATT is built on top of the Attribute Protocol (ATT), which provides a way for devices to read and write attributes, such as device names and services. GATT Architecture The GATT architecture consists of three primary components: Services: These are logical groupings of attributes that define a specific function or feature of a device. Services are used to categorize attributes into meaningful categories, making it easier for devices to discover and interact with each other.Characteristics: These are individual attributes that contain specific data, such as sensor readings or device settings. Characteristics are the building blocks of services and are used to define the actual data being exchanged.Descriptors: These are optional attributes that provide additional information about a characteristic, such as a human-readable description or a unit of measurement. How BLE GATT Works… Read more
The Web Bluetooth module for Angular
For the past few months, I’ve been playing around with the new Web Bluetooth API which is about to ship in Chrome 56 in February 2017. And let me tell you, this new feature just unlocked lots of new possibilities for the Web. As a Web Advocate, I was so excited and couldn’t wait to build an application showing how easy it is to combine Angular and the Web Bluetooth API (even more, with any of the upcoming Web APIs, more on that soon, stay tuned). Let’s meet The Missing Web Bluetooth Module for Angular Application I started then working with my buddy François Beaufort (kudos to him!) to build a demo app, a kind of proof of concept that illustrates how to integrate Web Bluetooth with Angular. After implementing a couple of use cases, I came up with an Angular module which abstracts away all the boilerplate needed to configure the Web Bluetooth API. A Few Disclaimers Web Bluetooth APIs I am going to assume that you’re already familiar with the Web Bluetooth APIs: GATT server, Services, Characteristics…etc. Please make yourself comfortable with this topic before reading the next sections. Here are few resources: https://developers.google.com/web/updates/2015/07/interact-with-ble-devices-on-the-web https://medium.com/@urish/start-building-with-web-bluetooth-and-progressive-web-apps-6534835959a6 Observables I am also assuming that you have some basic knowledge about Observables, Observers and Subjects. Finnish Notation You will notice that some methods ends with a $ symbol. This is some sort of convention in the Observables world that we’ve been using for a while. We may drop this $ symbol in the future because of this blog post. Installing the module You can get this module… Read more
Installing openCV 3.0 on macOS
doing some machine learning and want to install openCV the right way to be used with python, follow here! Install home-brew for mac. ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” python2.7 usually comes installed in macOS, if not brew install python add openCV to the search using the tap argument in home brew brew tap homebrew/science install openCV with the obvious command for installing opencv-2.4.12_2 brew install opencv but we want to install opencv 3.0 which means, we have to compile from source. hit the terminal with the following, cd ~/Documents/dev git clone https://github.com/opencv/opencv.git cd opencv git checkout 3.0.0 cd~/opencv mkdir build cd build cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D PYTHON2_PACKAGES_PATH=~/.virtualenvs/cv/lib/python2.7/site-packages -D PYTHON2_LIBRARY=/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/bin -D PYTHON2_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Headers -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=~/opencv/modules .. now make with the number of jobs, i like to put the number of cores in your PC. when you don’t know, hit this to find out in a macOS sysctl -n hw.ncpu make -j4 make install when permissions are a problem, do the obvious sudo make install to check if it installed on your python path, hit the python shell python >>> import cv2 >>> cv2.__version__ ‘3.0.0’ if you want this to be installed in your python path of your virtual environment, you need to create a symbolic link of the installed openCV library in your brew installed python into your site packages of the virtual environment venv next step of the project… Read more
My endeavour towards creating cheap backup space
I started good with a 512GB HDD and a Dell Studio with a 512GB HDD in 2009. I was never out of space until 2013 when I bought my new MacBook Air with 256GD HDD. I would describe it as a glorious decision but totally not happy with the 46GB free space! Since then I m trying to find out a best way to create more storage space and I am going away from the idea of using a physical device since I like to go mobile and light. I want it to be accessible all the time i.e. even without carrying my storage device. So i turned my backup hard drive into a time machine backup device after splitting the partition. Just being extra careful with the highly reliable MacBook. Now I turned to cloud storage. I wish I had backed them in Kickstarter with 69$ now I don’t have to pay 169$ for the awesome device that could make your own cloud storage with plug-n-play. Just hoping to find one somewhere for the same backing price. Lima: Brain for your devices. Lima: Brain for your devices The next one I started surfing that equals the retail price of Lima and does more. Is it really necessary? All those extra features or just some extra backup space? http://wedg.co/ wedg Which one do your vote for to buy and test it! Answer in comments to make decision.
SensyLight – making home movie experience more immersive!
If you haven’t heard of ambiLight™ (probably trademarked) by Philips. It was in their Televisions that somehow figure out the colours on the scene and light up the LEDs behind the TVs to create a more immersive experience. It was some how the thing of 2010 according to a friend of mine. SensyLight is a DIY project which also tries to create a immersive movie experience with your TVs. But, can only be used with a PC that streams content to the TV on screen mirroring. There are two components for this to work, one is the java program that runs on the PC and the other is the arduino C program that acquires the signals of the lighting information from the PC and creates an ambient lighting. This is expected to create an immersive experience. At least its fast enough for the frame rates of HD HDMI streaming. Checkout the youtube video that gives a outlook on the project. Getting on to the hardware requirements for this setup: Adafruit Industries – Neopixel 30 LED meter long Black Arduino Mega 2650 to control the lights. They are communicating with the LEDs in a pulse modulate signal from the GPIOs A PC with linux, windows or osX (then the serial interface setup might change) Linux – /dev/ttyACM0 OSX – /dev/usbmodem14121 windwos – COM6 Here is the best Über guide to help you get started with the Arduino and… Read more
To understand some parts of the Internet!
I asked this question on www.askubuntu.com public IP and ifconfig ip are different: how to connect my computer to internet because I want to setup my own web server and it should be accessed with internet/www/an ip address. I have set an home webserver with my application running. My machine runs ubuntu 14.04 LTS and i tested it to be working within the devices connected to that router. I also found the ip address that is assigned to the router for internet and port forwarding is working. when i type the IP address it opens the apache webserver index.html http://192.168.1.4/ — ip address assigned by the router = works. http://10.1.10.149/ — ip address assigned to the router = works with port forwarding my ip address when i use http://whatismyipaddress.com/ —– 129.217.129.129 how do i find my webserver in the internet? answer is on page 3 and some explanation on page 2!