ea3ihi / DMRStation

A free and open source DMR network radio
GNU General Public License v2.0
17 stars 9 forks source link

Orange PI Zero #2

Closed sp2ong closed 4 years ago

sp2ong commented 4 years ago

Hi,

I have tried to use DMRStation binary on Orange Pi Zero but when try run I have a message:

bash: ./DMRstation: no such file or directory

Is it possible to compile DMRStation outside eclipse and SysGCC ? It is not a huge program it will be nice to compile directly on Raspberry Pi or Orange Pi via "make" use gcc ?

I try to compile use gcc but

main.c: In function ‘ui_dmr_start’: main.c:257:17: warning: implicit declaration of function ‘strtok’ [-Wimplicit-function-declaration] char * call = strtok(data, " "); ^~ main.c:257:17: warning: initialization makes pointer from integer without a cast [-Wint-conversion] /tmp/cc7oROUi.o: In function onVolumeChanged': main.c:(.text+0x34): undefined reference tosetVolume' /tmp/cc7oROUi.o: In function onButton4000Click': main.c:(.text+0x6a): undefined reference toactivateTG' main.c:(.text+0x7a): undefined reference to talkgroup_select_by_index' main.c:(.text+0x98): undefined reference tosettings' /tmp/cc7oROUi.o: In function onButtonExitClick': main.c:(.text+0xaa): undefined reference toaudio_deinit' main.c:(.text+0xae): undefined reference to net_deinit' main.c:(.text+0xb2): undefined reference todmrids_deinit' main.c:(.text+0xb6): undefined reference to ambeclient_deinit' main.c:(.text+0xc6): undefined reference toptt_deinit' main.c:(.text+0xf4): undefined reference to settings' /tmp/cc7oROUi.o: In functiononButtonPTT': main.c:(.text+0x14e): undefined reference to lastHeardAddByIdAndTG' main.c:(.text+0x1d6): undefined reference todmr_start_tx' main.c:(.text+0x1da): undefined reference to audio_record_start' main.c:(.text+0x1ea): undefined reference toaudio_record_stop' main.c:(.text+0x240): undefined reference to dmr_control' main.c:(.text+0x248): undefined reference tosettings' /tmp/cc7oROUi.o: In function main': main.c:(.text+0x2a0): undefined reference tosetDefaultSettings' main.c:(.text+0x2bc): undefined reference to ambeclient_init' main.c:(.text+0x2c0): undefined reference toaudio_init' main.c:(.text+0x2c4): undefined reference to dmrids_init' main.c:(.text+0x2d4): undefined reference toptt_init' main.c:(.text+0x550): undefined reference to lastheard_init' main.c:(.text+0x554): undefined reference totalkgroup_init' main.c:(.text+0x590): undefined reference to net_init' main.c:(.text+0x5c8): undefined reference todmr_control' main.c:(.text+0x5cc): undefined reference to settings' /tmp/cc7oROUi.o: In functionui_dmr_start': main.c:(.text+0x724): undefined reference to dmrids_lookup' main.c:(.text+0x7a0): undefined reference tolastHeardAddByIdAndTG' main.c:(.text+0x7d4): undefined reference to dmr_control' /tmp/cc7oROUi.o: In functiontickTOT': main.c:(.text+0xb00): undefined reference to dmr_control' main.c:(.text+0xb04): undefined reference tosettings' collect2: error: ld returned 1 exit status

sp2ong commented 4 years ago

Hi,

This can be a build problem because there are no files in the sources:

https://github.com/ea3ihi/DMRStation/blob/master/src/main.c#L169

Can you add files to Github? DMRStation.glade and DMRStationMini.glade

I tried compile with:

gcc "pkg-config --cflags --libs gtk+-3.0" main.c

looking on example: https://stackoverflow.com/questions/48911820/properly-deallocating-a-gtkbuilder-object

sp2ong commented 4 years ago

I found a very nice tutorial for how to connect LCD TFT to Orange Pi Zero:

https://translate.google.pl/translate?hl=pl&sl=auto&tl=en&u=http%3A%2F%2Fsamopal.pro%2Foctoprint-3-5-tft%2F

orginal site: http://samopal.pro/octoprint-3-5-tft/

ea3ihi commented 4 years ago

The file not found is because some missing libraries (or probably a missing sym link to a library). Try with "ln -s /lib/ld-linux-armhf.so.3 /lib/ld-linux.so.3".

Also "ldd -r" can help you trace other missing libraries

The glade files are in the data directory. They are used with the resource compiler to build resources.c

For a 480x320 screen set the miniUI parameter in the config ile to 1

When i have some time i will prepare the build environment to build in the target hardware using make.

sp2ong commented 4 years ago

Thanks,

ln -s /lib/ld-linux-armhf.so.3 /lib/ld-linux.so.3

soved problem.

Can you try to add an additional option for 2.4 '' display with 240x320 ? it may be in DMRStation.ini

smallUI=2

for 240x320

ea3ihi commented 4 years ago

How are your glade skills? I will be happy to accept a PR with a new glade file for such a small screen

sp2ong commented 4 years ago

I've never used Glade but send me an example file DMRStationMini.glade I will be try. My email you can find on https://www.qrz.com/db/sp2ong

ea3ihi commented 4 years ago

You can find the glade files in the data folder. Please use DMRStationMini.glade as a base and rename it for instance to DMRStationMicro.glade to start editing with glade.

sp2ong commented 4 years ago

Ok, thank you, I will by try