CUL Define auf Qnap funktioniert nicht

Begonnen von WarBird, 20 Oktober 2015, 01:51:50

Vorheriges Thema - Nächstes Thema

WarBird

Hallo,
ich hab folgendes problem, FHEM 5.6 läuft auf meinem Qnap TS-459 Pro || aktuelle Firmware 4.2.0, soweit alles gut,
jetzt hab ich heute mehrere HM Geräte gekauft und auch den CUL V3. geflashed habe ich den CUL am PC aber ich bekomme ihn nicht in FHEM Define.
define CUL CUL /dev/usb/ttyUSB0 1234
im Log steht Folgende Meldung
2015.10.20 01:19:29 3: Opening CUL device /dev/usb/ttyUSB0
2015.10.20 01:19:29 3: Can't open /dev/usb/ttyUSB0: No such device or address
mache ich etwas Grundlegend falsch?
über Googel und auch über die Forumssuche hab ich nicht wirklich was gefunden, meistens immer nur für Synology und das klappt irgendwie nicht...
:'( :'(
bitte helft mir
Gruß Tobias

WarBird

Benutzt d n niemand auf einem Qnap den CUL?!?
Ich verzweifel langsam...
Bitte um hilfe

Wernieman

Kommst Du auf die Konsole?

Wie FHEM sagt:
/dev/usb/ttyUSB0: No such device or address

Du könntest dann mit ls nachgucken, ob das Device da ist, bzw. mit dmesg nach einstecken, was/wo angelegt wird.

Aber Grundsätzlich: Bist Du Dir mit /dev/usb/ttyUSB0 sicher? Auf einem "normalen" Unix ist es doch eher /dev/ttyUSB0
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

WarBird

Hallo und danke erstmal für die Antwort,

Zitat von: Wernieman am 02 November 2015, 11:05:47
Kommst Du auf die Konsole?
Also wenn du damit einen Zugang über Putty meinst ja,


Zitat von: Wernieman am 02 November 2015, 11:05:47
Wie FHEM sagt:
/dev/usb/ttyUSB0: No such device or address

Du könntest dann mit ls nachgucken, ob das Device da ist, bzw. mit dmesg nach einstecken, was/wo angelegt wird.

Aber Grundsätzlich: Bist Du Dir mit /dev/usb/ttyUSB0 sicher? Auf einem "normalen" Unix ist es doch eher /dev/ttyUSB0

Nein bin mir mit /dev/usb/ttyUSB0 leider nicht sicher, das ist ja mein Problem das ich mir nicht sicher bin und verschiedenes ausprobiert habe leider bis jetzt ohne Erfolg weil alles was ich gefunden habe nicht für meinen Fall 1 zu 1 anwendbar war sondern irgendwas immer anders war oder nicht funktioniert hat....

andreas13

Hallo, das Problem ist, dass bei Qnap der Kerneltreiber für den CUL nicht bereitsteht. Es gibt zahlreiche Tipps im Netz dazu, aber es ist nicht trivial. Ich habe es jedenfalls nicht geschafft.
Lösung wäre der HMLAN statt der USB Variante.
Aber auch dann wirst du früher oder später Probleme haben, weil die Perl Version auf dem Qnap nicht die aktuellste ist und sich manche Pakete nur mühsam installieren lassen.

Andreas
Maintainer des Vitoconnect Moduls
In Betrieb: FritzBox 7590, Homematic
piko Wechelrichter (HTTPMOD). Sonos ....
noch: IT

WarBird

Hmmmmm also das es nicht trivial ist dessen bin ich mir bewusst, ist aber auch nicht so schlimm. Bin recht Bastel und experimentierfreudig, über den HMLan hab ich auch schon nachgedacht aber jetzt aufgeben und nochmal 80€ dafür hinblättern  will ich erstmal auch nicht.
Was mir Hals fehlt ist eine Hilfestellung oder eine Leitfaden an dem die China mich hin hangeln kann oder Ideen wonach ich schauen kann was ich probieren kann....
Gruß Tobias

andreas13

Wenn Du es geschafft hast, sag mir Bescheid.  Ich kenne keine Lösung, die mit einem aktuellen x86er Qnap funktioniert.
Das Problem ist, das Du die Kernel Module selber kompilieren musst und keine passenden Sourcen vorhanden sind. Aber vielleicht hast du ja mehr Glück als ich.
Anleitungen findest Du in den einschlägigen Foren. Frag mal Google.
Maintainer des Vitoconnect Moduls
In Betrieb: FritzBox 7590, Homematic
piko Wechelrichter (HTTPMOD). Sonos ....
noch: IT

immi

Zitat von: andreas13 am 02 November 2015, 14:00:00
Wenn Du es geschafft hast, sag mir Bescheid.  Ich kenne keine Lösung, die mit einem aktuellen x86er Qnap funktioniert.
Das Problem ist, das Du die Kernel Module selber kompilieren musst und keine passenden Sourcen vorhanden sind.
ich habe meine für "ARM" selber kompiliert und habe seit jahren kein problem
source hier http://sourceforge.net/projects/qosgpl/

hier findest Du cdc-acm.ko  fur arm (mein) und neue TS (Tchelovek)
http://forum.qnap.com/viewtopic.php?f=182&t=61052
immi


andreas13

Ja, für ARM sieht das besser aus, aber das 459 ist ein x86er, wenn ich mich nicht irre. Kennst Du dafür vergleichbares?
Maintainer des Vitoconnect Moduls
In Betrieb: FritzBox 7590, Homematic
piko Wechelrichter (HTTPMOD). Sonos ....
noch: IT

immi

andreas
hast du probiert die fur intel kompilierte file von tchelovek  in mein link?
Aug 18 2014

WBMK

@ immi or tchelovek

Ich folgte und versuchte, Ihre Beiträge zu diesem Thema und auf die QNAP Forum, aber ich bin nicht in der lage, eine correcte version von cdc-acm.ko für meine Qnap zu bekommen. Ich bin eine komplette newbe wie meine eigene Version zu kompilieren.. Könnten Sie mir dieses Erklären oder wenn es möglich wäre, eine Version für mich zu kompilieren, das wäre genial ??

Ich habe ein TS-431+ welche die armv7l cpu nutzt. Wenn ich die kompilierte Version auf den Foren versuche bekomme ich die Fehler "Version Magic":

[228567.778300] cdc_acm: version magic '3.4.6 mod_unload ARMv5 p2v8 ' should be '3.10.20-al-2.5.3_sa SMP mod_unload ARMv7 p2v8 '
[230967.095868] cdc_acm: version magic '3.0.36+ SMP preempt mod_unload ARMv7 ' should be '3.10.20-al-2.5.3_sa SMP mod_unload ARMv7 p2v8 '

-English-
I followed and tried your postings on this and the qnap forum's, but have not been able to get a working cdc-acm.ko for my Qnap. I am a complete newbe on how to compile my own version.. Could you walk me trough this or if it would be possible to compile a version for me, that would be awesome??

I have a TS-431+ wich utilizes the armv7l cpu. When i try the compiled version on the fora i get 'version magic' error:

[228567.778300] cdc_acm: version magic '3.4.6 mod_unload ARMv5 p2v8 ' should be '3.10.20-al-2.5.3_sa SMP mod_unload ARMv7 p2v8 '
[230967.095868] cdc_acm: version magic '3.0.36+ SMP preempt mod_unload ARMv7 ' should be '3.10.20-al-2.5.3_sa SMP mod_unload ARMv7 p2v8 '

Thanx/Danke!

WBMK

immi

WBMK
sorry I do not crosscompile. I have arm5.
If you need the cdc_acm for armv7, compile natively unisng the following old tutorial adapting to linux-3.4.6

0) install gcc and make in the qnap   
1) download the kernel from qnap
    http://sourceforge.net/projects/qosgpl/
2) chose the config file provided in kernel_cfg for your specific qnap and your kernel version (and copy that in /GPL_TS/src/linux-2.6.33.2-arm/ as .config)
3) make oldconfig; tell the compiler that cdc-acm has to be compiled as module (comment away cdc-acm  =m)
4) make modules (wait wait, wait) and search for   ../GPL_TS/src/linux-2.6.33.2-arm/drivers/usb/class/cdc-acm.ko
5) a lot of annoing errors came, which I was not interested in debugging; therefore I decided to compile only the /usb/class/cdc-acm.ko
6) cp ../GPL_TS/src/linux-2.6.33.2-arm/drivers/usb/class/cdc-acm.ko to /lib/modules/others/
7) insmod ../GPL_TS/src/linux-2.6.33.2-arm/drivers/usb/class/cdc-acm.ko


or just ask in the qnap-forum to compile it for you.

Moreover, if enough people ask for cdc_acm, probably qnap will make the module as standard in the qnap distribution.

immi

WBMK

Hi immi,

Thanx for your reply.

I found yout guide on how to complie, but i am new to linux, so if there are error's (wich there would be, if i understand your guide correctly) i would not know how to procede.

I will ask in the Qnap forum as you suggested.

thanx

WBMK

Hi immi,

I am trying to setup a build system for cross-compiling. But my knowledge of Linux is limited, could you help me?

What i have done sofar:
- Downloaded and installed VirtualBox
- Downloaded a VB image for Ubuntu from https://virtualboximages.com/Ubuntu+15.05+VDI+VirtualBox+Virtual+Computer
- Created a VM running Ubuntu and updating Ubuntu to latest version.
- Downloaded the ARM toolchain from https://sourceforge.net/projects/qosgpl/files/QNAP%20NAS%20Tool%20Chains/
- Installed the toolchain according to the PDF on sourceforge
- Downloaded the latest version of the QNAP Os from https://sourceforge.net/projects/qosgpl/files/latest/download?source=files
- Unpacked it to the src folder of the installed toolchain (as described in the toolchain PDF for compiling a program)
- Copied the config file provided in kernel_cfg for my specific Qnap and your kernel version to /GPL_TS/src/linux-3.10.20/ as .config
- edited the .config using: make ARCH=arm menuconfig
- selected my CPU (only main architecture ia available, the subtree list is empty??)
- selected ,,Device Drivers -> USB support ->USB Serial Converter support" all drivers as Module -> (M)
- saved the configuration

But then i need to compile..
i start using: make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
make: arm-none-linux-gnueabi-gcc: Command not found
scripts/kconfig/conf --silentoldconfig Kconfig
warning: (CAIF_VIRTIO && VIRTIO_PCI && VIRTIO_MMIO && REMOTEPROC && RPMSG) selects VIRTIO which has unmet direct dependencies (VIRTUALIZATION)
#
# configuration written to .config
#
warning: (CAIF_VIRTIO && VIRTIO_PCI && VIRTIO_MMIO && REMOTEPROC && RPMSG) selects VIRTIO which has unmet direct dependencies (VIRTUALIZATION)
make: arm-none-linux-gnueabi-gcc: Command not found
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
/bin/sh: 1: arm-none-linux-gnueabi-gcc: not found
/opt/cross-project/arm/marvell/arm-none-linux-gnueabi/libc/marvell-f/src/GPL_TS/src/linux-3.10.20/./Kbuild:35: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 127
Makefile:835: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2


It says: command not found... but i indstalled everything according to the manuals i think... ???

Can you help me get this running? Thanx in advance

immi

WBMK
make: arm-none-linux-gnueabi-gcc: Command not found
you have not installed your crosscompiling correctly

I decided not to crosscompile because I think it is easier; have you tried following my instructions?
The only drawback of native compiling is that it takes long, but you do not have to look at your qnap, while it is compiling :)