HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Moderator: Telldus

riso
Posts: 30
Joined: Fri Mar 17, 2023 9:45 am

HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by riso »

HJÄLP
Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)
[/share/Public/telldus-core] # uname -a
Linux NASSE 2.6.33.2 #1 SMP Mon Aug 15 01:57:54 CST 2011 i686 unknown
ipkg install libftdi
Package libftdi (0.7-2) installed in root is up to date.
Nothing to be done
Successfully terminated.
Jag har kompilerat telldus core 2.0.4 tidigare och fungerar bra!
Tänkte förbereda inför inköp av duon med stöter på detta problem!

Har testat att inte ha tellsticken ansluten under compileringen men samma resultat.

Code: Select all

[ 51%] Building CXX object service/CMakeFiles/telldusd.dir/TellStick_libftdi.cpp.o
/share/Public/telldus-core/service/TellStick_libftdi.cpp: In member function 'bool TellStick::stillConnected() const':
/share/Public/telldus-core/service/TellStick_libftdi.cpp:247: error: 'ftdi_usb_get_strings' was not declared in this scope
/share/Public/telldus-core/service/TellStick_libftdi.cpp: In static member function 'static std::list<TellStickDescriptor, std::allocator<TellStickDescriptor> > TellStick::findAllByVIDPID(int, int)':
/share/Public/telldus-core/service/TellStick_libftdi.cpp:274: error: 'ftdi_usb_get_strings' was not declared in this scope
make[2]: *** [service/CMakeFiles/telldusd.dir/TellStick_libftdi.cpp.o] Error 1
make[1]: *** [service/CMakeFiles/telldusd.dir/all] Error 2
make: *** [all] Error 2
[/share/Public/telldus-core] # 
stefan.persson
Posts: 353
Joined: Fri Mar 17, 2023 9:45 am

Re: HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by stefan.persson »

Hej!
Du behöver förmodligen en nyare version av libftdi än vad som ipkg kan erbjuda. Dependency är satt till >= 0.17. Kanske kan du kompilera libftdi manuellt?
Stefan Persson
Software
Telldus Technologies
riso
Posts: 30
Joined: Fri Mar 17, 2023 9:45 am

Re: HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by riso »

Tack! :D
Skall testa compilera manuelt!
Installera den via ipkg install fanns ingen nyare!
riso
Posts: 30
Joined: Fri Mar 17, 2023 9:45 am

Re: HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by riso »

Jag har lyckats compilera libftdi 0.19

Men får nu detta fel vad kan det vara??


Code: Select all

[ 82%] Building CXX object service/CMakeFiles/telldusd.dir/ProtocolUpm.cpp.o
[ 84%] Building CXX object service/CMakeFiles/telldusd.dir/ProtocolWaveman.cpp.o
[ 86%] Building CXX object service/CMakeFiles/telldusd.dir/ProtocolX10.cpp.o
[ 88%] Building CXX object service/CMakeFiles/telldusd.dir/ProtocolYidong.cpp.o
Linking CXX executable telldusd
CMakeFiles/telldusd.dir/ClientCommunicationHandler.cpp.o: In function `__gnu_cxx::__exchange_and_add(int volatile*, int)':
ClientCommunicationHandler.cpp:(.text+0x84): undefined reference to `__sync_fetch_and_add_4'
CMakeFiles/telldusd.dir/DeviceManager.cpp.o: In function `__gnu_cxx::__exchange_and_add(int volatile*, int)':
DeviceManager.cpp:(.text+0x17e): undefined reference to `__sync_fetch_and_add_4'
CMakeFiles/telldusd.dir/Event.cpp.o: In function `__gnu_cxx::__exchange_and_add(int volatile*, int)':
Event.cpp:(.text+0x20c): undefined reference to `__sync_fetch_and_add_4'
CMakeFiles/telldusd.dir/TelldusMain.cpp.o: In function `__gnu_cxx::__exchange_and_add(int volatile*, int)':
TelldusMain.cpp:(.text+0x100): undefined reference to `__sync_fetch_and_add_4'
CMakeFiles/telldusd.dir/EventUpdateManager.cpp.o: In function `__gnu_cxx::__exchange_and_add(int volatile*, int)':
EventUpdateManager.cpp:(.text+0x39e): undefined reference to `__sync_fetch_and_add_4'
CMakeFiles/telldusd.dir/ConnectionListener_unix.cpp.o:ConnectionListener_unix.cpp:(.text+0x338): more undefined references to `__sync_fetch_and_add_4' follow
collect2: ld returned 1 exit status
make[2]: *** [service/telldusd] Error 1
make[1]: *** [service/CMakeFiles/telldusd.dir/all] Error 2
make: *** [all] Error 2
[/share/Public/telldus-core2.1] # 
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by micke.prag »

Länkningsfel, ser ut att vara symboler från gcc alt. libc. Vilken version av libc resp gcc kör du?
Micke Prag
Software
Telldus Technologies
riso
Posts: 30
Joined: Fri Mar 17, 2023 9:45 am

Re: HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by riso »

Gogglade runt efter fel medelandet (undefined reference to `__sync_fetch_and_add_4).
Verkar som andra som har detta har problem med att compilatorn tolkar Intel Atom processorn som en 64bits maskin!
Hm kan det ligga något i det?

Är det för gamla versioner av GCC och libc?

Code: Select all

[/share/Public/telldus-core-2.1] # ipkg install gcc
Package gcc (4.2.1-5) installed in root is up to date.
Nothing to be done
Successfully terminated

Code: Select all

[/share/Public/telldus-core-2.1] # /lib/libc.so.6
GNU C Library stable release version 2.6.1, by Roland McGrath et al.
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.2.1 (Ubuntu 4.2.1-5ubuntu4).
Compiled on a Linux >>2.6.15.7<< system on 2007-10-24.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
riso
Posts: 30
Joined: Fri Mar 17, 2023 9:45 am

Re: HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by riso »

Någon som vet?
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by micke.prag »

Jag har själv aldrig stött på detta. Hur löste dom andra du hittade med samma problem när du sökte runt?
Micke Prag
Software
Telldus Technologies
riso
Posts: 30
Joined: Fri Mar 17, 2023 9:45 am

Re: HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by riso »

Här är liknande problem.
Men jag är lite rookie så jag vet ej hur jag skall välja när jag kör cmake


http://stackoverflow.com/questions/1307 ... 2-bit-mode
http://redbeardtechnologies.wordpress.c ... and_add_4/
riso
Posts: 30
Joined: Fri Mar 17, 2023 9:45 am

Re: HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by riso »

Har fått kompileringen igenom! :D
Hitta detta på qnap forumet
http://forum.qnap.com/viewtopic.php?f=4 ... _4#p191826

export CFLAGS="-O3 -march=i686 -mtune=i686"
export CXXFLAGS="${CFLAGS}"

export LD_CONFIG_PATH=/opt/lib:/opt/local/lib:/opt/i686-unknown-linux-gnu/lib:/lib:/usr/lib:/usr/local/lib
export C_INCLUDE_PATH=/usr/include:/opt/include
export CPLUS_INCLUDE_PATH="${C_INCLUDE_PATH}"

Har ej koll på vad detta gör men det funka..Hoppas man inte gjorde allt för stor skada.


Men får detta när jag kör tdtool

Code: Select all

[/] # tdtool --on 1
Turning on group 1,  - Could not connect to the Telldus Service

Code: Select all

[/] # tdtool --version
tdtool 2.1.0

Copyright (C) 2011 Telldus Technologies AB

Written by Micke Prag <micke.prag@telldus.se>
[/] # telldusd
[/] # ps aux | grep telldusd
11682 admin 560 S grep telldusd
[/] #
Telldusd verkar ej starta?
Hur startar jag den?
tdamin hur funkar den?
Skall duon lysa när drivern fungerar eller endast vid kommunikation? Den lyser ej nu!

kör

Code: Select all

tdadmin --pid=0c30 --serial=416 --vid=1781 controller connect

men inget händer?

Code: Select all

[/] # lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 1005:b155 Apacer Technology, Inc. 
Bus 002 Device 004: ID 1058:1110 Western Digital Technologies, Inc. 
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 002: ID 1781:0c31 Multiple Vendors 
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[/] # 

Code: Select all

[/] # dmesg
hcd and address 4
Using EHCI controller.
scsi7 : usb-storage 2-5:1.0
usb 7-2: new full speed USB device using uhci_hcd and address 2
scsi 6:0:0:0: Direct-Access              USB DISK MODULE  PMAP PQ: 0 ANSI: 0 CCS
sd 6:0:0:0: [sdx] 1007616 512-byte logical blocks: (515 MB/492 MiB)
sd 6:0:0:0: [sdx] Write Protect is off
sd 6:0:0:0: [sdx] Mode Sense: 23 00 00 00
sd 6:0:0:0: [sdx] Assuming drive cache: write through
sd 6:0:0:0: [sdx] Assuming drive cache: write through
 sdx:
sd 6:0:0:0: Attached scsi generic sg23 type 0
 sdx1 sdx2 sdx3 sdx4 < sdx5 sdx6 >
sd 6:0:0:0: [sdx] Assuming drive cache: write through
sd 6:0:0:0: [sdx] Attached SCSI removable disk
scsi 7:0:0:0: Direct-Access     WD       My Book 1110     2018 PQ: 0 ANSI: 4
sd 7:0:0:0: Attached scsi generic sg20 type 0
sd 7:0:0:0: [sdu] 2928904192 512-byte logical blocks: (1.49 TB/1.36 TiB)
sd 7:0:0:0: [sdu] Write Protect is off
sd 7:0:0:0: [sdu] Mode Sense: 2b 00 10 08
sd 7:0:0:0: [sdu] Assuming drive cache: write through
sd 7:0:0:0: [sdu] Assuming drive cache: write through
 sdu:
scsi 7:0:0:1: Enclosure         WD       SES Device       2018 PQ: 0 ANSI: 4
scsi 7:0:0:1: Attached scsi generic sg21 type 13
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sda1): mounted filesystem with writeback data mode
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sdb1): mounted filesystem with writeback data mode
md: md9 stopped.
md: bind<sdb1>
md: bind<sda1>
raid1: raid set md9 active with 2 out of 2 mirrors
md9: bitmap initialized from disk: read 5/5 pages, set 0 bits
created bitmap (65 pages) for device md9
md9: detected capacity change from 0 to 542769152
 md9: unknown partition table
 sdu1
sd 7:0:0:0: [sdu] Assuming drive cache: write through
sd 7:0:0:0: [sdu] Attached SCSI disk
kjournald starting.  Commit interval 5 seconds
EXT3-fs (md9): using internal journal
EXT3-fs (md9): mounted filesystem with writeback data mode
md: md13 stopped.
md: bind<sdb4>
md: bind<sda4>
raid1: raid set md13 active with 2 out of 2 mirrors
md13: bitmap initialized from disk: read 4/4 pages, set 0 bits
created bitmap (57 pages) for device md13
md13: detected capacity change from 0 to 469893120
 md13: unknown partition table
kjournald starting.  Commit interval 5 seconds
EXT3-fs (md9): using internal journal
EXT3-fs (md9): mounted filesystem with writeback data mode
Retry 20 times(20 seconds),host_no = 3 is not empty to  plug in.
kjournald starting.  Commit interval 5 seconds
EXT3-fs (md9): using internal journal
EXT3-fs (md9): mounted filesystem with writeback data mode
kjournald starting.  Commit interval 5 seconds
EXT3-fs (md13): using internal journal
EXT3-fs (md13): mounted filesystem with writeback data mode
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
Register ICH/PCH RTC driver.
iTCO_vendor_support: vendor-support=0
iTCO_wdt: Intel TCO WatchDog Timer Driver v1.05
iTCO_wdt: Found a ICH9R TCO device (Version=2, TCOBASE=0x0860)
iTCO_wdt: initialized. heartbeat=120 sec (nowayout=0)
usbcore: registered new interface driver usblp
ufsd: module license 'Commercial product' taints kernel.
Disabling lock debugging due to kernel taint
ufsd: driver U82 (Aug 15 2011 02:13:28) with acl LBD=OFF with ioctl loaded at f8426000
NTFS read/write support included
Hfs+/HfsX read/write support included
fnotify: Load file notify kernel module.
fnotify:   Global_Private_Data_List_Init()
fnotify:   Launch the fnotify thread: 1598
fnotify:   The fnotify thread starts...
usbcore: registered new interface driver snd-usb-audio
usbcore: registered new interface driver snd-usb-caiaq
pci 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
pci 0000:00:02.0: setting latency timer to 64
  alloc irq_desc for 34 on node -1
  alloc kstat_irqs on node -1
pci 0000:00:02.0: irq 34 for MSI/MSI-X
[drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
Linux video capture interface: v2.00
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v0.1.0)
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
kjournald starting.  Commit interval 5 seconds
EXT3-fs (md9): using internal journal
EXT3-fs (md9): mounted filesystem with writeback data mode
active port 0 :139
active port 1 :445
active port 2 :20
e1000e: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
md: bind<sda2>
raid1: raid set md2 active with 1 out of 1 mirrors
md2: detected capacity change from 0 to 542769152
 md2: unknown partition table
Adding 530040k swap on /dev/md2.  Priority:-1 extents:1 across:530040k 
md: bind<sdb2>
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:0, o:1, dev:sda2
 disk 1, wo:1, o:1, dev:sdb2
md: recovery of RAID array md2
md: minimum _guaranteed_  speed: 5000 KB/sec/disk.
md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for recovery.
md: Recovering started: md2
md: using 128k window, over a total of 530048 blocks.
md: md0 stopped.
md: md0 stopped.
md: bind<sdb3>
md: bind<sda3>
raid0: looking at sda3
raid0:   comparing sda3(3903891200)
 with sda3(3903891200)
raid0:   END
raid0:   ==> UNIQUE
raid0: 1 zones
raid0: looking at sdb3
raid0:   comparing sdb3(3903891200)
 with sda3(3903891200)
raid0:   EQUAL
raid0: FINAL 1 zones
raid0: done.
raid0 : md_size is 7807782400 sectors.
******* md0 configuration *********
zone0=[sda3/sdb3/]
        zone offset=0kb device offset=0kb size=3903891200kb
**********************************

md0: detected capacity change from 0 to 3997584588800
 md0: unknown partition table
EXT4-fs (md0): mounted filesystem with ordered data mode
md: md2: recovery done.
md: Recovering done: md2, degraded=1
RAID1 conf printout:
 --- wd:2 rd:2
 disk 0, wo:0, o:1, dev:sda2
 disk 1, wo:0, o:1, dev:sdb2
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period
active port 0 :139
active port 1 :445
active port 2 :20
warning: `proftpd' uses 32-bit capabilities (legacy support in use)
nfsd: last server has exited, flushing export cache
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period
usbcore: registered new interface driver usbserial
usbserial: USB Serial Driver core
USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver ftdi_sio
ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver
daemon_mgr[5224]: segfault at 74696e65 ip b726cda9 sp bf84ff84 error 4 in libc-2.6.1.so[b7205000+12e000]
rule type=2, num=424
Loading iSCSI transport class v2.0-871.
iscsi: registered transport (tcp)
active port 0 :139
active port 1 :445
active port 2 :20
nfsd: last server has exited, flushing export cache
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period
vboxdrv: Found 4 processor cores.
vboxdrv: fAsync=0 offMin=0x642 offMax=0x2dd8
vboxdrv: TSC mode is 'synchronous', kernel timer mode is 'normal'.
vboxdrv: Successfully loaded version 4.1.0 (interface 0x00190000).
vboxpci: pci-stub module not available, cannot detach PCI devices
vboxpci: IOMMU not found (not compiled)
nfsd: last server has exited, flushing export cache
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period
tdadmin[14187]: segfault at 0 ip b74fecb3 sp bf86a58c error 4 in libc-2.6.1.so[b7492000+12e000]
tdadmin[14219]: segfault at 0 ip b74fdcb3 sp bfc15bfc error 4 in libc-2.6.1.so[b7491000+12e000]
usb 7-2: USB disconnect, address 2
usb 7-2: new full speed USB device using uhci_hcd and address 3
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by micke.prag »

Du kan starta telldusd med --nodaemon för att se att den inte dör:

Code: Select all

telldusd --nodaemon
tdadmin behöver bara köras om du sätter i TellStick efter du startat telldusd. Sitter TellStick i när telldusd startas hittas den automatiskt. Och serial är dess usb-serienummer och inte det som står på etiketten. Du kan se det med:

Code: Select all

lsusb -d 1781: -v
Leta efter "iSerial".

Outputen från telldusd hamnar troligtvis i filen /var/log/messages.

Lysdioderna lyser bara vid sändning/mottagning
Micke Prag
Software
Telldus Technologies
riso
Posts: 30
Joined: Fri Mar 17, 2023 9:45 am

Re: HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by riso »

När jag kör telldusd --nodaemon
Så får jag ingen output? skall man få det? .

Code: Select all

[/] # ps aux | grep telldusd
11682 admin 560 S grep telldusd 
När jag kör

Code: Select all

[/] # tdtool --on 1
Turning on group 1,  - Could not connect to the Telldus Service

var/log/messages är tom?
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by micke.prag »

Ingen output är väntat.
Kör du telldusd som root eller som användare? Kör du som root bör du ställa in en användare som telldusd ska sänka sina rättigheter till. I /etc/tellstick.conf kan du sätta:
user = "nobody"
group = "plugdev"

Ändra användaren och gruppen till någon som finns i systemet.
Kör du som en vanlig användare ändras inte rättigheterna.

När telldusd har startats, kolla att du har filerna /tmp/TelldusClient och /tmp/TelldusEvents
Micke Prag
Software
Telldus Technologies
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by micke.prag »

riso wrote:var/log/messages är tom?
Din syslogd kan vara konfigurerad att logga på annat sätt än till /var/log/messages.
riso wrote:När jag kör telldusd --nodaemon
Så får jag ingen output? skall man få det? .
Stängs det ner igen? Det ser ut så på ditt ps anrop...
Micke Prag
Software
Telldus Technologies
riso
Posts: 30
Joined: Fri Mar 17, 2023 9:45 am

Re: HJÄLP Kompilera Telldus-core 2.1 på QNAP 259+ (NAS)

Post by riso »

Ja telldusd verkar stängas ner direkt! hmm
Skall försöka lokalisera var message filen ligger

Tack för all hjälp..
Post Reply