TOPFIELD - Multimedia Home Gateway
Home Produkte Support Downloads Taps Forum News Presse Kontakt Händlersuche Jobs Topfield eStore

Zurück   TOPFIELD EUROPE Forum > Topfield-Modding > SRP/CRP TAP-Bereich
Registrieren Hilfe Benutzerliste Kalender Suchen Heutige Beiträge Alle Foren als gelesen markieren

SRP/CRP TAP-Bereich TAPs für die SRP- und CRP-Serie

Antwort
 
Themen-Optionen
Alt 28.02.2014, 04:43:53   #1
DeltaMikeCharlie
WebController
 
Registriert seit: 07.05.2013
Ort: Australia
Beiträge: 442
Standard NFS Server for PVR

I have been working on a project to add NFS Server capabilities to the PVR.

I have 2 Topfield PVRs and I would like to be able to play recordings from one unit on the other unit directly. Currently, I used FTP to copy recordings and that works well, but I need to do this in advance of watching the programme. Being able to access programmes directly from the HDD of the other PVR would be more useful.

http://unfs3.sourceforge.net/

In my research, I discovered "unfs3" which is a user mode NFS server. With the kind assistance of FireBird, I managed to setup a correct cross-compiler environment and compile unfs3 for the Topfield PVR architecture.

unfs3 will run on the PVR, but every time that I try and mount the PVR's NFS share, unfs3 produces a SIGSEGV "segmentation fault" and exits. This is where I am stuck.

I have managed to compile unfs3 for a CentOS linux host and I can use the busybox mount function on the PVR to mount a unfs3 share from the CentOS host. This suggests to me that there is nothing fundamentally wrong with unfs3 and that perhaps the source of the problem is with the PVR architecture and not with unfs3.

Are there any Linux programming gurus lurking on the forum that may be able to help me troubleshoot the problem? I have identified the line of code that causes the SIGSEGV, I just don't understand why the error is occurring.

I selected unfs3 because it should work seamlessly with the existing NASMount TAP. There are several other utilities that I intend to try next (remotefs, nfs-ganesha and samba), but I would like to give unfs3 one last try before abandoning that line of research.

Any assistance would be appreciated.
DeltaMikeCharlie ist offline   Mit Zitat antworten
Alt 28.02.2014, 06:44:35   #2
Twilight
Zauberküchencheflehrling mit extra Butter
 
Benutzerbild von Twilight
 
Registriert seit: 09.12.2005
Ort: Wien Umgebung
Receiver: 1 x SRP 2100(TMS) TFIR und .1 x SRP 2410 M
Beiträge: 58.708
Standard AW: NFS Server for PVR

nice project...would be a good tool for all srp users
but i am sorry...i can't help you.


twilight
__________________
... Die Mutter aller TAPs
Missing Link: TFIR WakeOnLan für alle Töpfe
Twilight ist gerade online   Mit Zitat antworten
Alt 28.02.2014, 20:50:14   #3
Gerti
Nicht mehr bei Topfield-Europe
 
Benutzerbild von Gerti
 
Registriert seit: 09.12.2005
Ort: Hürth
Receiver: SRP-2410M
Beiträge: 15.174
Standard AW: NFS Server for PVR

Hi!

Could you post the part of code where the issue happens?

Regards
Gerti
__________________


Topfield Wikipedia - Gesammeltes Wissen zum Topfield...

Meine TAPs für den TMS

Kein Support per PN (Private Nachricht) oder eMail!
Gerti ist offline   Mit Zitat antworten
Alt 28.02.2014, 22:15:01   #4
FireBird
Suspekter verdächtiger
Zauberküchenchef,
TAP & Firmware-Guru
 
Benutzerbild von FireBird
 
Registriert seit: 09.12.2005
Ort: Wien
Receiver: SRP-2401CI+
Beiträge: 24.948
Standard AW: NFS Server for PVR

Here's an excerpt from a conversation we had:

Zitat:
I have been adding some debug code and identified the offending statement as being in "daemon.c" in function "unfs3_svc_run()" at the "svc_getreqset(&readfds);" statement.

I placed a printf before and after the statement and only the one before gets triggered, never the "after".

When I remove the "-t" (force TCP) the error moves onto another place in the code and I am currently tracing that call.
FireBird ist offline   Mit Zitat antworten
Alt 28.02.2014, 22:34:43   #5
DeltaMikeCharlie
WebController
 
Registriert seit: 07.05.2013
Ort: Australia
Beiträge: 442
Standard AW: NFS Server for PVR

Zitat:
Zitat von Gerti Beitrag anzeigen
Could you post the part of code where the issue happens?
Thanks Gerti,

In function "unfs3_svc_run()" there is a continuous for loop. Inside the for loop there is a switch statement and the default action of that calls "svc_getreqset(&readfds)" when there is data to process.

This triggers a number of functions to be called: "mountprog_3" then calls "mountproc_mnt_3_svc()" which calls "get_port()". As these functions exit, all is fine until "mountprog_3" exits. At that point the SIGSEGV occurs.

In my debugging attempts, I have done this:

printf("case default: before, %d.\n", fdcount);
svc_getreqset(&readfds); //This statement causes a segmentation fault.
printf("case default: after\n");

"after" never appears. I have "printf" statements within the other functions, here is a nominal trace.

Code:
# unfsd -s -p -e /mnt/hd/ProgramFiles/exports -n 20100 -m 20101 -d
DMC Debug version.
Entering 'parse_options'.
UNFS3 unfsd 0.9.22 (C) 2006, Pascal Schmidt <unfs3-server@ewetel.net>
Entering 'regenerate_write_verifier'.
Entering 'create_udp_transport'.
Entering 'create_tcp_transport'.
Entering 'register_nfs_service'.
Entering 'create_udp_transport'.
Entering 'create_tcp_transport'.
Entering 'register_mount_service'.
Setting 'sigaction'
Entering 'create_pid_file'.
/mnt/hd/DataFiles: ip 0.0.0.0 mask 0.0.0.0 options 4
Entering 'unfs3_svc_run'.
About to 'select'
case 0
About to 'select'
case default: before, 1.
Entering 'mountprog_3'.
 MOUNTPROC_MNT.
Passing 'mountprog_3' A.
Passing 'mountprog_3' B.
Entering 'mountproc_mnt_3_svc'.
Before IF.
 exports_options = 4.
 authenticated = 0.
 password = 0.
 exports_opts & OPT_INSECURE = 0.
Entering 'get_port'.
Before 'svc_getcaller'.
After 'svc_getcaller' 13059.
 IS_SECURE = 1.
Entering 'get_port'.
Before 'svc_getcaller'.
After 'svc_getcaller' 13059.
After IF.
After fh_comp.
fh_valid.
Passing 'mountprog_3' C.
Passing 'mountprog_3' D.
Entering 'daemon_exit'.
segmentation fault
Entering 'remove_pid_file'.
 #
"Passing 'mountprog_3' D." is literally the line immediately before the "return" at the end of "mountprog_3".

Here are my command line settings:

unfsd -s -p -e /mnt/hd/ProgramFiles/exports -n 20100 -m 20101 -d

busybox mount -w -o rw,nolock,vers=3,port=20100,mountport=20101 -t nfs <PVR_IP>:/mnt/hd/DataFiles/ /mnt/hd/DataFiles/Upstairs/

I chose these crazy port numbers so that I could test on my CentOS host without having to remove NFS functionality from the kernel. Also because the PVR does not have the port mapper "-p" I did this so that the ports manually match up.

I had a thought about this early this morning. I compiled the PVR binary using CYGWIN, but I compiled the CentOS binary in CentOS. Perhaps there is an old/missing/misconfigured library on CYGWIN that allows compilation, but crashes on execution. Perhaps a struct is too short or something. I am currently trying to build a cross-compiler environment in CentOS to test this theory.
DeltaMikeCharlie ist offline   Mit Zitat antworten
Alt 17.03.2014, 07:29:41   #6
DeltaMikeCharlie
WebController
 
Registriert seit: 07.05.2013
Ort: Australia
Beiträge: 442
Standard AW: NFS Server for PVR

I finally managed to cross-compile a version of unfsd that will run on the PVR and not crash when accessed remotely.

I have done some very basic testing:
  • From the client PVR, I can "ls" and see the files on the server PVR.
  • I can use TMSArchive on the client PVR to navigate to the mount point and list recordings from the server PVR.
  • I can use TMSArchive to start playback.
  • I can use jdsSkip to navigate throughout the recording.
There still needs to be a lot of testing. For example, if the server PVR also has quad recording happening, is it also still able to respond in a timely manner?

The unfsd binary that I compiled is available here. It is very large because it is statically linked. I have also added a copy of my "exports" file. Copy these to "/mnt/hd/ProgramFiles" and don't forget to "chmod 555 unfsd" before trying this.

Here is the command on the server PVR:

Code:
unfsd -s -p -e /mnt/hd/ProgramFiles/exports -n 2049 -m 645
Here is the command on the client PVR:

Code:
busybox mount -w -o rw,nolock,vers=3,port=2049,mountport=645 -t nfs <SERVER_IP>:/mnt/hd/DataFiles/  /mnt/hd/DataFiles/<DIRECTORY>/
You need to create the <DIRECTORY> of your choice befoure mounting.

Feedback from testers welcome.
DeltaMikeCharlie ist offline   Mit Zitat antworten
Alt 17.03.2014, 07:40:03   #7
Twilight
Zauberküchencheflehrling mit extra Butter
 
Benutzerbild von Twilight
 
Registriert seit: 09.12.2005
Ort: Wien Umgebung
Receiver: 1 x SRP 2100(TMS) TFIR und .1 x SRP 2410 M
Beiträge: 58.708
Standard AW: NFS Server for PVR

thanks !! and gratulation
i will try to do some tests, but i can't say when i will have time for it...

twilight
__________________
... Die Mutter aller TAPs
Missing Link: TFIR WakeOnLan für alle Töpfe
Twilight ist gerade online   Mit Zitat antworten
Alt 17.03.2014, 16:55:34   #8
Töppi
TöppiHolic "der mit dem h tanzt" , Anstifter und Möchtegernstatusaufdecker
 
Benutzerbild von Töppi
 
Registriert seit: 27.08.2006
Ort: Nähe Mainz
Receiver: 2410M
Firmware: Feb. 2014
Beiträge: 25.821
Standard AW: NFS Server for PVR

__________________
Gruß
Klaus
................

SRP-2410M


TAP's (Autostart):
| TMSDisplay | F*Skip TMS 3.xx | SmartEPG | SmartFiler | RebuildNAV | Automove TMS | TMSRemote | Callmonitor | SmartSeriesrename | Switch2FTA |

Töppi ist offline   Mit Zitat antworten
Alt 17.03.2014, 17:07:50   #9
FireBird
Suspekter verdächtiger
Zauberküchenchef,
TAP & Firmware-Guru
 
Benutzerbild von FireBird
 
Registriert seit: 09.12.2005
Ort: Wien
Receiver: SRP-2401CI+
Beiträge: 24.948
Standard AW: NFS Server for PVR

Dozens of Toppies – linked in all directions…
FireBird ist offline   Mit Zitat antworten
Alt 17.03.2014, 17:22:04   #10
macfan
Ex-iTiNa-Promoter
 
Benutzerbild von macfan
 
Registriert seit: 09.12.2005
Ort: Dortmund
Receiver: TF 2401 CI+, 2100, 5200 C
Firmware: SRP-Serie: die neueste, 5k: Jan 07 PTU
Beiträge: 16.248
Standard AW: NFS Server for PVR

I believe that this is great, but I don't unterstand where the "normal" user needs it. Can someone explain it?

Gruß, Horst
__________________
TAP-Autostart SRP 2100: Automove - BackupSettings - dbFit - FastSkip - MediaAspect - Nice Display - PowerRestore - QuickPlay - ResetCAM - SmartEPG TMS - SmartFiler - StPBTools - TMSRemote - TimerDiags - TMA1 - V!deotext
TAP-Autostart 5k: TF5000 Display 1.53 - BootMenu 0.32
Davon gestartet: iTiNa 1.05 - ImproBox 2.5 - Stirf 1.3 BetaD (asrael) - Filer 2.30
macfan ist offline   Mit Zitat antworten
Alt 17.03.2014, 17:24:14   #11
FireBird
Suspekter verdächtiger
Zauberküchenchef,
TAP & Firmware-Guru
 
Benutzerbild von FireBird
 
Registriert seit: 09.12.2005
Ort: Wien
Receiver: SRP-2401CI+
Beiträge: 24.948
Standard AW: NFS Server for PVR

With this tool, a Toppy can play NFS server like a NAS and you can easily play a file from a different Toppy.
FireBird ist offline   Mit Zitat antworten
Alt 17.03.2014, 17:28:43   #12
Twilight
Zauberküchencheflehrling mit extra Butter
 
Benutzerbild von Twilight
 
Registriert seit: 09.12.2005
Ort: Wien Umgebung
Receiver: 1 x SRP 2100(TMS) TFIR und .1 x SRP 2410 M
Beiträge: 58.708
Standard AW: NFS Server for PVR

my first test looks good

i have tested with two 2410 and smartfiler.
i have still a nfs mount to my nas...on both receivers. so it is a good idea to switch off the mount on the mounted receiver, if not it could be a performance problem (1900 files and SF writes a database in each direktory )

next step for me: i will try to use nfs mount tap to connect automaticly

twilight
__________________
... Die Mutter aller TAPs
Missing Link: TFIR WakeOnLan für alle Töpfe
Twilight ist gerade online   Mit Zitat antworten
Alt 17.03.2014, 17:29:43   #13
macfan
Ex-iTiNa-Promoter
 
Benutzerbild von macfan
 
Registriert seit: 09.12.2005
Ort: Dortmund
Receiver: TF 2401 CI+, 2100, 5200 C
Firmware: SRP-Serie: die neueste, 5k: Jan 07 PTU
Beiträge: 16.248
Standard AW: NFS Server for PVR

Zitat:
Zitat von FireBird Beitrag anzeigen
With this tool, a Toppy can play NFS server like a NAS and you can easily play a file from a different Toppy.
So for special reasons (Sky ) it might be necessary that I buy a 2401. Now I can put the old 2100 in the attic and use the new 2401 in the living room, but the 2400 can play all the files on the 2100? Cool!

If it would only work… I can't play .rec-files in HD from my NAS on my 2100 because it is too slow.

Gruß, Horst
__________________
TAP-Autostart SRP 2100: Automove - BackupSettings - dbFit - FastSkip - MediaAspect - Nice Display - PowerRestore - QuickPlay - ResetCAM - SmartEPG TMS - SmartFiler - StPBTools - TMSRemote - TimerDiags - TMA1 - V!deotext
TAP-Autostart 5k: TF5000 Display 1.53 - BootMenu 0.32
Davon gestartet: iTiNa 1.05 - ImproBox 2.5 - Stirf 1.3 BetaD (asrael) - Filer 2.30
macfan ist offline   Mit Zitat antworten
Alt 17.03.2014, 17:33:31   #14
Twilight
Zauberküchencheflehrling mit extra Butter
 
Benutzerbild von Twilight
 
Registriert seit: 09.12.2005
Ort: Wien Umgebung
Receiver: 1 x SRP 2100(TMS) TFIR und .1 x SRP 2410 M
Beiträge: 58.708
Standard AW: NFS Server for PVR

Zitat:
Zitat von macfan Beitrag anzeigen
I believe that this is great, but I don't unterstand where the "normal" user needs it. Can someone explain it?
you still use a nas drive with nfs mount, so you should know what the advance is.. ok i know that it doesn't work so smoothly as it should be

twilight
__________________
... Die Mutter aller TAPs
Missing Link: TFIR WakeOnLan für alle Töpfe
Twilight ist gerade online   Mit Zitat antworten
Alt 17.03.2014, 17:35:11   #15
FireBird
Suspekter verdächtiger
Zauberküchenchef,
TAP & Firmware-Guru
 
Benutzerbild von FireBird
 
Registriert seit: 09.12.2005
Ort: Wien
Receiver: SRP-2401CI+
Beiträge: 24.948
Standard AW: NFS Server for PVR

Zitat:
Zitat von macfan Beitrag anzeigen
I can't play .rec-files in HD from my NAS on my 2100 because it is too slow.
As mentioned in other threads, a network has enough headroom to stream a HD recording without hitting a bandwidth limit. Something must be wrong with your setup or hardware.
FireBird ist offline   Mit Zitat antworten
Alt 17.03.2014, 17:40:22   #16
Twilight
Zauberküchencheflehrling mit extra Butter
 
Benutzerbild von Twilight
 
Registriert seit: 09.12.2005
Ort: Wien Umgebung
Receiver: 1 x SRP 2100(TMS) TFIR und .1 x SRP 2410 M
Beiträge: 58.708
Standard AW: NFS Server for PVR

next test: play the same file from both receivers...works perfect!! really great job, thank you!!!

twilight
__________________
... Die Mutter aller TAPs
Missing Link: TFIR WakeOnLan für alle Töpfe
Twilight ist gerade online   Mit Zitat antworten
Alt 17.03.2014, 19:48:34   #17
Twilight
Zauberküchencheflehrling mit extra Butter
 
Benutzerbild von Twilight
 
Registriert seit: 09.12.2005
Ort: Wien Umgebung
Receiver: 1 x SRP 2100(TMS) TFIR und .1 x SRP 2410 M
Beiträge: 58.708
Standard AW: NFS Server for PVR

and the last for today: delete the file which is in use on both...no reboot, no problem

twilight
__________________
... Die Mutter aller TAPs
Missing Link: TFIR WakeOnLan für alle Töpfe
Twilight ist gerade online   Mit Zitat antworten
Alt 17.03.2014, 20:41:38   #18
DeltaMikeCharlie
WebController
 
Registriert seit: 07.05.2013
Ort: Australia
Beiträge: 442
Standard AW: NFS Server for PVR

Thanks for testing everyone. I am glad that other people have been able to make it work too.

I have done more testing:
  • Deleting recordings works OK.
  • A last playback position is remembered on both PVRs.
  • Bookmarks are remembered on both PVRs.
  • Chase play a recording-in-progress on the server PVR.
  • Read INFplus data, but only from an "archived" recording.
I am thinking about writing a TAP to control this. Any suggestion would be welcome. How many PVRs? Bi-directional? Auto mount/dismount when a server PVR is powered on/off? Pop-up warnings? Integrated with TMA1?

I have also "stripped" the binary file so that it is much smaller (800k vs 1m), but I have not tested that version yet. I will post it when I am sure that it works.
DeltaMikeCharlie ist offline   Mit Zitat antworten
Alt 17.03.2014, 20:45:10   #19
Twilight
Zauberküchencheflehrling mit extra Butter
 
Benutzerbild von Twilight
 
Registriert seit: 09.12.2005
Ort: Wien Umgebung
Receiver: 1 x SRP 2100(TMS) TFIR und .1 x SRP 2410 M
Beiträge: 58.708
Standard AW: NFS Server for PVR

just have a look on the nfs mount tap from gerti. i think this must be the "connection" tap for all nfs mounts.
from th other side: we just need a tap which sends the order to start the nfs server, like we do it now by hand, or?

twilight
__________________
... Die Mutter aller TAPs
Missing Link: TFIR WakeOnLan für alle Töpfe
Twilight ist gerade online   Mit Zitat antworten
Alt 17.03.2014, 20:48:56   #20
Töppi
TöppiHolic "der mit dem h tanzt" , Anstifter und Möchtegernstatusaufdecker
 
Benutzerbild von Töppi
 
Registriert seit: 27.08.2006
Ort: Nähe Mainz
Receiver: 2410M
Firmware: Feb. 2014
Beiträge: 25.821
Standard AW: NFS Server for PVR

I would prefer a standalone TAP, not everyone use TMA in autostart mode....
Automount/dismount is a good option, but you should reduce the popups to a minimum.....
__________________
Gruß
Klaus
................

SRP-2410M


TAP's (Autostart):
| TMSDisplay | F*Skip TMS 3.xx | SmartEPG | SmartFiler | RebuildNAV | Automove TMS | TMSRemote | Callmonitor | SmartSeriesrename | Switch2FTA |

Töppi ist offline   Mit Zitat antworten
Antwort

Themen-Optionen

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist An.
Smileys sind An.
[IMG] Code ist An.
HTML-Code ist Aus.

Gehe zu

Ähnliche Themen
Thema Erstellt von Forum Antworten Letzter Beitrag
TAPtoDate (2016 wieder in Betrieb :-)) FireBird SRP/CRP TAP-Bereich 4212 07.08.2017 13:12:10
NFS & Telnet Verbindung vom PC zum SRP wolfi133 Computer und Topfield 41 12.01.2016 18:53:16
Windows Home Server und NFS Dienst db1 Computer und Topfield 0 12.12.2011 08:47:31


Alle Zeitangaben in WEZ +2. Es ist jetzt 17:00:33 Uhr.

©2005-2011 TOPFIELD Europe GmbH  | Datenschutz & Nutzungsbedingungen | Impressum

Powered by vBulletin Version 3.8.6 (Deutsch)
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.