MembersPage/Kamuto/orange

target is to use orange pi board to read vems data for realtime data over ser2net or dataloging trigger frame stream to vemslog format saved to filesystem (SD, or /dev/shm tmpfs, or network filesystem, or SSD, or rust).

Experimental binaries (primary target: armhf or occasionally unsupported aarch64/x86/x86_64 or amd64):

http://www.vems.hu/files/orangepi_main/OrangeVemslog_v0.3.zip mdsum: 5e6369eb2de89b3000a549cfb4783988

v0.3 changes


Sw Environment


current board: Orange pi lite (H3, armhf)

OS Armbian Ubuntu Desktop : https://www.armbian.com/download/

to connect it to vems we need to have serial port on the board, it has some UARTS but they are ttl level, so we need some max232 interface.

using one like [that]

[connect UART3]

to get it working we need to [change orange configuration]

best way to test it is to download minicom and try to capture some aim data from vems serial port, in my case i had to swap rx and tx wires on serial cable which connects between vems and raspberry. both ends of the cable are female gender.

at the moment I'm using orange to have wireless connection for the ecu on test bench using ser2net

config file is located in /etc/ser2net.conf and has line 4400:raw:1000:/dev/ttyS3:19200 8DATABITS NONE 1STOPBIT banner


/etc/fstab

http://vems.hu/download/arm/orangepi_main/


Test simple built binary, linking and serial port


Historical Tests


./OrangeVemslog.armhf /dev/ttyUSB0 > /tmp/err 2>&1

zip the err file (and the NOSERIAL-2017.07.09-14.25.24.vemslog) before uploading for any report.


Checklist - useful initally for review / debug / inspection or for curious geeks. Not needed if/when all goes perfectly.

Sniff the serial stream: PC to v3 direction is used to query data with TF commands (HDLC-7D-7E escaped and 7E between frames)

TF command to query runtime data is A0, it appears regularly (as a0 bf 38, see below)

TF Commands used to query ECU config pages:

<PRE>

marcell@mini:/svn/stm32/orangepi_fat$ grep TF2 /tmp/err | sort

TF2: 00 f4

TF2: 01 f4

TF2: 02 f4

TF2: 03 f4

TF2: 04 f4

TF2: 06 f4

TF2: 07 f4

TF2: 08 f4

TF2: 0a f4

TF2: 0c f4

TF2: 0d f4

TF2: 0e f4

TF2: 0f f4

TF2: 11 f4

TF2: 02 f2

TF2: 03 f2

TF2: 04 f2

TF2: 05 f2

Or the complete hex stream:

000022f0: 17 7e ff 00 f4 40 77 7e ff 02 f4 41 17 7e ff 04

00002300: f4 42 b7 7e ff 0f f4 45 87 7e ff 03 f4 40 87 7e

00002310: ff 0c f4 45 77 7e ff 0d f4 44 e7 7e ff 11 f4 4c

00002320: 27 7e ff 06 f4 43 d7 7e ff 07 f4 42 47 7e a0 bf

00002330: 38 7e a0 bf 38 7e a0 bf 38 7e a0 bf 38 7e a0 bf

00002340: 38 7e a0 bf 38 7e a0 bf 38 7e a0 bf 38 7e a0 bf

00002350: 38 7e a0 bf 38 7e a0 bf 38 7e a0 bf 38 7e a0 bf

</PRE>

Inspecting the vemslog file saved to filesystem:

hexdump -C NOSERIAL-2017.07.09-16.30.49.vemslog |less


More testing

it works on /dev/ttyUSB0 (or /dev/ttyS3 if available for rw)


Stack smashing on armhf - fixed

root@orangepilite:/mnt/logger# ./orangepi_main.armhf /dev/ttyUSB0 > /tmp/err 2>&1


2020 update


I have acquired bit nicer version of raspberry pi called nano pi

https://www.antratek.com/nanopi-r1-1gb-ram-8gb-emmc

has nice hardware, rtc on board, wifi and other stuff

software options for it at the moment I have tested is openWRT version called FriendlyWRT and ubuntu xenial core.

http://wiki.friendlyarm.com/wiki/index.php/NanoPi_R1

datalogging stuff works fine on ubuntu, but does not start on WRT based operating system

this is the error I got

root@FriendlyWrt:/mnt# ./OrangeVemslog.armhf

-ash: ./OrangeVemslog.armhf: not found

root@FriendlyWrt:/mnt#

some hw info

root@FriendlyWrt:/# cat proc/cpuinfo

processor : 0

model name : ARMv7 Processor rev 5 (v7l)

BogoMIPS : 22.85

Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x0

CPU part : 0xc07

CPU revision : 5

root@FriendlyWrt:/# uname -r

4.14.111

LDD option as asked

root@FriendlyWrt:/mnt# ldd OrangeVemslog.armhf

/lib/ld-linux-armhf.so.3 (0xb6f6b000)

libc.so.6 => /lib/ld-linux-armhf.so.3 (0xb6f6b000)

Error loading shared library ld-linux-armhf.so.3: No such file or directory (needed by OrangeVemslog.armhf)

Error relocating OrangeVemslog.armhf: __printf_chk: symbol not found

Error relocating OrangeVemslog.armhf: __fprintf_chk: symbol not found

as I understand problem is that openwrt uses ld-musl-arm.so.1 instead ld-linux-armhf.so.3

any idea how this stuff can be sorted? Orangevemslog has to be recompiled with different option or maybe there is some other workaround?