I know this is an old post, but I'm doing the same exact thing. I have communication and the tracks appear to play, but there's no sound. A local drive works just fine, so I don't think it's my LMS configuration. Can anyone help?
epoch1970 wrote: > Well, using the Samsung "Optical SmartHub" was embarrassingly simple on > the linux server side. > As usual with a CD player you need SCSI support in the kernel, but you > also need support for iSCSI over TCP (probably supported by default on > most linux distros). The module is named iscsi_tcp. > You then need the Open-iSCSI initiator program to connect to targets. > > Code: -------------------- > > root@godfrey:/home/godfrey# lsmod | grep iscsi > iscsi_tcp 5108 2 > libiscsi_tcp 7504 1 iscsi_tcp > libiscsi 22424 2 libiscsi_tcp,iscsi_tcp > scsi_transport_iscsi 33244 3 iscsi_tcp,libiscsi > scsi_mod 58504 8 sg,scsi_transport_iscsi,usb_storage,libata,sd_mod,sr_mod,iscsi_tcp,libiscsi > root@godfrey:/home/godfrey# dpkg -s open-iscsi > Package: open-iscsi > Status: install ok installed > Priority: optional > Section: net > Installed-Size: 1763 > Maintainer: Debian iSCSI Maintainers <[email protected]> > Architecture: i386 > Version: 2.0.873+git0.3b4b4500-8 > ... -------------------- > > > Next, make sure to set "node.startup = automatic" in file > /etc/iscsi/iscsid.conf before discovering the Samsung thinggie. > (iscsiadm generates a config file for the target, if you don't have > startup=automatic you'll need to login manually before the device > shows on the server and begins usable from CD Player plugin.) > Then discover the service and start a session with the target: > > Code: -------------------- > > root@godfrey:/home/godfrey# iscsiadm -m discovery -t sendtargets -p 172.17.255.80 > 172.17.255.80:3260,1 iqn.2011-12.com.tsstk:storage.odd.sys > root@godfrey:/home/godfrey# iscsiadm -m node --targetname=iqn.2011-12.com.tsstk:storage.odd.sys --login > Logging in to [iface: default, target: iqn.2011-12.com.tsstk:storage.odd.sys, portal: 172.17.255.80,3260] (multiple) > Login to [iface: default, target: iqn.2011-12.com.tsstk:storage.odd.sys, portal: 172.17.255.80,3260] successful. > root@godfrey:/home/godfrey# iscsiadm -m session -P 3 > iSCSI Transport Class version 2.0-870 > version 2.0-873 > Target: iqn.2011-12.com.tsstk:storage.odd.sys (non-flash) > ... > Attached SCSI devices: > ************************ > Host Number: 3 State: running > scsi3 Channel 00 Id 0 Lun: 0 > scsi3 Channel 00 Id 0 Lun: 1 > Attached scsi disk sr0 State: running -------------------- > > > Bam! /dev/sr0, there you go. CD Player plugin is very happy with it. > > Now, perhaps a word on the Samsung SE-208BW. This thing is one fierce > bag of hurt. The device in itself is sturdy, it has ethernet, wifi, > USB storage and USB-OTG (for smart TVs it seems.) But it has been > horribly crippled by incompetent marketing and poor > software/documentation quality. > Out of the box the thing intends to replace your router... But if you > care to tinker with it, you can make it work within your wired LAN > (doesn't work as a simple wifi client) and get access to DVDs on a > tablet, and to CDs on your SBs. > It now sells for 1/3 of its launch price, and I can see why :) > > UPDATE. The app will not accept to work if an iscsi session is > running. I want both uses, so instead of logging out manually, I've > figured I can poll the media type in the device via telnet, then > login/logout of the iscsi session as needed. A bit flaky... > > UPDATE2. To conclude the monologue. Wanting to use both the tablet app > for watching DVDs and iSCSI to play CDs with LMS is not the ideal use > case. The device changes its behavior according to the existence of an > iSCSI session or not, so the best way I found is to query for the > media type. The dvd+rw-mediainfo utility is nice in that it is present > on the Samsung device and available on the local server too, and it > does not spin the media to detect its type. The diagnostic is crude, > but sufficient in my case: DVD means release the iscsi session and let > the tablet app work, anything else means open a session. > FWIW, this is (the relevant part of) the script the watchdog process > runs every 30 secs on the LMS server machine:> Code: -------------------- > > #!/bin/bash > # Runs every 30s as watchdog test binary > DEBUG=1 > ME="wd_test" > LOGGER="/usr/bin/logger" > LOGGEROPTS="-t $ME -i --" > # iSCSI management for Samsung SE-208BW > IADM="/usr/bin/iscsiadm" > MINFO="/usr/bin/dvd+rw-mediainfo" > ODEV="/dev/cdrom" > TARGET="iqn.2011-12.com.tsstk:storage.odd.sys" > LOGIN="root" > PASSWD="somepassword" > > # Discover remote IP. Could hardcode that. > NODEIP=$($IADM -m node | grep $TARGET) > NODEIP=${NODEIP%%:*} > # If the DVD player is gone, don't block and get killed by watchdog... > ping -c 1 -s 1 -W 1 "$NODEIP" >/dev/null 2>&1 > if (( $? )); then > (( $DEBUG )) && $LOGGER $LOGGEROPTS "Can't ping host [$NODEIP]! Exit." > # Shortcut > exit 0 > fi > # Check iscsi session for local or remote operation > "$IADM" -m session 2>/dev/null | grep -q "$TARGET" > if (( $? )); then > # No session, remote media query is required > (( $DEBUG )) && $LOGGER $LOGGEROPTS "No session with [$TARGET]: remote media query" > (echo "$LOGIN"; echo "$PASSWD"; echo "$MINFO $ODEV >/dev/null 2>&1";echo 'echo RETVAL=$?'; echo exit) | nc -t "$NODEIP" 23 | grep -q "RETVAL=252" > if (( $? )); then > # Any non-null value on the grep for code 252 means we have a DVD inserted, or something, including an error :-( > (( $DEBUG )) && $LOGGER $LOGGEROPTS "Media type in host [$NODEIP] is not CD, nothing to do" > # Shortcut > exit 0 > else > # A CD is inserted, login iscsi. It's not a DVD but is it an audio CD, really?? > (( $DEBUG )) && $LOGGER $LOGGEROPTS "Media type in host [$NODEIP] is CD: open session to [$TARGET]" > "$IADM" -m node -T "$TARGET" -l >/dev/null 2>&1 > (( $? )) && (( $DEBUG )) && $LOGGER $LOGGEROPTS "Login failed! [$?]" > fi > else > # Current session, work locally to avoid the netcat stuff > (( $DEBUG )) && $LOGGER $LOGGEROPTS "In session with [$TARGET]: local media query" > "$MINFO" "$ODEV" >/dev/null 2>&1 > if (( $? )); then > # Any non-null value, including read error :-( means we don't have a DVD inserted > (( $DEBUG )) && $LOGGER $LOGGEROPTS "Media type is not DVD, nothing to do" > # Shortcut > exit 0 > else > # A DVD is inserted, log out iscsi. Unfortunately data DVDs are seen same as video DVDs... > (( $DEBUG )) && $LOGGER $LOGGEROPTS "Media type is DVD, close session to [$TARGET]" > "$IADM" -m node -T "$TARGET" -u >/dev/null 2>&1 > (( $? )) && (( $DEBUG )) && $LOGGER $LOGGEROPTS "Logout failed! [$?]" > fi > fi > # Keep watchdog happy > exit 0 > -------------------- > > > > UPDATE 3. I tried playing different tracks of the same CD on different > players. Usually the CD goes mad but can serve 2 players in parallel. > But over iSCSI the player tends to serve only one queue of requests, > then at end of song goes to the next, etc. So players take long, long > pauses buffering. Might be related to the Samsung software/hardware > but no matter of tweaking on either the target or the initiator did > provide any noticeable improvement. I have modified the script above, > as the local media detection operation would block in this case (and > the machine restart...) Always querying via telnet solves this issue, > since it bypasses the scsi tcp queue. ------------------------------------------------------------------------ pratt733's Profile: http://forums.slimdevices.com/member.php?userid=64824 View this thread: http://forums.slimdevices.com/showthread.php?t=47288 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/plugins
