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

#26 2008-07-15 23:37:50

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: FTDI_SIO

It's not very usable, yet, but I got ftdi_so loaded with ffp and Linux 2.6.25: http://dns323.kood.org/howto:ffp-reloaded

Code:

root@bob:~# uname -a
Linux bob 2.6.25.1-ffp #1 Tue Jul 15 10:07:35 CEST 2008 armv5tel GNU/Linux
root@bob:~# lsmod
Module                  Size  Used by    Not tainted
ftdi_sio               33256  0 
usbserial              28048  1 ftdi_sio

Offline

 

#27 2008-07-18 17:02:10

vedeja
Member
Registered: 2008-02-21
Posts: 161

Re: FTDI_SIO

fonz wrote:

It's not very usable, yet, but I got ftdi_so loaded with ffp and Linux 2.6.25: http://dns323.kood.org/howto:ffp-reloaded

fonz, please develop your thoughts. How could this help me?

(My situation now is, the driver is hand-updated and compiled for DNS but not working.)


¤ 2 x 500 GB Samsung Spinpoint ¤ FFP 0.5 ¤ Custom fanscript ¤
¤ Lighttpd 1.4.19 ¤ Transmission 1.50 ¤ FW 1.07 ¤

Offline

 

#28 2008-07-18 17:52:21

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: FTDI_SIO

vedeja wrote:

My situation now is, the driver is hand-updated and compiled for DNS but not working.

You want to use a device with your dns-323 that requires the ftdi_so driver. You also want an up-to-date version of that driver. It's a kernel module, and you didn't get it to work with the firmware kernel. The idea is simply: Use a different, custom, recent kernel. The catch is that the rest of the firmware won't play nicely with custom kernels, which is why you need ersatz, i.e. you need your dns to run with a different firmware.

ffp-reloaded is an approach that allows you to run ffp and a recent kernel - and the firmware will not be involved. It's a combination of two things: You already know 'ffp', my collection of programs compiled for the dns. ffp does not depend on the firmware and (with a few additions described in the ffp-reloaded howto page) can be run on its own. 'reloaded' is the name of a program that can load and start a new kernel. Together, they can be used to boot into a 'custom firmware' made of ffp and a recent kernel. Note that all this leaves the original firmware alone - reboot, and everything's back to normal.

It's way to run a recent ftdi_so. Not simple, but possible.

Offline

 

#29 2008-12-17 08:32:37

vedeja
Member
Registered: 2008-02-21
Posts: 161

Re: FTDI_SIO

With the help from Bull (not sure if he is on the forum) the issue is solved. He compiled the FTDI driver for the DNS-323 and the Telldus Tellstick is now working! If you need help to get it up and running, please email me.


¤ 2 x 500 GB Samsung Spinpoint ¤ FFP 0.5 ¤ Custom fanscript ¤
¤ Lighttpd 1.4.19 ¤ Transmission 1.50 ¤ FW 1.07 ¤

Offline

 

#30 2010-08-21 04:13:37

vincnet73
Member
From: France
Registered: 2010-08-21
Posts: 7

Re: FTDI_SIO

Hello Fonz, Vedeja,
I would like to plug FTDI usb to serial converter on my dns323, and control it with ser2net.
I've install ser2net, it seem work fine,
I've download  usbserial.ko and and ftdi_sio.ko at http://dev.skcserver.de/dns323/modules_ … sb/serial/
but i cant success the insmod  (i'm not the best linux develloper in the world :-) )

I've install libftdi with ipkg (found here http://ipkg.nslu2-linux.org/feeds/optwa … /unstable/)
But I'm not sure the driver runs...

dmesg show: "usb 1-1: new full speed USB device using ehci_platform and address 2"

lsusb show:
"
Bus 001 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT
232 USB-Serial (UART) IC
Bus 001 Device 001: ID 0000:0000
"

but should I look for ttyS2 or for ttyUSB0 in /dev/ ?

So could you explain step by step, how to install ftdi driver on ARM system?

Last edited by vincnet73 (2010-08-22 04:11:14)

Offline

 

#31 2010-08-21 05:39:00

vincnet73
Member
From: France
Registered: 2010-08-21
Posts: 7

Re: FTDI_SIO

Maybe an other solution to command Serial-USB device connected to DNS:

I've install with my DNS web interface: the D-link shareport package
And on my PC the shareport software

on lan I can write on my usb serial port connected to the DNS, but unfortunately, shareport seem's to keep the serial port open. So I can't use the RTS signal...

I've open the 9303 UDP port on my router, I've to try if it's pass throught...

I hope this can help someone,

And if you have a tuto to use FTDI 232R chip directly from the NAS, let me now !

Thanks in advance

Last edited by vincnet73 (2010-08-22 04:08:06)

Offline

 

#32 2010-08-22 23:34:39

vincnet73
Member
From: France
Registered: 2010-08-21
Posts: 7

Re: FTDI_SIO

no help at this time...

so, I've play with the SharePort files,I've add  ftdi_sio.ko & usbserial.ko in it...

Now dmesg shows:

usbcore: deregistering driver usblp
sxuptp: sxuptp_keepalive_thread start
sxuptp_driver: VID:0x0403 PID:0x6001
sxuptp_driver: M(0x01): FTDI
sxuptp_driver: P(0x02): TTL232R
sxuptp_driver: S(0x03): FTDCJ5II
sxuptp_driver: * If#=0 Alt=0 #EPs=2 Cls=0xff SubCls=0xff Prot=0xff
sxuptp: registered the new interface dev-001/005/0
usbcore: registered new driver sxuptp_driver
usbcore: registered new driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for Generic
usbcore: registered new driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI SIO
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI 8U232AM
Compatible
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI FT232BM
Compatible
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI FT2232C
Compatible
drivers/usb/serial/usb-serial.c: USB Serial support registered for USB-UIRT Infr
ared Tranceiver
drivers/usb/serial/usb-serial.c: USB Serial support registered for Home-Electron
ics TIRA-1 IR Transceiver
usbcore: registered new driver ftdi_sio
drivers/usb/serial/ftdi_sio.c: v1.4.2:USB FTDI Serial Converters Driver

Could someone you well know Linux if I'm on the right way ?

Offline

 

#33 2010-08-23 10:35:37

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

Re: FTDI_SIO

but should I look for ttyS2 or for ttyUSB0 in /dev/ ?

I suppose you'll have to create it yourself:

Code:

mknod /dev/ttyUSB0 c 188 0
chmod a+rw /dev/ttyUSB0

Now you should be able to

Code:

echo "Hello" >/dev/ttyUSB0

Offline

 

#34 2010-08-23 20:08:34

vincnet73
Member
From: France
Registered: 2010-08-21
Posts: 7

Re: FTDI_SIO

Mijzelf wrote:

but should I look for ttyS2 or for ttyUSB0 in /dev/ ?

I suppose you'll have to create it yourself:

Code:

mknod /dev/ttyUSB0 c 188 0
chmod a+rw /dev/ttyUSB0

Now you should be able to

Code:

echo "Hello" >/dev/ttyUSB0

Thank Mijzelf,

the chmod was a good idea!
but don't solve my problem.. sad
and probably it's not usefull, if we compare ttyUSB  to ttyS

crw-r--r--    1 root     root       4,  64 Aug 23 17:33 ttyS0
crw-r--r--    1 root     root       4,  65 Dec 27  2005 ttyS1
crw-rw-rw-    1 root     root     188,   0 Aug 23 17:55 ttyUSB0

I've no problem to mknode ttyUSB0 and chroot it,

but I'm not sure there's really a driver device behind...

/dev # stty -F /dev/ttyUSB0
stty: can't open '/dev/ttyUSB0': No such device


Is it necessary to open the serial port and configure it, before send data?

to obtain something like:
/ # dmesg | grep tty
Kernel command line: root=/dev/ram console=ttyS0,115200 :::DB88FXX81:egiga0:none
ttyS0 at MMIO 0x0 (irq = 3) is a 16550A

Thanks a lot for your suggestion, if you have an other one, you'r Welcome !

Last edited by vincnet73 (2010-08-23 20:37:51)

Offline

 

#35 2010-08-23 20:59:28

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

Re: FTDI_SIO

/dev # stty -F /dev/ttyUSB0
stty: can't open '/dev/ttyUSB0': No such device

Hm. I'm afraid there is something wrong with your driver. When I plug my ftdi (not in a 323) dmesg gives:

Code:

usb 2-1: new full speed USB device using uhci_hcd and address 2
usb 2-1: New USB device found, idVendor=0403, idProduct=6001
usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1: Product: TTL232R-3V3
usb 2-1: Manufacturer: FTDI
usb 2-1: SerialNumber: FTE39BIP
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for FTDI USB Serial Device
ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
usb 2-1: Detected FT232RL
usb 2-1: Number of endpoints 2
usb 2-1: Endpoint 1 MaxPacketSize 64
usb 2-1: Endpoint 2 MaxPacketSize 64
usb 2-1: Setting MaxPacketSize 64
usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
usbcore: registered new interface driver ftdi_sio
ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver

Code:

# stty -F /dev/ttyUSB0 
speed 9600 baud; line = 0;

Is it necessary to open the serial port and configure it, before send data?

No. It's configured by default, only the configuration is unknown.

the chmod is probably not usefull, if we compare ttyUSB  to ttyS

crw-r--r--    1 root     root       4,  64 Aug 23 17:33 ttyS0
crw-r--r--    1 root     root       4,  65 Dec 27  2005 ttyS1
crw-rw-rw-    1 root     root     188,   0 Aug 23 17:55 ttyUSB0

ttyS is never opened directly. login does it for you. I suppose you want an ordinary user to be able to open the serial port.

Offline

 

#36 2010-08-27 10:04:39

vincnet73
Member
From: France
Registered: 2010-08-21
Posts: 7

Re: FTDI_SIO

Ok, I'm back after some days out.

And I'm back to zero on my DNS too,
because I've understand, I've used the Shareport USB driver instead of the original USB driver!

So I'm afraid I have to compile the USB FTDI driver myself...

You can explain me how to do that ? (on my DNs or on My PC whit Debian)

Tahnks a lot ;-)

Offline

 

#37 2010-08-27 11:39:31

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

Re: FTDI_SIO

Can't you find the right module(s) here?

Offline

 

#38 2010-08-27 20:45:33

vincnet73
Member
From: France
Registered: 2010-08-21
Posts: 7

Re: FTDI_SIO

It's works !

for newbies like me,
How install a FTDI RS232 USB calbe on DNS 323 :

Code:

#cd /mnt/HD_a2/ffp/lib/
#mkdir modules
#cd modules
#mkdir 2.6.12.6-arm1
#wget http://dev.skcserver.de/dns323/modules_v1.03/kernel/drivers/usb/serial/usbserial.ko
#wget http://dev.skcserver.de/dns323/modules_v1.03/kernel/drivers/usb/serial/ftdi_sio.ko
#chmod 755 usbserial.ko
#chmod 755 ftdi_sio.ko
#cd ../../../etc/
#vi /mnt/HD_a2/ffp/etc/fun_plug.local

insert 5 lines:

ln -s /ffp/lib/modules/2.6.12.6-arm1 /lib/modules/2.6.12.6-arm1
insmod /lib/modules/2.6.12.6-arm1/usbserial.ko
insmod /lib/modules/2.6.12.6-arm1/ftdi_sio.ko
mknod /dev/ttyUSB0 c 188 0
chmod 0666 /dev/ttyUSB0

To save this file type: 'escape':wq

Code:

#chmod 755 fun_plug.local

Restart your DNS

Code:

#stty -F /dev/ttyUSB0

you may have something like that:

speed 9600 baud;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-brkint -imaxbel

Code:

#dmesg

must show something like:

Code:

usbcore: registered new driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for Generic
usbcore: registered new driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI SIO
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI 8U232AM
Compatible
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI FT232BM
Compatible
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI FT2232C
Compatible
drivers/usb/serial/usb-serial.c: USB Serial support registered for USB-UIRT Infr
ared Tranceiver
drivers/usb/serial/usb-serial.c: USB Serial support registered for Home-Electron
ics TIRA-1 IR Transceiver
ftdi_sio 1-1:1.0: FTDI FT232BM Compatible converter detected
usb 1-1: FTDI FT232BM Compatible converter now attached to ttyUSB0
usbcore: registered new driver ftdi_sio
drivers/usb/serial/ftdi_sio.c: v1.4.2:USB FTDI Serial Converters Driver

To send a command to your serial device:

Code:

#echo "your command" > /dev/ttyUSB0

sad My last problem is to control the RTS signal... sad

I've try
#stty -F /dev/ttyUSB0 crtscts
to enable it,

but how set it to 0 or 1 ?

Last edited by vincnet73 (2010-08-27 21:19:19)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB