Saturday, August 25, 2018

LPD 8806 raspberry pi


LPD8806 datasheet
https://cdn-shop.adafruit.com/datasheets/lpd8806+english.pdf

LPD8806 strips have input side and output sides.

Arduino
https://cdn-learn.adafruit.com/downloads/pdf/digital-led-strip.pdf

https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md

SPI test
https://elixir.bootlin.com/linux/latest/source/tools/spi/spidev_test.c

https://pypi.org/project/raspi.lpd8806/

alright.  LPD8806 can only support upto 20MHz
Default RPi3 SPI clock is 125MHz.

change SPI clock
https://www.raspberrypi.org/forums/viewtopic.php?t=177965

https://github.com/ManiacalLabs/BiblioPixel

OK:
Raspberry pi 1 or zero or zero W.  works w/ py-spidev & RPi-LPD8806



Raspberry pi 3 does not even w/ 500KHz or lower SPI clock.  spitest shows SPI port behaves normal.  It could be a py-spidev problem.  Not sure.

====
    1  cd
    3  git clone https://github.com/doceme/py-spidev.git
    4  git clone https://github.com/adammhaile/RPi-LPD8806.git
    6  cd py-spidev/
    8  sudo python setup.py install
    9  cd ..
   11  cd RPi-LPD8806/
   14  sudo python setup.py install
   15  python example.py
   16  sudo modprobe spi_bcm2708
   17  sudo vi /boot/config.txt
   18  sudo reboot


Wednesday, August 15, 2018

iperf3 cross compile w/ buildroot

./configure --host=arm-linux CC=/home/xxxx/buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-gcc CXX=/home/xxxx/buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-g++ CFLAGS=-static CXXFLAGS=-static

vi src/Makefile.in
- remove -pg
Otherwise, it will fail with gcrt1.o...

make

single output file
src/iperf3


Sunday, August 5, 2018

Enable SSH server, Windows 10 Subsystem for Linux, Ubuntu

Enable SSH server on Windows Bash
start windows bash
sudo apt-get update
sudo apt-get purge openssh-server
sudo apt-get install openssh-server
sudo vi /etc/ssh/sshd_config
PermitRootLogin no
AllowUsers XXX
PasswordAuthentication yes
UsePrivilegeSeparation no
sudo service ssh --full-restart

for 18.04, may need
sudo ssh-keygen -A

Enable Key login
~/.ssh $ cat id_rsa.pub >> authorized_keys

Enable Port 22 Access from Windows Firewall
WF.msc
InboundRules
New Rule ...
Rule Type : Port
Protocol and Ports: TCP, Specific local ports: 22
Action: Allow the connection
Profile: Domain/Private/Public
Name: SSH

https://developer.nvidia.com/cuda-toolkit-archive
CUDA 9.0, cuDNN 7.0, python 3.5

CUDA 8.0, cuDNN 6.0, python 3.5
copy cudnn files to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0