# Creative Zen and Gentoo...a bickering couple!

## PMT

Well, as the title indirectly implied, I'm having trouble with my Zen NX MP3 player on Linux.

To shorthand it, I've tried the various 'experimental' e-builds of Gnomad2, after trying the ordinary 'libnjb-CVS then gnomad2 tarball' solution listed on the gnomad2 site, and none of them work. Neutrino throws an error to the gist of "reboot, and then see if I work."

Gnomad2 and libnjb compile perfectly, and then on load, Gnomad2 says "Scanning songs..." and then, after about a minute, stops responding. Right-clicking brings up none of the former menus, and dragging the window over anything makes it leave a grey streak (I'm sure most of you have seen it at some point...a slow to respond window leaving a grey streak as the window fails to redraw itself).

Anybody out there feeling generous or wise enough to help?

Thanks for reading this.

Sorry about the brisk cut of my tone, but I had a longer and much more user-friendly post that was deleted when I had to restart Gentoo (I had tried to load another usb module without rebooting, and it froze my mouse...so I couldn't hit send. I tried for 5 minutes. >_<)

----------

## markfl

I have the Zen USB 2.0

I have yet to get it working under linux as well, its pretty much the only thing i keep windows and the shared partition around for.

I've spent ages trying to get it to work....

Couple of quick questions:

Are you using 2.6?

Are you on SMP/HT system?

The driver is kinda alpha at the moment but its claiming to be working...

markfl

----------

## Miggi

First the good thing: My creative jukebox zen nx works (almost) perfectly.

I also had some curious problems with gnomad2 with different libnjb version. But now I'm using neutrino (http://neutrino.sourceforge.net/) as transfer manager. I enabled the usual usb stuff in the kernel (usb mass storage) and installed libnjb 1.0 (masked ebuild). For neutrino I found no ebuild, so I just downloaded the latest version and installed it manually.

But at the moment it runs only with usb 1.0. When I connect the jukebox to a usb 2.0 port, the jukebox will be seen by neutrino/gnomad2, but when I start the transfer, both neutrino and the jukebox hangs (I have to replug the battery to get the jukebox working again).

----------

## jetblack

I have had all kinds of trouble (very similar to what you all describe) with my Nomad Jukebox using libnjb and gnomad2 under 2.6.x kernels. It works just fine with 2.4.2x kernels, though. I'm not sure if there are any major differences between the old Nomads and the Zens, but you may want to try a 2.4 kernel if you haven't already.

----------

## Earthwings

I'm having some troubles with my Jukebox-2, too, using kernel 2.6. As I haven't tried with kernel 2.4, the problem could also be elsewhere. In particular I'm getting errors like

```

usb_bulk_read: Connection timed out

njb_ping: I/O failure on USB data pipe

or

ioctl: Connection timed out

njb_set_library_counter: I/O failure on USB control pip

```

when starting gnomad2, whilst sometimes it just works fine.

Btw, as I didn't find recent ebuilds for libnjb-cvs and gnomad2, I made some myself. I'll put them in bugzilla if someone else can verify they're working for him.

media-libs/libnjb-cvs-1.0.1.ebuild

```

# Copyright 1999-2004 Gentoo Technologies, Inc.

# Distributed under the terms of the GNU General Public License v2

# $Header: $

inherit cvs

DESCRIPTION="libnjb is a C library and API for communicating with the Creative Nomad JukeBox digital audio player under BSD and Linux."

HOMEPAGE="http://libnjb.sourceforge.net/"

LICENSE="BSD"

SLOT="0"

KEYWORDS="~x86"

DEPEND=">=dev-libs/libusb-0.1.7

   sys-apps/hotplug"

ECVS_SERVER="cvs.libnjb.sourceforge.net:/cvsroot/libnjb"

ECVS_MODULE="libnjb"

ECVS_TOP_DIR="${DISTDIR}/cvs-src/${PN}"

S="${WORKDIR}/${ECVS_MODULE}"

src_compile() {

    econf || die "configure failed"

    emake || die "make failed"

}

 

 

src_install() {

    einstall || die "make install failed"

   

   # Enable hotplug support

   dodir /etc/hotplug/usb

   

   exeinto /etc/hotplug/usb/

   doexe nomadjukebox

   

   cp /etc/hotplug/usb.usermap ${D}/etc/hotplug/

   cat nomad.usermap >> ${D}/etc/hotplug/usb.usermap

   

   doman man/man3/*.3

    dodoc AUTHORS CHANGES FAQ HACKING INSTALL LICENSE README 

}

```

edit: version bump

app-misc/gnomad2-2.4.1.ebuild

```

# Copyright 1999-2004 Gentoo Technologies, Inc.

# Distributed under the terms of the GNU General Public License v2

# $Header: $

DESCRIPTION=""

HOMEPAGE="http://gnomad2.sourceforge.net/"

SRC_URI="http://heanet.dl.sourceforge.net/sourceforge/${PN}/${P}.tar.gz"

LICENSE="GPL-2"

SLOT="0"

KEYWORDS="~x86"

IUSE=""

DEPEND=">=media-libs/libnjb-cvs-1.0.1

   >=media-libs/id3lib-3.8.2

   >=dev-libs/libusb-0.1.5"

S="${WORKDIR}/${P}"

strip-flags

src_compile() {

   cd ${S}    

   econf || die "configure failed"

   emake || die "compile failed"

}

src_install () {

   einstall || die "install failed"

   

   dodoc AUTHORS ChangeLog README NEWS TODO

}

```

Last edited by Earthwings on Mon Feb 02, 2004 6:25 pm; edited 1 time in total

----------

## PMT

Wow, replies.  :Razz: 

Anyway, to answer any/all questions, I'm running kernel 2.4.20, and have no idea what SMP/HT refers to, quite honestly.

How would I go about modifying which version of the USB protocol my USB port uses?

And as I said, gnomad2 throws no errors, merely hangs. Neutrino throws an error to the effect of "bonobo couldn't find the neutrino.server".

Any help? I WANT MAH MP3s! ^_^

----------

## PMT

...wow.

Amusingly enough, Earthwings, I used those ebuilds, and now gnomad2 Seg Faults on startup instead.

Huh. Isn't that nice?

----------

## PMT

I looked at dmesg after popping the USB cable in and out.

```

usb.c: USB disconnect on device 00:02.2-1 address 5

hub.c: new USB device 00:02.2-1, assigned address 6

usb.c: USB device 6 (vend/prod 0x41e/0x4109) is not claimed by any active driver.

```

Huh. Any ideas how to fix that?

----------

## Earthwings

Hm. I also got a segfault on startup of gnomad2 once, then unmerged it and remerged with CFLAGS="". Next time it was ok, so I added strip-flags to the ebuild, thinking this would handle it. Maybe the problem is with hotplug. Does gnomad2 segfault when running it as root? E.g. 'kdesu gnomad2'. Is hotplug running? '/etc/init.d/hotplug status' Did you run etc-update after the emerge? Check /etc/hotplug/usb.usermap. Restart hotplug and try again. If nothing works,  try with 'CFLAGS="" emerge gnomad2'. Please post your results.

----------

## Earthwings

There's also something in the FAQ.

```

 Q: My kernel does not find a driver for the jukebox!

   A: So I guess you're using Linux. libnjb doesn't use a 

      kernel driver for the jukebox anyway. It uses the USB

      from userland, accessing the device through /proc/bus/usb.

      The important thing for you is to see that if you write

      cat /prob/bus/usb/devices you find your jukebox among

      the listed devices (the Vendor/Product ID combo can be

      found in the "nomad.usermap" file that comes with

      Gnomad2.

      OK this is quite technical but you asked for it.

```

Gnomad2 version 2.4.1 is out, just rename the ebuild accordingly to get it.

----------

## PMT

Yes, hotplug is started, and I checked usb.usermap. For once, I'm not being stupid.

Also, etc-update is fine.

I noticed that part of the FAQ too...

I'll try running it as root now...

...huh. I re-emerged it, and it no longer segfaults for root or nonroot users. But now it also still hangs the program when I connect to my jukebox. No error.

----------

## pagaman

Ok I've started looking into gnomad2.

Some of you may get a message 

jukebox.c: In function `jukebox_discover':

jukebox.c:293: `NJB_DEVICE_DELLDJ' undeclared (first use in this function)

jukebox.c:293: (Each undeclared identifier is reported only once

jukebox.c:293: for each function it appears in.)

make[1]: *** [jukebox.o] Error 1

make[1]: Leaving directory `/usr/src/paga/tmp/gnomad2-2.4.1/src'

make: *** [all-recursive] Error 1

The way I dealt with this was to remove:

	case NJB_DEVICE_DELLDJ:

	  retarray[i] = g_strdup_printf("Dell Digital Jukebox");

	  break;

From jukebox.c

But from the looks of things just defining the thing may be the best bet.

Anyhow moving on.

The reason why gnomad2 was crashing on my machine at startup was because of some dodgy meta data.

Basically if you look around line 454 you see this:

meta = (metadata_t *) g_hash_table_lookup(songhash,tmplist2->data);

The g_hash_table_lookup function is returning null, which means when the meta struct info is being used, gnomad2 seg-faults   :Crying or Very sad: 

So I'm now looking into how that meta table is created. 

I bet its being malformed..

There's hope yet   :Laughing: 

----------

## Earthwings

 *Quote:*   

> 
> 
> jukebox.c:293: `NJB_DEVICE_DELLDJ' undeclared (first use in this function)
> 
> jukebox.c:293: (Each undeclared identifier is reported only once
> ...

 

Did you use the cvs version of libnjb?

----------

## pagaman

 *Earthwings wrote:*   

> 
> 
> Did you use the cvs version of libnjb?

 

Yep.

I've just noticed the:

message:

LIBNJB Panic: Unknown playlist frame 010f, length 0018 bytes

LIBNJB Panic: Unknown playlist frame 010f, length 0014 bytes

LIBNJB Panic: Unknown playlist frame 010f, length 0010 bytes

So it looks like libnjb, is fluffed, which then messes up the playlists info -> messes up playlist -> makes gnomad2 mess up.

----------

## pagaman

looking around a bit more at libnjb, it looks like the thing is getting confused on play list names.

I'll come back once its sorted.

This is for a nomad zen xtra btw   :Very Happy: 

----------

## Earthwings

In the meantime, I updated my kernel to 2.6.2-rc1-mm2 with debugging info for usb and now don't have connection problems anymore.

----------

## piquadrat

 *PMT wrote:*   

> Neutrino throws an error to the effect of "bonobo couldn't find the neutrino.server".
> 
> 

 

```
ln -s /usr/local/lib/bonobo/servers/neutrino.server /usr/lib/bonobo/servers/neutrino.server
```

 as root helps, your paths may vary.

/me hopes the postman brings his Zen Xtra tomorrow  :Smile: 

----------

## jfb3

Well at least I'm not the only one with the "eternal scanning" problem with my Zen.

----------

## jfb3

Oooops, I just read somewhere that Gnomad2 2.4.1 is now out and it is supposed to fix the scanning problem.. I'll try it when I get home and let y'all know how it goes.

----------

## markfl

By the way, anyone wanting to use libnjb but not wanting to install gnome libs for neutrino or gnomad2 should keep an eye on KNomad which is a kde version of gnomad2. It is still pretty alpha but i have successfully uploaded tracks to it with libnjb 1.0.1 . At the moment you have to use CVS to get the source, i think i have an ebuild lying around - i'll post it back when i find it.  Please post bugs and problems that you have on the sf.net project page. I'm going to talk to oisch(project admin) about making an alpha release (0.0.1) or something.

Please take a look as any constructive criticism is welcomed.

markfl[/url]

----------

## jfb3

I entered ACCEPT_KEYWORDS="~x86" emerge  --nodeps libnjb-cvs

It dies like 

```
(cd .libs && rm -f libnjb.so && ln -s libnjb-1.0.1.so libnjb.so)

ar cru .libs/libnjb.a  base.o ioutil.o protocol.o procedure.o byteorder.o playlist.o usb_io.o njb_error.o datafile.o songid.o eax.o time.o protocol3.o unicode.o

ranlib .libs/libnjb.a

creating libnjb.la

(cd .libs && rm -f libnjb.la && ln -s ../libnjb.la libnjb.la)

make[1]: Leaving directory `/var/tmp/portage/libnjb-cvs-1.0.1/work/libnjb/src'

!!! ERROR: media-libs/libnjb-cvs-1.0.1 failed.

!!! Function src_compile, Line 26, Exitcode 2

!!! make failed

```

If I change the ebuild to be "x86" instead of "~x86" and emerge without the "--nodeps" it dies the same way.  (If I leave it as "~x86" and don't put --nodeps it wants to emerge ALOT of stuff that I don't want to upgrade.).

How did anyone else get this to work?

----------

## piquadrat

I had the same problem. It seems that make exits with an error code, no matter if make was successful or not (don't ask me why...). I changed the line

```
    emake || die "make failed" 
```

into 

```
    emake 
```

and it worked.

Not pretty, I know...

----------

## breakerfall

I have one of the original Jukebox Zen players (USB and Firewire) and I had plenty of problems just getting the libnjb installed back on 2.4 kernels. I actually have it working with 2.6.x kernels. It's buggy though and I've had neutrino and gnomad crash on me a couple of times.

I'd love to get it connected via firewire  :Very Happy: 

----------

## jfb3

Well I finally had time to gt back to this.. and got everything compiled.  (My descktop machine had a GCC problem https://forums.gentoo.org/viewtopic.php?p=790048#790048 which meant that ~nothing~ would compile.  Fixed that.)

Gnomad2 doesn't blow up or do anything drastic.  As a matter of fact it doesn't do anything at all.  When I try to copy a file to my Zen, nothing happens.  I even rescan the Zen and nothing was transfered. (I even unplugged it and checked the device itself, no joy.)

Ahhh, now I see, you HAVE to add the song to a playlist. (Stupid program) I was choosing "(none)".

I don't know why I should have to categorize everything into some playlist or another.  But I guess I can..."ALL".

At least it seems to work now in a more or less functional manner. (Means I don't have to put the Win2K drive in and boot to move music.)  Cool.

----------

## markfl

@jfb3:

you should submit that as a bug to the gnomad2 team, surely the none option is not working correctly which would make that a bug....

Anyway, i found that for my zen usb 2.0 the libnjb-1.0.1 release is much better.

markfl

----------

