• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
daemon crash on orange pi pc plus
I want to have pilight on my orange pi pc plus.
Therefor I got orangepi.[ch] from https://github.com/apocalypsss/wiringX and included the files into pilight. Compilation was hardly a problem. Unfortunately the daemon crashes:
pilight-daemon -D
[Mar 18 17:33:43:280725] pilight-daemon: INFO: version v7.0
[Mar 18 17:33:43:281542] pilight-daemon: DEBUG: ssdp sent search
[Mar 18 17:33:43:377467] pilight-daemon: INFO: no pilight daemon found, daemonizing
[Mar 18 17:33:43:378203] pilight-daemon: INFO: daemon listening to port: 32771
[Mar 18 17:33:43:379557] pilight-daemon: DEBUG: new thread socket, 1 thread running
[Mar 18 17:33:43:380130] pilight-daemon: DEBUG: running on a orangepi
[Mar 18 17:33:43:380231] pilight-daemon: DEBUG: new thread ssdp, 2 threads running
[Mar 18 17:33:43:380379] pilight-daemon: INFO: new client, ip:, port: 34680
[Mar 18 17:33:43:380525] pilight-daemon: DEBUG: client fd: 7
[Mar 18 17:33:43:380545] pilight-daemon: DEBUG: new thread sender, 3 threads running
[Mar 18 17:33:43:380669] pilight-daemon: DEBUG: client id: 1
__default_sa_restorer_v2       ip = 0xb6d53ae1, sp = 0xbecaca70
readl                          ip =    0x2756e, sp = 0xbecacd60
orangepiPinMode                ip =    0x28227, sp = 0xbecacd78
pinMode                        ip =    0x2556d, sp = 0xbecacda0
gpio433HwInit                  ip =    0x55747, sp = 0xbecacdb0
start_pilight                  ip =    0x24fb7, sp = 0xbecacdb8
main                           ip =    0x251c9, sp = 0xbecad638
__libc_start_main              ip = 0xb6d44633, sp = 0xbecad650
_start                         ip =    0x1fcb1, sp = 0xbecad798
segmentation fault
Running the daemon under gdb shows:
Program received signal SIGSEGV, Segmentation fault.
0x0002756e in readl (addr=29493224) at /home/norbert/pilight/libs/wiringx/orangepi.c:207
207        val = *(gpio + mmap_seek);
(gdb) bt
#0  0x0002756e in readl (addr=29493224) at /home/norbert/pilight/libs/wiringx/orangepi.c:207
#1  0x00028226 in orangepiPinMode (pin=-1, mode=1) at /home/norbert/pilight/libs/wiringx/orangepi.c:566
#2  0x0002556c in pinMode (pin=0, mode=1) at /home/norbert/pilight/libs/wiringx/wiringX.c:172
#3  0x00055746 in gpio433HwInit () at /home/norbert/pilight/libs/pilight/hardware/433gpio.c:47
#4  0x00024fb6 in start_pilight (argc=2, argv=0xbefff7a4) at /home/norbert/pilight/daemon.c:2484
#5  0x000251c8 in main (argc=2, argv=0xbefff7a4) at /home/norbert/pilight/daemon.c:2709
(gdb) frame 5
#5  0x000251c8 in main (argc=2, argv=0xbefff7a4) at /home/norbert/pilight/daemon.c:2709
2709        int ret = start_pilight(argc, argv);
(gdb) frame 4
#4  0x00024fb6 in start_pilight (argc=2, argv=0xbefff7a4) at /home/norbert/pilight/daemon.c:2484
2484                if(tmp_confhw->hardware->init() == EXIT_FAILURE) {
(gdb) frame 3
#3  0x00055746 in gpio433HwInit () at /home/norbert/pilight/libs/pilight/hardware/433gpio.c:47
47                pinMode(gpio_433_out, OUTPUT);
(gdb) frame 2
#2  0x0002556c in pinMode (pin=0, mode=1) at /home/norbert/pilight/libs/wiringx/wiringX.c:172
172                if(platform->pinMode(pin, mode) == -1) {
(gdb) frame 1
#1  0x00028226 in orangepiPinMode (pin=-1, mode=1) at /home/norbert/pilight/libs/wiringx/orangepi.c:566
566                regval = readl(phyaddr);
A git diff and the orangpi.[ch] files are in the attached tar.
Any idea what is going wrong here?

Attached Files
.tar   orangepi-upd.tar (Size: 30 KB / Downloads: 0)
(I've edited your post to use code tags, please do so from the beginning in future forum posts - it makes it easier to see what's going on Smile )

This is probably a bug in the orangepi.c file you got from that wiringx forked repository. This platform isn't supported in the official versions of wiringx, and therefore we can't provide support for this.
However, if you, or anybody else for that matter, can get this to work, do feel free to submit a PR to wiringx/wiringx to get this into upstream Smile
Indeed, i'm open to a cooperation with OrangePi, just let them contact me. Even better (as the other companies did), they can send me their devices and i'll help them implement it.
(03-19-2017, 12:01 AM)curlymo Wrote: Indeed, i'm open to a cooperation with OrangePi, just let them contact me. Even better (as the other companies did), they can send me their devices and i'll help them implement it.

I ordered more orangepi pc plus, than i actually need - if you are interested, i am happy to send you one of them ?
Btw. there is a WiringPi version - called WiringOP, that seems to work correctly for me:
Adapting this to WiringX might be easier, than starting from zero Tongue
(different branches for different orange pi devices)

Just let me know if you are interested in this Smile

Looking forward to your reply.
Can you mail me at info at pilight dot org
(05-17-2017, 09:07 PM)curlymo Wrote: Can you mail me at info at pilight dot org

Any progress on implementing wiringX for orange pi platform?
The orangepi pc+ is supported in the latest nightly.
(06-28-2017, 08:20 AM)curlymo Wrote: The orangepi pc+ is supported in the latest nightly.

Do you mean latest nightly pilight?
How about wiringX needed?
Compiled from this github should already support Orange pi pc+ no problem?
Just install the latest nightly. If your repositories are setup right all dependencies should be fixed automatically.

Possibly Related Threads...
Thread Author Replies Views Last Post
  oom_reaper: reaped process pilight-daemon va13 4 1,024 05-15-2019, 08:03 AM
Last Post: va13
  Using pilight-daemon socket API def_meggi 4 743 04-29-2019, 05:58 PM
Last Post: curlymo
  pilight-daemon does not start since 8.1.3-21 robertkrause 1 797 11-05-2018, 07:01 PM
Last Post: robertkrause
  Daemon problems: no apparant sudo access Surowa 3 883 08-14-2018, 06:21 AM
Last Post: curlymo
  pilight-daemon: cpu usage too high when using sendmail bnk72 11 2,548 01-25-2018, 10:00 AM
Last Post: curlymo
  pilight-daemon on LEDE ? hasselh 5 1,942 11-05-2017, 09:17 PM
Last Post: curlymo
  pilight-daemon client jjlf 1 2,425 11-10-2016, 10:06 PM
Last Post: jjlf
  Orange Pi PC Gratizzz 5 3,076 05-31-2016, 03:01 PM
Last Post: schorsch
  pilight-daemon not releasing the socket Tobias 0 1,603 03-24-2016, 09:18 PM
Last Post: Tobias
  python script as program device not running as daemon gerbenh 1 1,320 12-09-2015, 10:37 PM
Last Post: curlymo

Forum Jump:

Browsing: 1 Guest(s)