DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2012-04-06 00:26:52

TheKleini666
Member
Registered: 2012-03-24
Posts: 7

Debian/fonz and USB devices

Hey there,

I just have a simple question.
Am I able to connect USB devices to debian? or to the fonz fun_plug?
Because I want to install fhem on my server and tried to connect a "CUL" but I think, that my debian doesn't recognizes it.
But the hardware recognizes USB devices.

Is there a way to connect USB devices to ubuntu/fonz fun plug?

Hope you can help me smile

thanks,
~TheKleini666~

Offline

 

#2 2012-04-06 11:03:42

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Debian/fonz and USB devices

Yes, you can connect USB devices to ffp or (chrooted?) Debian, *if* there is kernel support for that specific device. When the kernel supports that device, you only need a device node in /dev (or any other place) to use it from userland. And it doesn't matter which userland, firmware, ffp or debian.
You can see if a device has kernel support by executing:

Code:

dmesg -c  # clear kernel log buffer
# insert USB device and wat 10 seconds
dmesg

Now you have all kernel logs regarding this device. When the kernel has recognized you should see the device name, and/or a generic name for the type of device.

Offline

 

#3 2012-04-06 11:16:16

TheKleini666
Member
Registered: 2012-03-24
Posts: 7

Re: Debian/fonz and USB devices

Mijzelf wrote:

Yes, you can connect USB devices to ffp or (chrooted?) Debian, *if* there is kernel support for that specific device. When the kernel supports that device, you only need a device node in /dev (or any other place) to use it from userland. And it doesn't matter which userland, firmware, ffp or debian.
You can see if a device has kernel support by executing:

Code:

dmesg -c  # clear kernel log buffer
# insert USB device and wat 10 seconds
dmesg

Now you have all kernel logs regarding this device. When the kernel has recognized you should see the device name, and/or a generic name for the type of device.

Ok thanks smile
I'll try it today smile

Offline

 

#4 2012-04-07 15:30:45

TheKleini666
Member
Registered: 2012-03-24
Posts: 7

Re: Debian/fonz and USB devices

Code:

usb 1-1: new full speed USB device using ehci_marvell and address 4
usb 1-1: configuration #1 chosen from 1 choice
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.

Thats what I get after waiting 10 secs.
So it recognises that I connect my USB device right?

But in my Ubutnu Laptop it makes a new file called ttyACM0 in /dev after connecting, but in my NAS, there is no new file after connecting. yikes

Last edited by TheKleini666 (2012-04-07 15:40:13)

Offline

 

#5 2012-04-07 17:49:01

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Debian/fonz and USB devices

So it recognises that I connect my USB device right? <snip> ttyACM0

Well, yes and no. According to the ttyACM0 I suppose it's some kind of modem, right? But it's recognized as a mass-storage device. And a strange one, as it doesn't detect any partitions.

I *think* this is a multimode device, which can provide it's driver (Windows only, I suppose) while being an USB stick, and then switch to 'modem mode'.
Have a look at usb_modeswitch.

BTW, when you switch the mode, another USB device should be detected, but that doesn't automatically mean that the devicenode in /dev is made. Therefore udev is needed, and udev also needs the right scripts. Don't know if that's available on your NAS. But you can just copy the devicenode from your laptop.

Offline

 

#6 2012-04-07 18:44:51

TheKleini666
Member
Registered: 2012-03-24
Posts: 7

Re: Debian/fonz and USB devices

Mijzelf wrote:

So it recognises that I connect my USB device right? <snip> ttyACM0

Well, yes and no. According to the ttyACM0 I suppose it's some kind of modem, right? But it's recognized as a mass-storage device. And a strange one, as it doesn't detect any partitions.

I *think* this is a multimode device, which can provide it's driver (Windows only, I suppose) while being an USB stick, and then switch to 'modem mode'.
Have a look at usb_modeswitch.

BTW, when you switch the mode, another USB device should be detected, but that doesn't automatically mean that the devicenode in /dev is made. Therefore udev is needed, and udev also needs the right scripts. Don't know if that's available on your NAS. But you can just copy the devicenode from your laptop.

It also works with Ubuntu, because FHEM is a perl based programm and most used on Linux.
And the CUL is made for FHEM and it's an USB device which sends signals over 868,35 MHZ.
I use it for home automation.

Last edited by TheKleini666 (2012-04-07 18:46:28)

Offline

 

#7 2012-04-07 19:58:25

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Debian/fonz and USB devices

I didn't mean to say that the software is Windows only. Only the driver provided on the build-in USB stick.

Offline

 

#8 2012-04-08 13:42:44

TheKleini666
Member
Registered: 2012-03-24
Posts: 7

Re: Debian/fonz and USB devices

Mijzelf wrote:

I didn't mean to say that the software is Windows only. Only the driver provided on the build-in USB stick.

Oh, ok.

I'll try the USB modeswitch now, I hope it helps.

But why does it works with Ubuntu but not with Debian, or does it work with my Laptop but not with the NAS?
I think, I'll also try running Debian in a VM and try the USB device there.

Then I know, if it's a hardware problem or a software problem.


/Edit:
One question, which of the following things do I need?
Because for every architectur there is another Version.

amd64         
armel
i386
ia64
kfreebsd-amd64
kfreebsd-i386
mips
mipsel
powerpc
s390
sparc

Last edited by TheKleini666 (2012-04-08 13:47:23)

Offline

 

#9 2012-04-08 15:27:27

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Debian/fonz and USB devices

But why does it works with Ubuntu but not with Debian, or does it work with my Laptop but not with the NAS?

Ubuntu is designed to 'just work' as much as possible. Debian is designed to be rock-stable. And you NAS, well, this is well beyond the design of a NAS.
I *think* Ubuntu has a udev script which recognizes this device, and automagically runs usb_modeswitch.

One question, which of the following things do I need?

armel.

BTW, on the page I pointed to, there is a download usb_modeswitch-1.1.9-arm-static.bz2, which might run on your box.

Offline

 

#10 2012-04-08 18:20:47

TheKleini666
Member
Registered: 2012-03-24
Posts: 7

Re: Debian/fonz and USB devices

Thanks a lot smile
I'll try it later smile

Without your help, I had no chance to get it working, but with your help it might work smile
THANKS smile

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB