Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't launch msposd on Groud stattion NVR Hi3536dv100 #18

Open
Warfull opened this issue Nov 4, 2024 · 21 comments
Open

Can't launch msposd on Groud stattion NVR Hi3536dv100 #18

Warfull opened this issue Nov 4, 2024 · 21 comments

Comments

@Warfull
Copy link

Warfull commented Nov 4, 2024

It seems the msposd file in the release folder is not supported by the hardware because even if the file is present in the /usr/bin folder the system answer "file not found".

@tipoman9
Copy link
Collaborator

tipoman9 commented Nov 4, 2024

Font file location has been changes to /usr/share/fonts/
Post the full log please.
I kind of don't get the idea of running msposd on the ground on NVR

@lida2003
Copy link
Contributor

lida2003 commented Nov 5, 2024

@tipoman9 We use Radax/Hi3536DV100 as a Rx module for OpenIPC.

I have a 3536DV100 also. @Warfull Please let me know if there released file work on Hi3536DV100.

@Warfull
Copy link
Author

Warfull commented Nov 6, 2024

Ok, I'm dumb : msposd is not needed on the ground station. But the result is a bit weird :
IMG_20241106_144453

root@openipc-hi3516ev300:~# msposd --osd --ahi 2 -r 20
Ver: 20241019_230909
MSP to OSD mode!Majestic width:1280,height:720
Loading /usr/share/fonts/font_hd.png for 720p mode
Font file res 96:9216 pages:4
Glyph size:24:36 on a 53:20 matrix. Overlay 1272:720
Listening on /dev/ttyAMA0...
$M<Flight Controller detected: ARDU

@lida2003
Copy link
Contributor

lida2003 commented Nov 6, 2024

msposd is not needed on the ground station.

That depends on you requirement.

Airunit can do the OSD stuff, you can take a look at this #13 for ardupilot

@Warfull
Copy link
Author

Warfull commented Nov 7, 2024

It's working now. Issue was, I guess, a bad parameter passed to the proc in the telemetry file.

@tipoman9
Copy link
Collaborator

tipoman9 commented Nov 7, 2024

Could you share your ArduPilot settings to make it work?
Several users reported ardupilot latest version working with Betaflight fonts with these settings:

OSD_TYPE=5
SERIALx_PROTOCOL=42 
MSP_OPTIONS=6

@Warfull
Copy link
Author

Warfull commented Nov 7, 2024

OSD_TYPE=5
SERIALx_PROTOCOL=42
MSP_OPTIONS=4

I use Betaflight fonts.
same result with MS_OPTIONS=6

@Warfull
Copy link
Author

Warfull commented Nov 7, 2024

But no way to get the AHI working, it is not drawn.

@tipoman9
Copy link
Collaborator

tipoman9 commented Nov 8, 2024

AHI is not supported currently camera side on Hisilicon/goke. Not hard to port, if someone is willing to change the code a little and test it, a PR is welcomed

@Warfull
Copy link
Author

Warfull commented Nov 11, 2024

I'de like to try to change the code but the big issue for me is cross-compilation. I've tried to do it by the way of Buildroot and OpenIPC firmware, adding package to my board in buildroot but the compilation stop because of "BR_COMPILER_PARANOID_USAFE_PATH" ; ie "Error : Unsafe Path/Library used in cross-compilation : -I/usr/include".
I don't know how to manually do the cross-compilation.

@lida2003
Copy link
Contributor

@Warfull Right now, I'm stucked at arduRover #17 , and I think I might do the job if I get ArduRover done.

I have 3536DV100 also, having sata harddisk connected for DVR recording.

@tipoman9
Copy link
Collaborator

I'de like to try to change the code but the big issue for me is cross-compilation. I've tried to do it by the way of Buildroot and OpenIPC firmware, adding package to my board in buildroot but the compilation stop because of "BR_COMPILER_PARANOID_USAFE_PATH" ; ie "Error : Unsafe Path/Library used in cross-compilation : -I/usr/include".
I don't know how to manually do the cross-compilation.
@Warfull
This is a known issue at the moment, the latest code does not compile, you may try with older version of msposd till we fix it.
OpenIPC/firmware@b3ab67b

Or try a standalone install, it should download the toolchain required and do the crosscompilation.
.\build.sh goke

@Warfull
Copy link
Author

Warfull commented Nov 11, 2024

@tipoman9
Thank you, I've just tried and it compile. Right now I'm working on the camera case and a pcb to connect everything together. But I will dig into the code as soon as I can.

@lida2003
Copy link
Contributor

lida2003 commented Nov 21, 2024

@tipoman9 latest goke version got segfault: `

# ./msposd_goke --master 127.0.0.1:14560 --osd -r 50 --ahi 1 --matrix 11
Segmentation fault

I also ported a 3536 version which uses same gcc as rootfs, still got segfault.
detailed 3536 branch info: https://github.com/SnapDragonfly/msposd/tree/porting_hi3536

EDIT: Hi3536DV100 NVR

@tipoman9
Copy link
Collaborator

@lida2003 Fixed it

@lida2003
Copy link
Contributor

@tipoman9 I'm NOT sure what happened, it seem gcc version mis-match???
I'm using cortex_a7-gcc13-glibc-4_9 from hi3536dv100_fpv_defconfig

root@openipc-hi3536dv100:~# ls
font.png         font_hd.png      gs-lida2003.key  majestic.yaml    vtxmenu.ini
root@openipc-hi3536dv100:~# scp [email protected]:/home/daniel/Work/msposd/release/hisi/msposd msposd_hisi
[email protected]'s password:
msposd                                                                                                                                100%  119KB 119.4KB/s   00:00
root@openipc-hi3536dv100:~# scp [email protected]:/home/daniel/Work/msposd/release/goke/msposd msposd_goke
[email protected]'s password:
msposd                                                                                                                                100%  119KB 119.4KB/s   00:01
root@openipc-hi3536dv100:~# ls
font.png         font_hd.png      gs-lida2003.key  majestic.yaml    msposd_goke      msposd_hisi      vtxmenu.ini
root@openipc-hi3536dv100:~# ls -al msposd*
-rwxr-xr-x    1 root     root        122280 Nov 23 03:58 msposd_goke
-rwxr-xr-x    1 root     root        122280 Nov 23 03:57 msposd_hisi
root@openipc-hi3536dv100:~# ./msposd_hisi --master 127.0.0.1:14560  --osd -r 50 --ahi 1 --matrix 11 -v
-sh: ./msposd_hisi: not found
root@openipc-hi3536dv100:~# ./msposd_hisi_goke --master 127.0.0.1:14560  --osd -r 50 --ahi 1 --matrix 11 -v
-sh: ./msposd_hisi_goke: not found
root@openipc-hi3536dv100:~# file --version
-sh: file: not found
  • jetson/x86
daniel@daniel-nvidia:~/Work/msposd/release$ git log -n 1
commit c1ffa361f18afd796bbb2874fa857517976a1121 (HEAD -> main, origin/main, origin/HEAD)
Author: Tipo Man <[email protected]>
Date:   Thu Nov 21 23:32:01 2024 +0200

    Goke/Hisi compile&binaries fixed. Commit version added in binary
daniel@daniel-nvidia:~/Work/msposd/release$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing added to commit but untracked files present (use "git add" to track)
daniel@daniel-nvidia:~/Work/msposd/release$ file hisi/msposd
hisi/msposd: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-arm.so.1, stripped
daniel@daniel-nvidia:~/Work/msposd/release$ file goke/msposd
goke/msposd: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-arm.so.1, stripped

@lida2003
Copy link
Contributor

Here is a simple cortex_a7-gcc13-glibc-4_9 substitue cortex_a7_thumb2-gcc13-musl-4_9 log:

@tipoman9
Copy link
Collaborator

Seems OpenIPC had their toolchain url changed. Updated the build.sh

@lida2003
Copy link
Contributor

Yes, OpenIPC/firmware change toolchain naming rule:

	@$(PWD)/general/scripts/show_toolchains.sh $(CONFIG)
	@echo br-sdk-$(BR2_OPENIPC_SOC_VENDOR)-$(BR2_OPENIPC_SOC_FAMILY)

And I didn't see 3536 support here (8a82c65), right?

Previously:

  • OpenIPC/builder do NOT have 3536 target.
  • OpenIPC/firmware has below tagets:

br-ext-chip-hisilicon/configs/hi3536dv100_lite_defconfig
cortex_a7_thumb2-gcc13-musl-4_9

br-ext-chip-hisilicon/configs/hi3536dv100_fpv_defconfig
cortex_a7-gcc13-glibc-4_9

@tipoman9
Copy link
Collaborator

Well, no idea about 3536 support, maybe add an issue in OpenIPC/firmware ?

@lida2003
Copy link
Contributor

lida2003 commented Nov 25, 2024

It has toolchain.hisilicon-hi3536dv100.tgz. I can try it tomorrow. Hope it will work as a gs OSD.

EDIT1: It might some thing to do with libmpi.so. where does this file come from???? It seems symbol in our sdk/hi3536dv100/include can't be found in /usr/lib/libmpi.so

root@openipc-hi3536dv100:~# ldd msposd_hi3536
        ldd (0x7f603000)
        libdnvqe.so => /usr/lib/libdnvqe.so (0xb6dd5000)
        libmpi.so => /usr/lib/libmpi.so (0xb6d52000)
        libupvqe.so => /usr/lib/libupvqe.so (0xb6d3c000)
        libVoiceEngine.so => /usr/lib/libVoiceEngine.so (0xb6d23000)
        libevent_core-2.2.so.1 => /usr/lib/libevent_core-2.2.so.1 (0xb6d07000)
        libc.so => ldd (0x7f603000)
Error relocating /usr/lib/libmpi.so: jpeg_read_scanlines: symbol not found
Error relocating /usr/lib/libmpi.so: HI_JPEG_SetBufInfo: symbol not found
Error relocating /usr/lib/libmpi.so: HI_JPEG_GetJpegInfo: symbol not found
Error relocating /usr/lib/libmpi.so: HI_JPEG_SetYCbCr420spFlag: symbol not found
Error relocating /usr/lib/libmpi.so: jpeg_mem_src: symbol not found
Error relocating /usr/lib/libmpi.so: jpeg_abort_decompress: symbol not found
Error relocating /usr/lib/libmpi.so: jpeg_start_decompress: symbol not found
Error relocating /usr/lib/libmpi.so: HI_JPEG_SetOutDesc: symbol not found
Error relocating /usr/lib/libmpi.so: jpeg_destroy_decompress: symbol not found
Error relocating /usr/lib/libmpi.so: jpeg_std_error: symbol not found
Error relocating /usr/lib/libmpi.so: jpeg_CreateDecompress: symbol not found
Error relocating /usr/lib/libmpi.so: HI_JPEG_GetLuPixSum: symbol not found
Error relocating /usr/lib/libmpi.so: jpeg_read_header: symbol not found
Error relocating /usr/lib/libmpi.so: jpeg_finish_decompress: symbol not found
Error relocating /usr/lib/libmpi.so: HI_JPEG_SetStreamPhyMem: symbol not found
Error relocating /usr/lib/libmpi.so: HI_JPEG_SetLuPixSumFlag: symbol not found
Error relocating msposd_hi3536: MI_RGN_UpdateCanvas: symbol not found
Error relocating msposd_hi3536: unsupported relocation type 3
Error relocating msposd_hi3536: unsupported relocation type 3
Error relocating msposd_hi3536: unsupported relocation type 3
Error relocating msposd_hi3536: unsupported relocation type 3

EDIT2:
I think, msposd are supporting hi3536 target before. I'm NOT sure why it's removed, or maybe never worked.

# Hisilicon [HI3536DV100]
- {"platform": "hi3536dv100", "release": "fpv"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants