czwartek, 12 stycznia 2017

RARP batch script

This is my batch script with functionality of reversed arp protocol. It is useful for finding IP address of computers with dynamic IP address like Raspberry Pi.
@ECHO OFF
REM "find" command error codes: 
REM  0 – The string you were searching for was found.
REM  1 – The string you were searching for was not found.
REM  2 – This means you had a bad switch or your parameters were incorrect.
 
REM To test: "arp -d [IP]" cancels entry from arp table. Root privilages are required.

setlocal enabledelayedexpansion

set IPclass=%1
set MACaddress=%2

set "result="

IF "%MACaddress%"=="" (
 ECHO Ver. 3.0
 ECHO Usage: rarp [IP class] [MAC address]
 ECHO My popular MAC addresses:
 ECHO Raspberry B = "b8-27-eb-xx-xx-xx"
 GOTO break
) ELSE (
 FOR /l %%i IN (1,1,254) DO (
  CALL :searchMAC
  
  IF ERRORLEVEL 1 GOTO break
  
  ping -n 1 -w 1 %IPclass%.%%i | find "Reply" > NUL
 )
)

REM There will be a for cycle if 'arp -a ^| findstr %MACaddress%' gives a reult of at least one line!!
:searchMAC
SET ERR=0
FOR /f "tokens=*" %%j IN ('arp -a ^| findstr %MACaddress%') DO (
 ECHO Found: %%j
 
 SET ERR=1
)
IF %ERR% == 0 ECHO|set /p="."
EXIT /b %ERR%

:break

wtorek, 27 września 2016

*.TRC file visualizer

Yesterday I published my MATLAB script for visualisation of data acquired from Siglent SSA spectrum analyser. The code can be found on github. Below you can find a screenshot of its GUI.


Pic. 1 - Screenshot.

wtorek, 26 maja 2015

Fitting Ethernet based LAN

This time something strictly connected to my education profile. We are transferring the laboratory of cryogenics. In the new rooms we need LAN based on Ethernet standard. I've spent some hours clamping and marking all these lines. There are four rooms in total intended for the new laboratory: cryogenic lab, office, dark-room and workshop.


Pic. 1 - 24 port switch.


Pic. 2 - Cables.

wtorek, 25 listopada 2014

3D printed box for RaspFPGA

This is my first printout using the fused deposition modelling technique. I've made an enclosure for the RaspFPGA board. Preparing CAD files I took the measurements of the second version of the RaspFPGA board but the first version of the RaspFPGA should also fit inside. It has been printed out on the Leapfrog creatr. For the final result look at the pictures below.


Pic. 1 - Enclosure.


Pic. 2 - RaspFPGA v2 board inside the box.

piątek, 11 lipca 2014

The second RaspFPGA mezzanine board for Raspberry Pi

This is the second version of the extension card for Raspberry Pi. As the previous one, this circuit connects all GPIO pins of Raspberry Pi to the FPGA chip. I've made a few modifications. Version 2 uses Spartan6 instead of Spartan3, it has 64MB of SDRAM and a small flash memory to store FPPGA configuration. It still leaves all remaining inputs/outputs pins of FPGA for the final user. Now the pin available are less than before because SDRAM occupies many of them. To do not loose this feature one can choose between having SDRAM or having all GPIO available. The choice is done by soldering jumpers in the appropriate places.


Pic. 1 - RaspFPGA v2 board.
The circuit is mechanically and electrically compatible with LCD TFTDisp 4 RaspPAR design published on my blog in March. It contains 25MHz clock source for FPGA, USB to RS232 converter and real time module.

czwartek, 5 czerwca 2014

4th Scientific Day of the School of Science and Technology

On the 11th of June I will present a poster about optomechanics during poster session in Palazzo Ducale of University of Camerino. The session starts at 10am. Details of the event one can find at 14th Scientific Day Official Poster.

Pic. 1 - Scientific poster - optomechanics.