Quick jump:  What's new

 
Go to:
 
Weblog: recent changes   
in Dobrica Pavlinušić's random unstructured stuff
A33



meanIT tablet Q70

7" IPS Quad Core

recovery: extdroid4.4.2_r2-a33-v2.0

adb shell

dpavlin@siobhan:~$ adb shell
root@astar-ococci:/ #

root@astar-ococci:/ # cat /proc/cmdline                                        
console=ttyS0,115200 root=/dev/nandd init=/init loglevel=4 specialstr= partitions=bootloader@nanda:env@nandb:boot@nandc:system@nandd:data@nande:misc@nandf:recovery@nandg:cache@nandh:metadata@nandi:private@nandj:UDISK@nandk boot_type=0 config_size=39716

root@astar-ococci:/ # cat /proc/cpuinfo                                        
Processor       : ARMv7 Processor rev 5 (v7l)
processor       : 0
BogoMIPS        : 5714.28

processor       : 1
BogoMIPS        : 4800.00

processor       : 3
BogoMIPS        : 4800.00

Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5

Hardware        : sun8i
Revision        : 0000
Serial          : 1a884915


board

AL-AX3-751B-V1.0
2015.03.26

http://linux-sunxi.org/Aoson_M751s

https://github.com/Icenowy/linux-kernel-lichee-a33/tree/aoson-m751s

usb fel

Vol+ to enter FEL mode

Bus 003 Device 004: ID 1f3a:efe8 Onda (unverified) V972 tablet in flashing mode

root@x230:~# sunxi-fel ver
AWUSBFEX soc=00001667(A33) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000

# read SID
root@x230:~# sunxi-fel readl 0x01c23800
0x0461872a

root@x230:~# sunxi-fel sid
0461872a:033c50c3:1a884915:00000000


device info


dpavlin@x230:~/a33$ sudo sunxi-fel read 0x42400000 0x82d0 boot1.header

# blocks and version doesn't work any more

root@x230:~# sunxi-fel -v read 0x43000000 0x20000 script.bin 

# also doesn't transfer anything and hangs



extract data from device

dpavlin@klin:/klin/armbian/sunxi-tools$ make CROSS_COMPILE=arm-linux-gnueabihf- sunxi-meminfo
arm-linux-gnueabihf-gcc -std=c99 -Wall -Wextra -Wno-unused-result -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -static  -o sunxi-meminfo meminfo.c
dpavlin@klin:/klin/armbian/sunxi-tools$ make CROSS_COMPILE=arm-linux-gnueabihf- sunxi-script_extractor
arm-linux-gnueabihf-gcc -std=c99 -Wall -Wextra -Wno-unused-result -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -static  -o sunxi-script_extractor script_extractor.c

# put files in /cache/ instead of /sdcard/ since /sdcard/ doesn't have executable permission
dpavlin@x230:/mnt/klin/klin/armbian/sunxi-tools$ adb push sunxi-script_extractor /cache/
[100%] /cache/sunxi-script_extractor
dpavlin@x230:/mnt/klin/klin/armbian/sunxi-tools$ adb push sunxi-meminfo /cache/
[100%] /cache/sunxi-meminfo

root@astar-ococci:/cache # ./sunxi-meminfo                                     
Error: unknown or unhandled Soc: 0x1667
255|
# urgh!

svroot@astar-ococci:/cache # ./sunxi-script_extractor > a33.bin                  
root@astar-ococci:/cache # ls -al a33.bin                                      
-rw-rw-rw- root     root       131072 2017-10-18 17:57 a33.bin





u-boot

dpavlin@klin:/klin/u-boot$ git remote -v
sunxi   git://git.denx.de/u-boot-sunxi.git (fetch)
sunxi   git://git.denx.de/u-boot-sunxi.git (push)

dpavlin@klin:/klin/u-boot$ git checkout -b sunxi/next sunxi/next
Branch 'sunxi/next' set up to track remote branch 'next' from 'sunxi'.
Switched to a new branch 'sunxi/next'

dpavlin@klin:/klin/u-boot$ make CROSS_COMPILE=arm-linux-gnueabihf- q8_a33_tablet_1024x600_defconfig

dpavlin@klin:/klin/u-boot$ make CROSS_COMPILE=arm-linux-gnueabihf- -j4



permalink
CubieBoard
BreadBoard V1.0 03-25 For CubieBoard.pdf



A20

NAND in mainline kernel

Samsung K9GBG08U0A NAND

u-boot

HELLO! BOOT0 is starting!
boot0 version : 1.5.1
dram size =1024
Succeed in opening nand flash.
Succeed in reading Boot1 file head.
The size of Boot1 is 0x0003c000.
The file stored in 0X00000000 of block 2 is perfect.
Check is correct.
Ready to disable icache.
Succeed in loading Boot1.
Jump to Boot1.
[       0.133] boot1 version : 1.4.0
[       0.133] pmu type = 3
[       0.134] bat vol = 0
[       0.161] axi:ahb:apb=3:2:2
[       0.161] set dcdc2=1400, clock=1008 successed
[       0.163] key
[       0.175] no key found
[       0.175] flash init start
[       4.051] flash init finish
[       4.052] fs init ok
[       4.053] fattype FAT16
[       4.053] fs mount ok
[       4.060] script finish
[       4.061] power finish
[       4.069] BootMain start
[       4.069] 13
[       4.089] key value = 0
[       4.089] recovery key high 6, low 4
[       4.090] unable to find fastboot_key key_max value
[       4.098] test for multi os boot with display
[       4.100] show pic finish
[       4.103] load kernel start
[       4.127] load kernel successed
[       4.127] start address = 0x4a00000

U-Boot 2011.09-rc1 (Nov 26 2012 - 14:01:52) Allwinner Technology 

CPU:   SUNXI Family
Board: A10-EVB
DRAM:  512 MiB
NAND:  3776 MiB
In:    serial
Out:   serial
Err:   serial
--------fastboot partitions--------
-total partitions:11-
-name-        -start-       -size-      
bootloader  : 1000000       1000000     
env         : 2000000       1000000     
boot        : 3000000       2000000     
system      : 5000000       14000000    
data        : 19000000      20000000    
misc        : 39000000      1000000     
recovery    : 3a000000      2000000     
cache       : 3c000000      8000000     
private     : 44000000      1000000     
sysrecovery : 45000000      14000000    
UDISK       : 59000000      93000000    
-----------------------------------
Hit any key to stop autoboot:  0 
sunxi#

compile

dpavlin@klin:/klin/u-boot$ cp configs/Cubieboard_defconfig .config

# add NAND, MTD options, A10 for cubieboard1

# compile while defining flash:

dpavlin@klin:/klin/u-boot$ cat build-cubieboard.sh 
make V=1 CONFIG_NAND_SUNXI_SPL_ECC_STRENGTH=40 CONFIG_SYS_NAND_PAGE_SIZE=4036 CONFIG_SYS_NAND_OOBSIZE=640 CONFIG_SYS_NAND_BLOCK_SIZE=0x100000


dpavlin@cubieboard:~$ scp 10.60.0.92:/klin/u-boot/u-boot*spl* .

dpavlin@cubieboard:~$ sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8 
488+1 records in
488+1 records out
500154 bytes (500 kB) copied, 0.0423498 s, 11.8 MB/s


pinout

U14 (Next to SATA connector)

  SPI0
48 PI13 (SPI0-MISO/UART6-RX/EINT25) 47 PI11 (SPI0-CLK/UART5-RX/EINT23)
46 PI12 (SPI0-MOSI/UART6-TX/EINT24) 45 PI10 (SPI0-CS/UART5-TX/EINT22)
  LCD
44 3.3V (nc in 2012-08-08) 43 VCC-5V
42 Ground 41 SPDIF
40 PB10 (LCD0-SCK/LCD-PIO1) 39 PB11 (LCD0-SDA/LCD-PIO2)
38 Ground 37 PH7 (LCD0-BL-EN/LCD-PIO0/UART5-RX/EINT7)
36 XN_TP (TP-X2) 35 YN_TP (TP-Y2)
34 XP_TP (TP-X1) 33 YP_TP (TP-Y1)
32 PD25 (LCDDE) 31 PB2 (PWM0)
30 PD26 (LCDHSYNC)-VGA-HSYNC 29 PD24 (LCDCLK)
28 PD23 (LCDD23) 27 PD27 (LCDVSYNC)-VGA-VSYNC
26 PD21 (LCDD21) 25 PD22 (LCDD22)
24 PD19 (LCDD19/LVDS1N3) 23 PD20 (LCDD20)
22 PD17 (LCDD17/LVDS1NC) 21 PD18 (LCDD18/LVDS1P3)
20 Ground 19 PD16 (LCDD16/LVDS1PC)
18 PD14 (LCDD14/LVDS1P2) 17 PD15 (LCDD15/LVDS1N2)
16 PD12 (LCDD12/LVDS1P1) 15 PD13 (LCDD13/LVDS1N1)
14 PD10 (LCDD10/LVDS1P0) 13 PD11 (LCDD11/LVDS1N0)
12 PD8 (LCDD8/LVDS0P3) 11 PD9 (LCDD9/LVDS0N3)
10 PD7 (LCDD7/LVDS0NC) 9 Ground
8 PD5 (LCDD5/LVDS0N2) 7 PD6 (LCDD6/LVDS0PC)
6 PD3 (LCDD3/LVDS0N1) 5 PD4 (LCDD4/LNVS0P2)
4 PD1 (LCDD1/LVDS0N0) 3 PD2 (LCDD2/LVDS0P1)
2 Ground 1 PD0 (LCDD0/LVDSP0)

U15 (Between Ethernet port and USB ports)

  CSI1/TS
1 VCC-5V 2 PH15 (CSI1-PWR/EINT15)
3 CSI1-IO-2V8 4 PH14 (CSI1-RST#/EINT14)
5 PG0 (CSI1-PCLK/SDC1-CMD) 6 PB18 (TWI1-SCK)
7 PB19 (TWI1-SDA) 8 PG3 (CSI1-VSYNC/SDC1-D1)
9 PG2 (CSI1-HSYNC/SDC1-D0) 10 PG1 (CSI1-MCLK/SDC1-CLK)
11 PG4 (CSI1-D0/SDC1-D2) 12 PG5 (CSI1-D1/SDC1-D3)
13 PG6 (CSI1-D2/UART3-TX) 14 PG7 (CSI1-D3/UART3-RX
15 PG8 (CSI1-D4/UART3-RTS) 16 PG9 (CSI1-D5/UART3-CTS)
17 PG10 (CSI1-D6/UART4-TX) 18 PG11 (CSI1-D7/UART4-RX)
19 Ground 20 Ground
  Analog SDIO3
21 FMINL 22 PI4 (SDC3-CMD)
23 FMINR 24 PI5 (SDC3-CLK)
25 Ground 26 PI6 (SDC3-D0)
27 VGA-R 28 PI7 (SDC3-D1)
29 VGA-G 30 PI8 (SDC3-D2)
31 VGA-B 32 PI9 (SDC3-D3)
  CSI0/TS
33 LCD1-VSYNC 34 PE4 (CSI0-D0)
35 LCD1-HSYNC 36 PE5 (CSI0-D1)
37 Ground 38 PE6 (CSI0-D2)
39 AVCC 40 PE7 (CSI0-D3)
41 LRADC0 42 PE8 (CSI0-D4)
43 CVBS 44 PE9 (CSI0-D5)
45 HPL 46 PE10 (CSI0-D6)
47 HPR 48 PE11 (CSI0-D7)


everything below line is for legacy kernel and quite old

disk speed

NAND

root@cubieboard2:/home/dpavlin# uname -a
Linux cubieboard2 3.4.109-sun7i #4 SMP PREEMPT Sun Oct 11 14:32:15 CEST 2015 armv7l GNU/Linux
root@cubieboard2:/home/dpavlin# hdparm -t /dev/nand

/dev/nand:
 Timing buffered disk reads:  32 MB in  3.22 seconds =   9.94 MB/sec

# this is different, faster sdcard
root@cubieboard2:~# uname -a
Linux cubieboard2 4.3.3-sunxi #3 SMP Mon Dec 28 11:27:16 CET 2015 armv7l GNU/Linux
root@cubieboard2:~# hdparm -tT /dev/mmcblk0

/dev/mmcblk0:
 Timing cached reads:   770 MB in  2.00 seconds = 384.59 MB/sec
 Timing buffered disk reads:  60 MB in  3.05 seconds =  19.67 MB/sec



SATA

Powered by 2A Nexus 7 power supply (for SATA)

https://groups.google.com/d/searchin/cubieboard/sata/cubieboard/hKJgJneGVmQ/xme3w4Y7XtsJ?fromplusone=1

root@debian:~/sunxi-tools# ./bin2fex /boot/script.bin script.fex
fexc-bin: /boot/script.bin: version: 0.1.2
fexc-bin: /boot/script.bin: size: 42144 (76 sections)

root@debian:~/sunxi-tools# cp script.fex script+sata.fex

root@debian:~/sunxi-tools# diff -urw script.fex script+sata.fex 
--- script.fex  2013-05-30 10:41:13.979510762 +0000
+++ script+sata.fex     2013-05-30 10:42:36.380244101 +0000
@@ -595,7 +595,7 @@
 
 [sata_para]
 sata_used = 1
-sata_power_en =
+sata_power_en = port:PB08<1><default><default><0>
 
 [mmc0_para]
 sdc_used = 1

root@debian:~/sunxi-tools# ./fex2bin script+sata.fex /boot/script.bin

root@debian:/etc# git diff
diff --git a/modules b/modules
index d8894c3..9e65a80 100644
--- a/modules
+++ b/modules
@@ -4,3 +4,4 @@
 # at boot time, one per line. Lines beginning with "#" are ignored.
 # Parameters can be specified after the module name.
 
+sw_ahci_platform

Reboot to activate changes and test speed (using 80G intel SSD to have sense of maximum performance)

root@debian:~# hdparm -i /dev/sda

/dev/sda:

 Model=INTEL SSDSA2M080G2GC, FwRev=2CV102HD, SerialNo=CVPO035101VN080JGN
 Config={ Fixed }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=1
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: ATA/ATAPI-7 T13 1532D revision 1:  ATA/ATAPI-2,3,4,5,6,7

 * signifies the current active mode

root@debian:~# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   784 MB in  2.00 seconds = 392.08 MB/sec
 Timing buffered disk reads: 460 MB in  3.00 seconds = 153.32 MB/sec

And test with disk:

root@debian:~# hdparm -i /dev/sda

/dev/sda:

 Model=ST96812AS, FwRev=7.24, SerialNo=3PJ1GCKE
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=off
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=117231408
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 
 AdvancedPM=yes: unknown setting WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode

root@debian:~# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   746 MB in  2.00 seconds = 372.90 MB/sec
 Timing buffered disk reads: 120 MB in  3.03 seconds =  39.56 MB/sec

GPIO

Camera

OV7670 is supported http://linux-sunxi.org/CSI

hardware

pinout: gpio_defination_large.jpg

https://www.olimex.com/wiki/How_to_add_pwm

cat /sys/class/pwm-sunxi/pwm0/pin 
PB2

echo 10khz > /sys/class/pwm-sunxi/pwm0/period

echo 25 > /sys/class/pwm-sunxi/pwm0/duty_percent

echo 1 > /sys/class/pwm-sunxi/pwm0/run

LEDs

dpavlin@cubieboard2:~$ grep . /sys/class/leds/*/trigger 
/sys/class/leds/blue:ph21:led2/trigger:none battery-charging-or-full battery-charging battery-full battery-charging-blink-full-solid ac-online usb-online mmc0 timer [heartbeat] backlight cpu0 cpu1 default-on 
/sys/class/leds/green:ph20:led1/trigger:[none] battery-charging-or-full battery-charging battery-full battery-charging-blink-full-solid ac-online usb-online mmc0 timer heartbeat backlight cpu0 cpu1 default-on 

forum

permalink
Turris Omnia


documentation

reset modes

https://www.turris.cz/doc/en/howto/omnia_factory_reset

 Available reset modes:

    1 LED: Standard (re)boot
    2 LEDs: Rollback to latest snapshot
    3 LEDs: Rollback to factory reset
    4 LEDs: Re-flash router from flash drive
    5 LEDs or more: Boot to rescue shell

vlan

GPIO pinout

omnia-pin-header.png

PWM same on all pins

Debian

root@turris:/mnt/tmp# wget http://aule.elfove.cz/~brill/omnia-debian/omnia-medkit-20170330.tar.gz

# boot into rescue mode

root@(none):~# mount /dev/mmcblk0p1 /target/

root@(none):~# btrfs subvolume create /target/@debian


watchdog will timeout, but you will eventually have subvolume visible from u-boot (which is not case if you just create subvolume from Turris OS


root@turris:/# btrfs sub create @debian
Create subvolume './@debian'

root@turris:/# cd /@debian
root@turris:/@debian# tar xf /mnt/tmp/omnia-medkit-20170330.tar.gz 
root@turris:/@debian# btrfs fi df .
System, single: total=32.00MiB, used=4.00KiB
Data+Metadata, single: total=3.68GiB, used=2.25GiB
GlobalReserve, single: total=48.00MiB, used=0.00B

root@turris:/@debian# vi etc/network/interfaces
auto br0
iface br0 inet static
        bridge_ports wlan0 eth0 eth2
        address 192.168.3.254
        netmask 255.255.255.0
        gateway 192.168.3.1
root@turris:~# echo b > /proc/sysrq-trigger
[54760.278340] sysrq: SysRq : Resetting
[54760.282039] CPU1: stopping
   
U-Boot SPL 2015.10-rc2 (Aug 18 2016 - 20:43:35)
High speed PHY - Version: 2.0
SERDES0 card detect: NONE
   
Initialize Turris board topology
Detected Device ID 6820
board SerDes lanes topology details:
 | Lane #  | Speed |  Type       |
 --------------------------------
 |   0    |  5   |  PCIe0       |
 |   1    |  5   |  USB3 HOST0  |
 |   2    |  5   |  PCIe1       |
 |   3    |  5   |  USB3 HOST1  |
 |   4    |  5   |  PCIe2       |
 |   5    |  0   |  SGMII2      |
 --------------------------------
poll_op_execute: TIMEOUT
PCIe, Idx 0: detected no link
PCIe, Idx 1: detected no link
PCIe, Idx 2: detected no link
High speed PHY - Ended Successfully
DDR3 Training Sequence - Ver TIP-1.29.0
Memory config in EEPROM: 0x01
DDR3 Training Sequence - Switching XBAR Window to FastPath Window
DDR3 Training Sequence - Ended Successfully

   
U-Boot 2015.10-rc2 (Aug 18 2016 - 20:43:35 +0200), Build: jenkins-omnia-master-23
   
SoC:   MV88F6820-A0
       Watchdog enabled
I2C:   ready
SPI:   ready
DRAM:  1 GiB (ECC not enabled)
Enabling Armada 385 watchdog.
Disabling MCU startup watchdog.
Regdomain set to **
MMC:   mv_sdh: 0
SF: Detected S25FL164K with page size 256 Bytes, erase size 64 KiB, total 8 MiB
*** Warning - bad CRC, using default environment
   
Model: Marvell Armada 385 GP
Board: Turris Omnia SN: 0000000B0000B8E5
Regdomain set to **
SCSI:  MVEBU SATA INIT
SATA link 0 timeout.
SATA link 1 timeout.
AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
flags: 64bit ncq led only pmp fbss pio slum part sxs
Net:   neta2
Hit any key to stop autoboot:  0
=> 

=> setenv debbootargs earlyprintk console=ttyS0,115200 rootfstype=btrfs rootwait root=/dev/mmcblk0p1 rootflags=subvol=@debian,commit=5 rw
=> setenv debboot 'setenv bootargs "$debbootargs cfg80211.freg=$regdomain"; btrload mmc 0 0x01000000 boot/vmlinuz @debian; btrload mmc 0 0x02000000 boot/dtb @debian; btrload mmc 0 0x03000000 boot/initrd.img @debian; bootz 0x01000000 0x03000000:$filesize 0x02000000'
=> saveenv
Saving Environment to SPI Flash...
SF: Detected S25FL164K with page size 256 Bytes, erase size 64 KiB, total 8 MiB
Erasing SPI flash...Writing to SPI flash...done

=> setenv defbootcmd "$bootcmd"
=> setenv debbootcmd 'i2c dev 1; i2c read 0x2a 0x9 1 0x00FFFFF0; setexpr.b rescue *0x00FFFFF0; if test $rescue -ge 2; then echo BOOT RESCUE; run rescueboot; else if test $rescue -ge 1; then echo BOOT eMMC TurrisOS FS; run mmcboot; else echo BOOT eMMC Debian FS; run debboot; fi; fi'
=> setenv bootcmd "$debbootcmd"
=> saveenv
Saving Environment to SPI Flash...
Erasing SPI flash...Writing to SPI flash...done




permalink
TC7200

Tehnicolor cable modem



http://192.168.100.1/
user: (blank)
password: admin

telnet 192.168.100.1
login: webstar
password: webstar

telnet 192.168.0.10
login: root
password: admin

serial

http://www.boards.ie/vbulletin/showthread.php?p=88976002#post88976002

snmp

http://blog.vucica.net/2014/01/few-notes-on-upc-irelands-technicolor-tc7200.html

# modem mode (not a router, wifi doesn't work!)

snmpset -v2c -c public 192.168.100.1 1.3.6.1.4.1.4413.2.2.2.1.7.1.1.0 i 1
permalink
NUC

D54250WKYXH
19V - 3.42A
04/2014



https://downloadcenter.intel.com/product/76977/Intel-NUC-Kit-D54250WYK

bios

https://downloadcenter.intel.com/download/23607

current: WYLPT10H.86A.0021.2013.1017.1606
i5-4250U @ 1.30GHz

make sure that usb keychain you are using with F7 bios update option has GPT partition table on it!

dpavlin@x200:~$ sudo gdisk -l /dev/sdc
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdc: 3948544 sectors, 1.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7564450A-7BE4-41EA-90E3-809C8C50BE51
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3948510
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         3948510   1.9 GiB     0700  Microsoft basic data

headers

sensors

dpavlin@nuc:~$ grep nct /etc/modules
nct6775

dpavlin@nuc:~$ sensors


nct6776-isa-0a00
Adapter: ISA adapter
Vcore:          +1.77 V  (min =  +0.00 V, max =  +1.74 V)  ALARM
in1:            +1.35 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
AVCC:           +3.34 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
+3.3V:          +3.34 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in4:            +1.01 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in5:            +0.00 V  (min =  +0.00 V, max =  +0.00 V)
in6:            +0.24 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
3VSB:           +3.33 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
Vbat:           +3.20 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
fan1:             0 RPM  (min =    0 RPM)
fan2:          3183 RPM  (min =    0 RPM)
fan3:             0 RPM  (min =    0 RPM)
SYSTIN:        +123.0°C  (high =  +0.0°C, hyst =  +0.0°C)  ALARM  sensor = CPU diode
CPUTIN:         +37.5°C  (high = +80.0°C, hyst = +75.0°C)  sensor = CPU diode
AUXTIN:         +41.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = CPU diode
PECI Agent 0:   +40.0°C  (high = +80.0°C, hyst = +75.0°C)
                         (crit = +100.0°C)
PCH_CHIP_TEMP:   +0.0°C  (high = +80.0°C, hyst = +75.0°C)
PECI Agent 1:    +0.0°C  (high = +80.0°C, hyst = +75.0°C)
                         (crit =  +0.0°C)
PCH_CPU_TEMP:    +0.0°C  
intrusion0:    OK
intrusion1:    OK
beep_enable:   disabled

acpitz-virtual-0
Adapter: Virtual device
temp1:        +27.8°C  (crit = +105.0°C)
temp2:        +29.8°C  (crit = +105.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +42.0°C  (high = +100.0°C, crit = +100.0°C)
Core 0:        +42.0°C  (high = +100.0°C, crit = +100.0°C)
Core 1:        +39.0°C  (high = +100.0°C, crit = +100.0°C)
permalink
Lamobo R1
GPIO 2.png

Lamobo/BananaPi R1

http://linux-sunxi.org/Lamobo_R1



switch connects all ports on boot

https://github.com/armbian/build/issues/511#issuecomment-258647387

uart

Connect your UART adapter here:

UART0-RX: J13-P01
UART0-TX: J13-P02
GND: J12-P08

                          GND TX RX
             J12   o  o  o  o  o  o
{SD slot}          o  o  o  o


switch

https://www.mail-archive.com/netdev@vger.kernel.org/msg150526.html

port mirroring

https://www.mail-archive.com/netdev@vger.kernel.org/msg150526.html

# ingress
      tc qdisc  add dev eth1 handle ffff: ingress
      tc filter add dev eth1 parent ffff:           \
               matchall skip_sw                      \
               action mirred egress mirror           \
               dev eth2
# egress
      tc qdisc add dev eth1 handle 1: root prio
      tc filter add dev eth1 parent 1:               \
               matchall skip_sw                       \
               action mirred egress mirror            \
               dev eth2

usb otg

http://git.rot13.org/?p=usb-otg;a=summary

usbproxy

make sure that there are no other usb modules loaded (libcomposite or g_*)

mitm usb otg machine

dpavlin@r1:~/USBProxy$ git remote -v
origin  https://github.com/dominicgs/USBProxy (fetch)
origin  https://github.com/dominicgs/USBProxy (push)

dpavlin@r1:~/USBProxy/src/build$ sudo usb-mitm -l -v 058f -p 6387 -P PacketFilter_MassStorage
Loading plugins from /usr/local/lib/USBProxy/
vendorId=058f
productId=6387
cleaning up /tmp
removing 1
Made directory /tmp/gadget-SOOBVj for gadget
UnblockPassword=
Printing Config data
        Strings: 4
                DeviceProxy: DeviceProxy_LibUSB
                HostProxy: HostProxy_GadgetFS
                productId: 6387
                vendorId: 058f
        Vectors: 1
                Plugins:
                        PacketFilter_StreamLog
                        PacketFilter_MassStorage
Pointer: 1
                PacketFilter_StreamLog::file: 0xb6d779f0
Device: 12 01 00 02 00 00 00 40 8f 05 87 63 00 01 01 02 03 01
  Manufacturer: JetFlash
  Product:      Mass Storage Device
  Serial:       GUYOBHDU
        *Config(1): 09 02 20 00 01 01 00 80 32
                Interface(0):
                        *Alt(0): 09 04 00 00 02 08 06 50 00
                                EP(01): 07 05 01 02 00 02 00
                                EP(82): 07 05 82 02 00 02 00
HS Qualifier: 0a 06 00 02 00 00 00 40 01 00
         Config(1): 09 07 20 00 01 01 00 80 32
                Interface(0):
                        *Alt(0): 09 04 00 00 02 08 06 50 00
                                EP(01): 07 05 01 02 40 00 00
                                EP(82): 07 05 82 02 40 00 00
searching in [/tmp/gadget-SOOBVj]
Starting injector thread (14796) for [Injector].
Injector In FD[1/1]: 3
Starting setup writer thread (14799) for EP00.
Starting setup reader thread (14797) for EP00.
[80 06 00 03 00 00 ff 00]
[80 06 00 03 00 00 04 00]: 04 03 09 04
[80 06 02 03 09 04 ff 00]
[80 06 02 03 09 04 28 00]:
        28 03 4d 00 61 00 73 00 73 00 20 00 53 00 74 00 6f 00 72 00 61 00 67 00 65 00 20 00 44 00 65 00
        76 00 69 00 63 00 65 00
[80 06 01 03 09 04 ff 00]
[80 06 01 03 09 04 12 00]: 12 03 4a 00 65 00 74 00 46 00 6c 00 61 00 73 00 68 00
[80 06 03 03 09 04 ff 00]
[80 06 03 03 09 04 12 00]: 12 03 47 00 55 00 59 00 4f 00 42 00 48 00 44 00 55 00
[00 09 01 00 00 00 00 00]
Opened EP01
Opened EP82
Starting writer thread (14802) for EP01.
Starting reader thread (14803) for EP82.
Starting writer thread (14804) for EP82.
Starting reader thread (14801) for EP01.
[a1 fe 00 00 00 00 01 00]
[a1 fe 00 00 00 00 00 00]
01[31]: 55 53 42 43 01 00 00 00 24 00 00 00 80 00 06 12 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00
CBW: (12), tag: 01 00 00 00

[80 06 03 03 09 04 ff 00]
[80 06 03 03 09 04 12 00]: 12 03 47 00 55 00 59 00 4f 00 42 00 48 00 44 00 55 00
[00 09 01 00 00 00 00 00]


original target device

dpavlin@nuc:~$ journalctl -t kernel -f
Sep 01 11:10:04 nuc kernel: usb 2-4.4.2: new high-speed USB device number 45 using xhci_hcd
Sep 01 11:10:04 nuc kernel: usb 2-4.4.2: New USB device found, idVendor=058f, idProduct=6387
Sep 01 11:10:04 nuc kernel: usb 2-4.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 01 11:10:04 nuc kernel: usb 2-4.4.2: Product: Mass Storage Device
Sep 01 11:10:04 nuc kernel: usb 2-4.4.2: Manufacturer: JetFlash
Sep 01 11:10:04 nuc kernel: usb 2-4.4.2: SerialNumber: GUYOBHDU
Sep 01 11:10:04 nuc kernel: usb-storage 2-4.4.2:1.0: USB Mass Storage device detected
Sep 01 11:10:04 nuc kernel: scsi host5: usb-storage 2-4.4.2:1.0

# BUT!

dpavlin@nuc:~$ sudo fdisk -l /dev/sdb
fdisk: cannot open /dev/sdb: No medium found


WiringPi

dpavlin@r1:~/BPI-WiringPi2$ git remote -v
lanefu  https://github.com/lanefu/WiringOtherPi (fetch)
lanefu  https://github.com/lanefu/WiringOtherPi (push)
origin  https://github.com/BPI-SINOVOIP/BPI-WiringPi2 (fetch)
origin  https://github.com/BPI-SINOVOIP/BPI-WiringPi2 (push)

dpavlin@r1:~/BPI-WiringPi2$ gpio readall
 +-----+-----+----------+------+---+-Orange Pi+---+---+------+---------+-----+--+
 | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
 +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
 |     |     |     3.3v |      |   |  1 || 2  |   |      | 5v       |     |     |
 |  12 |   8 |    SDA.0 |   IN | 0 |  3 || 4  |   |      | 5V       |     |     |
 |  11 |   9 |    SCL.0 |   IN | 0 |  5 || 6  |   |      | 0v       |     |     |
 |   6 |   7 |   GPIO.7 |   IN | 0 |  7 || 8  | 0 | IN   | TxD3     | 15  | 13  |
 |     |     |       0v |      |   |  9 || 10 | 0 | IN   | RxD3     | 16  | 14  |
 |   1 |   0 |     RxD2 |   IN | 0 | 11 || 12 | 0 | IN   | GPIO.1   | 1   | 110 |
 |   0 |   2 |     TxD2 |   IN | 0 | 13 || 14 |   |      | 0v       |     |     |
 |   3 |   3 |     CTS2 |   IN | 0 | 15 || 16 | 0 | IN   | GPIO.4   | 4   | 68  |
 |     |     |     3.3v |      |   | 17 || 18 | 0 | IN   | GPIO.5   | 5   | 71  |
 |  64 |  12 |     MOSI |   IN | 0 | 19 || 20 |   |      | 0v       |     |     |
 |  65 |  13 |     MISO |   IN | 0 | 21 || 22 | 0 | IN   | RTS2     | 6   | 2   |
 |  66 |  14 |     SCLK |   IN | 0 | 23 || 24 | 0 | IN   | CE0      | 10  | 67  |
 |     |     |       0v |      |   | 25 || 26 | 0 | IN   | GPIO.11  | 11  | 21  |
 |  19 |  30 |    SDA.1 |   IN | 0 | 27 || 28 | 0 | IN   | SCL.1    | 31  | 18  |
 |   7 |  21 |  GPIO.21 |   IN | 0 | 29 || 30 |   |      | 0v       |     |     |
 |   8 |  22 |  GPIO.22 |   IN | 0 | 31 || 32 | 0 | IN   | RTS1     | 26  | 200 |
 |   9 |  23 |  GPIO.23 |   IN | 0 | 33 || 34 |   |      | 0v       |     |     |
 |  10 |  24 |  GPIO.24 |   IN | 0 | 35 || 36 | 0 | IN   | CTS1     | 27  | 201 |
 |  20 |  25 |  GPIO.25 |   IN | 0 | 37 || 38 | 0 | IN   | TxD1     | 28  | 198 |
 |     |     |       0v |      |   | 39 || 40 | 0 | IN   | RxD1     | 29  | 199 |
 +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
 | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
 +-----+-----+----------+------+---+-Orange Pi+---+------+----------+-----+-----+



TMP75

root@r1:/etc/telegraf# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- 49 -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         


dpavlin@r1:~$ cc tmp.c -o tmp -lm
dpavlin@r1:~$ sudo ./tmp /dev/i2c-1 0x49
21.5

permalink
ESP8266


links

module_v2.png

  • all IO is 3.3V (3.6V max)
  • CH_PD i chip-enable and has to be connected to VCC (3.3V)
  • RST, GPIO0, GPIO2 should be pulled up to VCC for normal operation (GPIO0 at minumum!)
  • GPIO0 pull to ground for firmware update
  • make sure that 3.3V VCC power supply can support 300-400mA or there WILL be problems!

serial port

baud rate 115200

AT+GMR
00160901

OK

AT+RST

OK

 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 24444, room 16 
tail 12
chksum 0xe0
ho 0 tail 12 room 4
load 0x3ffe8000, len 3168, room 12 
tail 4
chksum 0x93
load 0x3ffe8c60, len 4956, room 4 
tail 8
chksum 0xbd
csum 0xbd

ready


ESP-201

http://www.banggood.com/ESP8266-ESP-201-Remote-Serial-Port-WIFI-Transceiver-Wireless-Module-p-964288.html

ESP8266-ESP-201-pin-reference-v01.png

from http://smarpl.com/content/esp8266-esp-201-module-first-impressions

One quirk with the ESP-201 is that is IO15 has to be grounded for the device to function. To flash the device IO00 has to be grounded.

AT+RST

OK

 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 212, room 16 
tail 4
chksum 0x5e
load 0x3ffe8000, len 788, room 4 
tail 0
chksum 0x1c
load 0x3ffe8314, len 72, room 8 
tail 0
chksum 0x55
csum 0x55
jump to user1


nodemcu

esptool.py

dpavlin@x200:/rest/cvs/esptool$ git remote -v
origin  https://github.com/themadinventor/esptool (fetch)
origin  https://github.com/themadinventor/esptool (push)

dpavlin@x200:/rest/cvs/esptool$ ./esptool.py --port /dev/ttyUSB2 read_mac
Connecting...
MAC: 18:fe:34:a0:38:72

flash firmware

dpavlin@blue:/opt/Espressif/esptool$ ./esptool.py read_mac
Connecting...
MAC: 18:fe:34:a0:38:72
dpavlin@blue:/opt/Espressif/esptool$ ./esptool.py --port /dev/ttyUSB0 write_flash 0x00000 ../nodemcu-firmware/pre_build/latest/nodemcu_latest.bin 
Connecting...
Erasing flash...
Writing at 0x00010800... (17 %) 

Get latest build from https://github.com/nodemcu/nodemcu-firmware/releases

dpavlin@x200:/rest/cvs/esptool$ ./esptool.py --port /dev/ttyUSB2 write_flash 0x00000 ./nodemcu_float_0.9.6-dev_20150406.bin

dpavlin@x200:/rest/cvs/esptool$ microcom -p /dev/ttyUSB2 -s 9600
connected to /dev/ttyUSB2
Escape character: Ctrl-\
Type the escape character followed by c to get to the menu or q to quit

> node.restart()

NodeMCU 0.9.6 build 20150406  powered by Lua 5.1.4
lua: cannot open init.lua
> 

build from source

For latest features, you might want to rebuild software from github source

dpavlin@x200:/rest/cvs$ git clone https://github.com/pfalcon/esp-open-sdk.git

dpavlin@x200:/rest/cvs/esp-open-sdk$ export PATH=/rest/cvs/esp-open-sdk/xtensa-lx106-elf/bin:$PATH




git clone https://github.com/nodemcu/nodemcu-firmware.git
cd nodemcu-firmware

dpavlin@x200:/rest/cvs/nodemcu-firmware$ git checkout -b dev origin/dev
Branch dev set up to track remote branch dev from origin.
Switched to a new branch 'dev'


make

# check that device is in boot loader mode

dpavlin@x200:/rest/cvs/nodemcu-firmware$ ../esptool/esptool.py --port /dev/ttyUSB1 read_mac
Connecting...
MAC: 18:fe:34:99:f2:83

# flash new firmware

dpavlin@x200:/rest/cvs/nodemcu-firmware$ make flash ESPPORT=/dev/ttyUSB1
make -C ./app flash
make[1]: Entering directory '/rest/cvs/nodemcu-firmware/app'
../tools/esptool.py --port /dev/ttyUSB1 write_flash 0x00000 ../bin/0x00000.bin 0x10000 ../bin/0x10000.bin
Connecting...
Erasing flash...
Writing at 0x0000c500... (100 %)
Erasing flash...
Writing at 0x00068c00... (100 %)

Leaving...
make[1]: Leaving directory '/rest/cvs/nodemcu-firmware/app'


A library for the Microchip MCP3021 A/D converter for use with the ESP8266.

https://github.com/AllAboutEE/ESP8266-MCP3021-Library

nodemcu-uploader

dpavlin@x200:/rest/cvs$ git clone https://github.com/kmpm/nodemcu-uploader
dpavlin@x200:/rest/cvs/nodemcu-uploader$ ./nodemcu-uploader.py --port /dev/ttyUSB2 --baud 9600 file list
Listing files
for key,value in pairs(file.list()) do print(key,value) end
> 

OpenOCD JTAG

https://github.com/projectgus/openocd

http://www.esp8266.com/viewtopic.php?f=9&t=1871#p11157

JTAG Signal -> ESP8266 GPIO Pin -> JTAG Pin (standard 20 pin connector)
TMS -> 14 -> 7
TDI -> 12 -> 5
TCK -> 13 -> 9
TDO -> 15 -> 13
RST -> RST -> 15

ESP8266 as wireless JTAG Programmer

https://github.com/emard/wifi_jtag

WIFI

software serial

Sonoff

https://www.itead.cc/sonoff-wifi-wireless-switch.html
http://wiki.iteadstudio.com/Sonoff
https://github.com/arendst/Sonoff-MQTT-OTA

Programming

use dio not qio to fix checksum errors

permalink
RaspberryPi
mount-rpi-image.sh

Contents: [Dobrica Pavlinušić's random unstructured stuff]




Interestring projects

TODO: test them out and write full description on this wiki :-)

development

OV7670

DHT11/DHT22

BlinkM + i2c

CEC - control your TV

http://www.raspberrypi.org/forum/viewtopic.php?f=35&t=15749

root@raspberrypi:/home/pi# git clone https://github.com/Pulse-Eight/libcec.git
root@raspberrypi:/home/pi# cd libcec/
root@raspberrypi:/home/pi/libcec# apt-get install autoconf automake libtool liblockdev1-dev libudev-dev libraspberrypi-dev
root@raspberrypi:/home/pi/libcec# sh -x bootstrap
root@raspberrypi:/home/pi/libcec# ./configure --with-rpi-include-path=/opt/vc/include/ --with-rpi-lib-path=/opt/vc/lib/

##############################################################################

libCEC version 2:1:0 configured

Compilation flags:
  CXXFLAGS :       -g -O2 -fPIC -Wall -Wextra -Wno-missing-field-initializers  -Wno-psabi
  libCEC LDFLAGS : -lbcm_host -llockdev -lrt -ldl -lpthread  -L/opt/vc/lib/ -lvcos -lvchiq_arm -ludev  
  client LDFLAGS : -lrt -ldl -lpthread 

Configured features:
  Pulse-Eight CEC Adapter :             yes
  Pulse-Eight CEC Adapter detection :   yes
  Raspberry Pi support :                yes
  TDA995x support :                     no

You can now build libCEC by running:
  make

##############################################################################

make install

TV on

pi@raspberrypi ~ $ echo "on 0" | cec-client -s

Hints from forum

screen saver

http://www.raspberrypi.org/phpBB3/viewtopic.php?p=84831#p84831

# prevent screensaver from powering down display
setterm -blank 0 -powerdown 0 > /dev/tty0

# clear the display and turn off the flashing cursor
clear > /dev/tty0
setterm -cursor 0 > /dev/tty0

# turn the cursor back on when done with omxplayer
setterm -cursor 1 > /dev/tty0

YouTube transcoding in VLC

http://www.raspberrypi.org/phpBB3/viewtopic.php?p=163658#p163658

cvlc 'youtube.com/watch?v=XXXXXXXXXX' :sout='#transcode{vcodec=h264,vb=0,fps=0,scale=0,height=720,acodec=mp4a,ab=128,channels=2,samplerate=44100}:http{mux=ffmpeg{mux=flv},dst=:8080/youtube}' :sout-keep

Education materials

Raspberry Pi Accessories Starter Kit

http://www.conrad.com/ce/en/product/409208/Raspberry-Pi-Accessories-Starter-Kit?ref=searchDetail

  • 1x Rapberry sticker

GPU

Arduino

JTAG

Arduino ProMini 3.3V 8MHz

Disable serial port console

edit /boot/cmdline.txt and remove all ttyAMA0 leaving:

pi@raspberrypi ~ $ cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait bcm2708.w1_gpio_pin=4

also, comment out ttyAMA0 in /etc/inittab

connect Arduino serial

RX->TX
TX->RX

https://github.com/dpavlin/avrdude-rpi/tree/fix_channel_in_use

pin definitions in GPIO.RPi are physical pins on board not BCM or wiring ip!

gpio1.png

flasing

dpavlin@blue:~/Arduino/RF433_Sockets$ scp /tmp/build*.tmp/*.hex pi@rpi.tv:/tmp/
RF433_Sockets.cpp.hex                                        100%   19KB  18.6KB/s   00:00

pi@raspberrypi ~ $ cat avrdude.sh 
#!/bin/sh
hex=`ls -t /tmp/*.hex | head -1`
echo "flash hex: $hex"
sudo /home/pi/avrdude-rpi/avrdude-autoreset -C /home/pi/avrdude.conf -v -v -patmega328p -carduino -P/dev/ttyAMA0 -b57600 -D -Uflash:w:$hex:i 

pi@raspberrypi ~ $ ./avrdude.sh
flash hex: /tmp/RF433_Sockets.cpp.hex

avrdude: Version 6.1, compiled on Sep 17 2014 at 05:41:35
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/pi/avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyAMA0
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
done with autoreset
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.16
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: reading input file "/tmp/RF433_Sockets.cpp.hex"
avrdude: writing flash (6770 bytes):

Writing | ################################################## | 100% 1.98s

avrdude: 6770 bytes of flash written
avrdude: verifying flash memory against /tmp/RF433_Sockets.cpp.hex:
avrdude: load data flash data from input file /tmp/RF433_Sockets.cpp.hex:
avrdude: input file /tmp/RF433_Sockets.cpp.hex contains 6770 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.49s

avrdude: verifying ...
avrdude: 6770 bytes of flash verified

avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK (E:00, H:00, L:00)
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe

avrdude done.  Thank you.

strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe

DS1307 Tiny RTC

Check if module has 5V pull-up I2C resistors! If it does (like Tiny RTC has R2 and R3) you will have to remove them.

tiny-rtc-3.3v-remote-r2-r3.jpg

root@raspberrypi:/home/pi# apt-get install i2c-tools

root@raspberrypi:/home/pi# modprobe i2c-dev

root@raspberrypi:/home/pi# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

root@raspberrypi:/home/pi# modprobe rtc-ds1307

root@raspberrypi:/home/pi# echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device

root@raspberrypi:/home/pi# hwclock --systohc -D --noadjfile --utc
hwclock from util-linux 2.20.1
Using /dev interface to clock.
Assuming hardware clock is kept in UTC time.
Time elapsed since reference time has been 0.722720 seconds.
Delaying further to reach the new time.
Setting Hardware Clock to 11:53:41 = 1429876421 seconds since 1969
ioctl(RTC_SET_TIME) was successful.

DS18B20

root@raspberrypi:/home/pi# grep w1 /boot/config.txt 
dtoverlay=w1-gpio

# reboot

root@raspberrypi:/home/pi# cat /sys/bus/w1/devices/28-0000043c5507/w1_slave 
50 05 4b 46 7f ff 0c 10 1c : crc=1c YES
50 05 4b 46 7f ff 0c 10 1c t=85000

Hmm, you will also want to remove R1 pullup to make it work?

avrdude

Using Raspberry Pi as Arduino ISP programmer

root@raspberrypi:/home/pi# avrdude -c linuxgpio -p atmega328p

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f

avrdude: safemode: Fuses OK (E:05, H:DA, L:FF)

avrdude done.  Thank you.

logic analyzer

rotary encoder

http://www.bobrathbone.com/raspberrypi_rotary.htm

SWD

http://www.disk91.com/2015/technology/programming/swd-programming-using-a-raspberrypi/
https://github.com/disk91/PySWD

pi@raspberrypi ~ $ git clone https://github.com/disk91/PySWD
pi@raspberrypi ~ $ cd PySWD/


PIC

esp8089

PS/2 GPIO

GPIO header annotations

Signal generator

pi@rpi2 ~/WsprryPi $ sudo ./wspr --test-tone 1000000
A test tone will be generated at frequency 1.000000 MHz

Using local mbox device file with major 249.
Transmitting test tone on frequency 1.000000 MHz
Press CTRL-C to exit!

LCD panels

http://blog.reasonablycorrect.com/raw-dpi-raspberry-pi/

Pi Zero USB OTG

libcomposite

PATA IDE emulation

DPI LCD screen

permalink
phantom 3 camera gimble

https://www.rcgroups.com/forums/showthread.php?2458896-DJI-Phantom-3-camera-wiring-diagram

P3P uses Sony EXMOR sensor, while P3A contains a cheaper equivalent by Panasonic.

For the camera/gimbal board, the Pro model seem to have separate video compressor SoC - the DM365 chip. Noticed it here:
New P3P new cooling fan on 4K camera

The DM365 is not powerful enough for 4k, but it can compress the live video feed (FPV). This takes some load out of Ambarella SoC, and allows it to focus on compressing stream for the SD card. This is why existence of this chip makes 4k possible.

Enabling 4k in firmware would make the Ambarella overloaded, so there would be frame drops on both recorded video and live feed. But still, possible to enable.

permalink
DPS5005
SWO-pinout.jpg

OpenDPS

upgrade

dpavlin@nuc:/nuc$ git clone --recursive https://github.com/kanflo/opendps.git
dpavlin@nuc:/nuc$ cd opendps/
dpavlin@nuc:/nuc/opendps$ make -C libopencm3
dpavlin@nuc:/nuc/opendps$ make -C opendps

permalink
Weblog Navigation
Loading...
Weblog Archives
  • Loading...