Wednesday, 5 February 2014

DG843GT List dhcpd Clients

I wanted a way of listing connected devices that have been served an IP Address using the command line on my DG843GT ADSL2+ router with DGTeam Firmware. This firmware allows ssh login and the ability to change the noise margin amongst other things.

I began by looking at the link for attached devices on the admin webpage of the router. This URL was examined and the command nbtscan was noticed.

This was tried on the command-line but it didn't seem to do anything , nbtscan --help didn't help either.

I thought it must be something to do with arguments so I tried nbtscan (my routers IP Address) this listed the attached devices so it's a result.

I haven't written a script using expect to get and extract this info automatically yet but it's on my todo list.

Example of the command and its output xx added to anonymise my MAC addresses
 # nbtscan;UNKNOWN;00:xx:83:2D:xx:BA;TORE;00:1F:xx:C8:xx:B5;UNKNOWN;00:1B:xx:07:xx:A3;DEB;D6:56:xx:FE:xx:57;DAD;00:30:xx:46:xx:2E

Tuesday, 4 February 2014

Linux Tinyos example for patching a header file

 I was having problems making a simple program for TinyOS using the command :-

make micaz

The micaz is the target device and can be other devices like iris , telos & tmote etc.

The error I got was:- 

error: variable ‘McuSleepC__atm128PowerBits’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’

From reading around the issue is documented here.

The patch is downloaded to the ~/tinyos-main/ directory and it patches the atm128const.h file to prevent the error messages.

The patch is applied using the following command:-

patch -p1  < tinyos-atm128-const-fix.patch

CNC 6040 Spindle Control

Note: This is only an on - off control there is no speed control due to limitations on the CNC control box , you set the speed using the pot...