Need By EOD Today

Typical management style with statement “Get this done by EOD today” (smaller timelines in big project) is probably worst way of project execution, it does not help in bigger context!

Side-Effects

  • Approach – More than anything else, it changes approach towards end deliverable, suddenly quick workarounds are preferred mechanisms rather than complete solutions.
  • Creativity – Timeline pressure diverts individuals mindset, and definitely there is loss of creativity. This reflects in problem solving attitude and hits project in longer run. Also affects thought process of developers in longer run.
  • Quality – This does not matter (or starts degrading) as everybody is after “artificial and un-necessary” deadline set before by management. This in turn definitely adds to overall project execution time in longer run.

 

On the other hand, if management has confidence in capabilities of team, and complete trust, then what really matters is project completion and not these “artificial deadlines” on day to day basis!

Advertisements
Posted in Uncategorized | Leave a comment

Bluetooth Low Energy 5.0

BLE v5.0 has been hot topic of discussion in Internet of Things (IoT) world. Revised specification tries to solve problem in creating wireless sensor network of devices with longer battery life requiring low throughput, compared with traditional WiFi.

Features

  • 2Mbps PHY speed (earlier being 1Mbps)
  • Longer range (4x)
  • Increase in maximum allowed TX power
  • Advertising Extensions

Details

  • Even though PHY speed is doubled, effective throughput is only 1.4x, as each packet requires additional byte in preamble header, and inter-frame spacing duration remains same. Hence effective throughput is 1.8x compared with earlier BLE standards.
  • PHY speed improvement helps in keeping radio on for low duration, thus helps in increasing battery life, also higher throughput addresses features like OTA upgrades for end devices.
  • BLEv5.0 uses FEC (Forward Error Correction) for long range communication, 4x range compared with earlier standard, but uses 1Mbps PHY for coded communication, decreasing effective throughput.
  • Maximum allowed TX power is increased from 10dbm to 20dbm, hence if cost is not barrier external PA can be used to increase range, instead of using coded PHY.
  • On advertising front, payload size can carry 251 bytes (previously 31 bytes), hence more power efficient.

Problems

  • Coexistence with WiFi:
    • WiFi and BLE uses different spread spectrum technologies for communication, Direct Sequence and Frequency Hoping respectively. In short, BLE Transmission is essentially noise for WiFi Receiver and vice-versa. More on this here, here.
    • This creates unique problem, if solution is providing BLE and WiFi combo, then either temporal or frequency domain separation is required for both technology to work reliably.
    • Collaborative coexistence is preferred method, where both WiFi and BLE devices talk to each other in real time (using 2-wire or 3-wire system) and implement time domain multiplexing for respective streams.
  • External PA vs Coded PHY could be interesting design challenge, as one is cost effective but reduces throughput/battery-life while other adds to cost in design.

Going Ahead

  • Looks promising, considering mesh networking capabilities in BLE, it could be well utilized in home/industrial automation in IoT
  • Memory requirements for typical BLEv5.0 stack supporting mesh networking could be another interesting lookout

 

Posted in Uncategorized | Leave a comment

Writing OS from Scratch

Why?

  • Because it is fun!
  • Bottom up approach to problem solving
  • Learn and explore ​under-the-hood stuff

Getting Started

  • Architecture X86, because of availability of tools (e.g. emulators)
  • Bootloader assumed to be GRUB
  • More information on following link

https://github.com/mahavirj/tinyos

Posted in Uncategorized | Leave a comment

Hackable IoT Devices

In addition to well known Raspberry-pi and arduino following are some lesser known but cheaper device for DIY hacks:

  • ESP8266 (WiFi)

Cheap WiFi module providing b/g/n connectivity using few AT commands over UART interface. It costs less than $3.5 (less than INR 300 in India). Manufactured by Espressif, which also provides IoT SDK. Also this module is currently supported in Arduino IDE as well.

https://espressif.com/en/products/esp8266/

https://pietrushnic.github.io/blog/2015/01/24/power-on-of-esp-12/

 

  • nrf51822 (Bluetooth Smart)

The nRF51822 is a powerful, highly flexible multiprotocol SoC ideally suited for Bluetooth® Smart (previously called Bluetooth low energy) and 2.4GHz ultra low-power wireless applications. The nRF51822 is built around a 32-bit ARM® Cortex™ M0 CPU with 256kB/128kB flash + 32kB/16kB RAM.

https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF51822

Posted in Embedded, Technology | Tagged , | Leave a comment

IoT Device Provisioning Methods

Following are various ways in which a WiFi IoT (Internet of Things) device can be provisioned to connect with home network (Access Point/Router) in a secure way:

Notes:

  • Credentials like security mode and passphrase for WiFi network needs to be secured
  • Enterprise security in WiFi network is not covered here

Micro-AP with WPA/2 Security

IoT device with micro-AP and WPA2 security mode can serve the purpose along with web/mobile application to provision device.

Pin Based Method (OPEN or Ad-hoc Mode AP)

IoT device will have some manufacturing pin printed on it and then user needs to enter this pin during provisioning on web/mobile application after associating with micro-AP started on device. Based on this pin, a common shared symmetric key will be derived which will be used to encrypt network credentials for selected scanned network list presented from device.

HTTPS Server on Device (OPEN or Ad-hoc Mode AP)

IoT device will start HTTPS server (port 443) with self signed certificate (can be modified by authentic one by OEM) and web/mobile application after associating with micro-AP started on device will provision the device from scanned network list. Since entire session is secured using TLS, no additional security is required.

WPS Method

WPS push-button or pin method to associate device with home router and in turn WiFi network.

IoT Device Sniffer Mode

Some custom protocols to sniff data from multicast packets and/or patterns over wireless channel from mobile clients to get network credentials. E.g. TI’s Smart Config

Apple Wireless Accessory Configuration

Apple custom protocol to MFI Licensees only, requires additional Authentication Coprocessor chip.

Limitations/Trade-off

  • Simultaneous provisioning of multiple devices
  • Mobile and/or client connectivity with home network
  • Ease-of-use for end-user
  • Security (Authenticity + Privacy) (Known vulnerabilities in WPS etc.)

Reference: TI’s White Paper

Posted in Embedded, Technology | Tagged | Leave a comment

GIT Tips

  • Recovering lost commit
$ git reflog
  • Diff files on 2 branches
$ git difftool branch1:file1 branch2:file2
  • Picking a commit from one to another branch
$ git cherry-pick -x
  • Selectively adding changes from file
$ git add -p
  • Finding un-pushed commits on local branch
$ git cherry -v
  • Saving/recovering temporary local changes
$ git stash save
$ git stash pop
$ git stash list
  • Display current working branch in repo
$ export PS1='[u@h W$(declare -F __git_ps1 &>/dev/null && __git_ps1 " (%s)")]$ '
Posted in Coding | Leave a comment

Coursera — Online Education

Completed Hardware Software Interface Course on Coursera. My first online learning course, completed with distinction.

Coursera

  • Great experience
  • Free knowledge sharing
  • Communitiy interaction
  • Platform for aspiring learners
  • Stuctured approach for course organization
Image | Posted on by | Leave a comment