This blog post is an effort to create a one stop information for starting off your Contiki project with cc2530DK. There is enough information already available on Github wiki. This post is more than an extension to have all information under one place and as usual my way of documenting my projects! [toc] Getting started Installation – Ubuntu I am assuming that you already have a system installed with Ubuntu. My suggestion would be to do it on a Virtual machine. I am using VirtualBox Installing Contiki The easiest way is to use [viraldownloader id=211 text=’InstantContiki 2.7′]. The longer description of how to install on your existing virtual machine (vm) is also available at the bottom. Steps for firing up your instant contiki 2.7 Install vmware since the guest operating system is in VMDK and Vmx files [viraldownloader id=212 text=’vmplayer’] Start the VM instance and Contiki comes already installed. Steps for installation Install the following packages: Copy paste the following in your terminal. You need root access to perform this. sudo apt-get install build-essential binutils-msp430 gcc-msp430 msp430-libc binutils-avr gcc-avr gdb-avr avr-libc avrdude openjdk-7-jdk openjdk-7-jre ant libncurses5-dev doxygen git gtkterm This will allow you to cross-compile for MSP430- and AVR-platforms. Clone the Contiki sources from Github: git clone git://github.com/contiki-os/contiki.git contiki This is all about installing contiki. There is one more step where you will install SDCC to compile for 8051 devices. Installing SDCC to compile for cc2530/1 devices As always, first step is to install the pre-requisites. Copy paste the following in your terminal. sudo… Read more
Month: July 2021
Finding Aabenra (Åbenrå)
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)