czwartek, 27 czerwca 2019

RedPitaya authentication with 802.1x in wired networks via eth0

I searched Internet for a solution but I haven't found it, so I share it here. There is a simple way of configuring RedPitaya to connect it to a wired network which requires authentication by 802.1x. It is enough to add wired.conf file into: /etc/wpa_supplicant/ with the parameters provided by the network administrator and run a command as follows:
wpa_supplicant -i eth0 -D wired -c /etc/wpa_supplicant/wired.conf -B
An example of wired.conf file:
ctrl_interface=/run/wpa_supplicant

ap_scan=0

network={
        eapol_flags=0
        key_mgmt=IEEE8021X
        eap=TTLS
        phase2="auth=PAP"
        identity="MyUserId"
        anonymous_identity="MyUserId"
        password="MyPassword"
        priority=80
}  

środa, 7 listopada 2018

Red Pitaya output noise

Recently I've found very interesting post Adding voltage regulators for the RedPitaya output stage. As I'm using Red Pitaya I decided to analyse the problem with my 14bit Red Pitaya. I performed measurements similar to the one published by lneuhaus. Result you can see below.

Pitaya was supplied by a lab power supply as the switching adapter introduces relevant noise components to the generated signal. Noise was measured during generation of a weak note (10mVpp) at 1MHz. Output noise in the low frequency region decreased substantially after removing resistors. Exact procedure of the mod and the problem analysis are in the original post.

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.