How to use FTDI USB-to-(Sitecom serial modem) adapter?

Booting, installing, newbie
Post Reply
Message
Author
User avatar
Eastern Counties
Posts: 145
Joined: Tue 31 Jan 2006, 18:09
Location: UK

How to use FTDI USB-to-(Sitecom serial modem) adapter?

#1 Post by Eastern Counties »

I'm just trying Puppy 1.0.7 as replacement for my Red Hat 9. So far, absolutely amazing. One prob, though. I have a Sitecom external serial modem, but because I use a laptop, I have it connected via a FTDI USB-Serial adapter. This worked fine with Red Hat - it recognised adapter and modem. Puppy recognises the FTDI adapter (its included in the list of USB devices) On Red Hat, the connection was /dev/ttyUSB0, but this doesn't appear on the modem setup list. Any ideas how I make the connection.

Many thanks
John

(Other prob is with Canoni250 USB printer, but I see another posting about this, so will await reply there)

User avatar
jmarsden
Posts: 265
Joined: Sat 31 Dec 2005, 22:18
Location: California, USA

#2 Post by jmarsden »

Try loading the usbserial.o kernel module. You may also have to create the relevant device yourself with mknod, since out of the box I don't think Puppy comes with USB serial devices preconfigured for you. The module is there and seems to load with

Code: Select all

# insmod /lib/modules/2.4.29/usr/serial/usbserial.o.gz
I don't have a USB serial device here to test with, so I can't easily get you any further than that.

Jonathan

User avatar
Eastern Counties
Posts: 145
Joined: Tue 31 Jan 2006, 18:09
Location: UK

#3 Post by Eastern Counties »

Thanks for your help, Jonathan. I've loaded the module as you suggested, but how do I now set up my modem? If I use mknod to create a new device, am I making a block device? Very new to this, as you can see!
John

User avatar
Eastern Counties
Posts: 145
Joined: Tue 31 Jan 2006, 18:09
Location: UK

#4 Post by Eastern Counties »

After I load the usbserial module, the relevant lines iwhen I run dmesg are:

usbserial.c: USB Serial support registered for Generic
usbserial.c: USB Serial Driver core v1.4

when I run dmesg in Red Hat 9, they are:

usbserial.c: USB Serial support registered for Generic
usbserial.c: USB Serial Driver core v1.4
usbserial.c: USB Serial support registered for FTDI SIO
usbserial.c: USB Serial support registered for FTDI 8U232AM
usbserial.c: FTDI 8U232AM converter detected
usbserial.c: FTDI 8U232AM converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
ftdi_sio.c: v1.2.1:USB FTDI Serial Converters Driver

User avatar
Eastern Counties
Posts: 145
Joined: Tue 31 Jan 2006, 18:09
Location: UK

#5 Post by Eastern Counties »

Sorry seem to have lost the last part of the message there. It continues:

Can I copy drivers from Red Hat to Puppy? It would be great to get Puppy to dialup.

Thanks

John

User avatar
Eastern Counties
Posts: 145
Joined: Tue 31 Jan 2006, 18:09
Location: UK

FTDI USB to Serial modem

#6 Post by Eastern Counties »

I think I'm getting nearer!
I copied the ftdi_sio.o module from my Red Hat partition into /lib/modules/2.4.29/usb/serial in Puppy, but when I tried to install it, I got the following message:

ftdi_sio.o: unresolved symbol tty_flip_buffer_push_R0d314476
ftdi_sio.o: unresolved symbol usb_serial_register_Ra2fa38c4
ftdi_sio.o: unresolved symbol usb_serial_deregister_R45f4d10b
ftdi_sio.o: unresolved symbol tty_get_baud_rate_R2d98e7c0
ftdi_sio.o: unresolved symbol usb_control_msg_Rd13ef386
ftdi_sio.o: unresolved symbol usb_unlink_urb_Rf46ee7fc
ftdi_sio.o: unresolved symbol usb_submit_urb_R9f9fa939

I then downloaded the FTDI drivers from Sourceforge (ftdi_sio-1.3.3tar.gz), which unpacked into two files:

ftdi_sio.c
ftdi_sio.h

these appear to be text files (Rox opens them by default with Beaver) and so if I try to install them, I get a message that they are not ELF files.

What do I do with them to make them into drivers that Puppy will recognise?

John

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#7 Post by jcoder24 »

You MAY only be able to copy the files from redhat if it has the same kernel as puppy. The .c and .h files you have are source files and would need compiling.

If you have trouble compiling, post the link to the source and someone can prob compile it for you.

User avatar
Eastern Counties
Posts: 145
Joined: Tue 31 Jan 2006, 18:09
Location: UK

#8 Post by Eastern Counties »

Thanks for you reply.

Yes, The red hat I was using had an earlier kernel.

I have no idea about compiling - is it tricky tp learn?

The source for the FTDI drivers is

http://prdownloads.sourceforge.net/ftdi ... z?download

John

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#9 Post by MU »

There is a module in the huge Kernel-Module-package available on the main download-site.

I attach it.
Extract it for example with pupzip to
/usr/modules/kernel/drivers/usb/serial
Puppy will copy it automatically to /lib/modules then when it boots.

So add
modprobe ftdi_sio
or
insmod ftdi_sio
to /etc/rc.d/rc.local0
(as second line after the first one "#!/bin/sh") and reboot.

Mark
Attachments
ftdi_sio.o.tar.gz
(10.85 KiB) Downloaded 441 times

Guest

#10 Post by Guest »

Many thanks, Mark. I diidn't realise that there was a source of packages on the main site. I should have looked there first and will do in the future. Will install FTDI drivers today and perhaps next visit the forum via Puppy.

John

User avatar
Eastern Counties
Posts: 145
Joined: Tue 31 Jan 2006, 18:09
Location: UK

#11 Post by Eastern Counties »

OK, nearly there. Puppy recognises the FTDI USB-Serial adapter when I boot, and assigns it to ttyUSB0 (it also says 'or usb/tts/0 for devfs').

However, ttyUSB0 doesn't show as an option on the modem wizard. I entered it manually under Preferences>Modem device in GKDial, but it still won't connect. Anybody know how I get Puppy to see the connection?

Thanks again to Mark for putting me on track.

John


Incidentally, I didn't seem to have /usr/modules/kernel/drivers/usb/serial on my Puppy1.0.7 CD. After a certain amount of trial and error, I found the following worked:

1. unpacked ftdi_sio.0.tar.gz to /usr/lib/modules
2. edited /etc/rc.d/rc.local0 by adding these two lines at the beginning, as Mark suggested

insmod /lib/modules/2.4.29/usb/serial/usbserial.o.gz
insmod /usr/lib/modules/ftdi_sio.o

3. rebooted

User avatar
jmarsden
Posts: 265
Joined: Sat 31 Dec 2005, 22:18
Location: California, USA

#12 Post by jmarsden »

Eastern Counties wrote:However, ttyUSB0 doesn't show as an option on the modem wizard. I entered it manually under Preferences>Modem device in GKDial, but it still won't connect. Anybody know how I get Puppy to see the connection?
I suggest that you first check that there is really an appropriate character device file

Code: Select all

# ls -l /dev/ttyUSB0
and create one if not. Then try

Code: Select all

# picocom /dev/ttyUSB0
and see if you can type AT commands at the modem and get the expected responses back from it. If you can do that, then the device is working, and you "just" need to point your dialler of choice at it. If not, then work on the serial device stuff further before trying out dialers.

"One step at a time" is a good approach when trying to get unusual hardware working in Linux -- I suspect you've missed at least one step there, in effect jumping from "the device driver loaded OK" to "now I'll run a graphical program that uses the device". If you take it a bit more slowly and systematically, you will be more likely to succeed.

Jonathan

User avatar
Eastern Counties
Posts: 145
Joined: Tue 31 Jan 2006, 18:09
Location: UK

#13 Post by Eastern Counties »

Thanks again for replying, Jonathan, and for the 'one step at a time approach' advice - its a bit like trying to learn a foreign language without having a phrase book! Anyway, just about there now.

Yes, tty/USB0 was not in /dev, but in /dev/usb

The picocom command gave:

port is : /dev/usb/ttyUSB0
flowcontrol : none
baudrate is : 9600
parity is : none
databits are : 8
escape is : C-a
noinit is : no
norest is : no
send_cmd is : ascii_xfr -s -v -110
recieve_cmd is : rz -vv

Terminal ready

Having got this far, I managed to dial out to my ISP using:

atd 1470, 0808 993 3151

The dialler worked fine, but bizarely I got a voice message out of the modem 'Your number has not been recognised, please hang up and try again' - this is the standard message in UK when you dial a non-existent number. I tried with and without spaces, but always same response (this number has always worked before).

I then reconfigured EZNet and at the command 'eznet up', my modem dialled again but I still got the same voice message - perhaps not surprisingly. I checked for clues on Google and the EZNet site, but nothing. Could they be set up to expect a particular telephone number sequence - area code etc?

John

User avatar
jmarsden
Posts: 265
Joined: Sat 31 Dec 2005, 22:18
Location: California, USA

#14 Post by jmarsden »

Eastern Counties wrote:Thanks again for replying, Jonathan, and for the 'one step at a time approach' advice - its a bit like trying to learn a foreign language without having a phrase book!
Well, there are plenty of "phrasebooks" for learning all about Linux and Unix networking and device files and kernel device drivers -- but reading them all would take you weeks or months :-) I can probably come up with a recommended reading list if you really want one. Trying to get unusual hardware to work can end up getting you a fairly decent Linux education!
Having got this far, I managed to dial out to my ISP using:

atd 1470, 0808 993 3151

The dialler worked fine, but bizarely I got a voice message out of the modem 'Your number has not been recognised, please hang up and try again' - this is the standard message in UK when you dial a non-existent number. I tried with and without spaces, but always same response (this number has always worked before).
OK. Pick up the normal voice phone which is connected to the same phone line you have the modem on, and dial the same number... do you get through to a modem at the other end? Try with and without the 1470, in case that is confusing something somewhere? Try with atdt and atdp (tone dial and pulse dial respectively)? Perhaps try atdtw08089933151 or atdt,08089933151 or adtd,,,08089933151 -- so there is a delay before dialling the first digit? If you have a cell phone or another landline you can use for testing, can you call that number with the modem and get through OK? Lots of possibilities... keep trying!

This is starting to remind me of playing with 1200bps modems under DOS in the Philippines in 1986... which was two decades ago!

Jonathan

User avatar
Eastern Counties
Posts: 145
Joined: Tue 31 Jan 2006, 18:09
Location: UK

#15 Post by Eastern Counties »

OK, another step nearer. With the command

atdt1470,08089933151

my modem connected to my ISP.

Now, how to log on to my account?

Knowing that atdt was required rather than atd, and following instructions from the EZNet site, I tried to get EZNet to dial appropriately with

eznet change Tiscali init0=atdt

eznet up Tiscali

but the modem didn't really try to dial - just a continuous drone, although all the lights came on.

Is there some way I can follow my succesful atdt connection with a set of commands to provide my username and password and access my account?

User avatar
jmarsden
Posts: 265
Joined: Sat 31 Dec 2005, 22:18
Location: California, USA

#16 Post by jmarsden »

Eastern Counties wrote:With the command
atdt1470,08089933151
my modem connected to my ISP. Now, how to log on to my account?
If you are trying to use Eznet, post your current eznet config

Code: Select all

# eznet list |sed -e 's/password =.*$/password = XXX/'
being sure to censor the passwords as shown, and also the result of doing

Code: Select all

# eznet log
which gives a log of the last connection that attempt eznet made, as a starting point. Censor any passwords in the eznet log output too, of course.
Is there some way I can follow my succesful atdt connection with a set of commands to provide my username and password and access my account?
Yes, that's what the various dialer programs like eznet and wvdial are supposed to do. So you/we need to configure one of them to work with your modem and your ISP :-)

See some limited but useful docs on eznet at http://www.hwaci.com/sw/eznet/eznet.html also.

Jonathan

User avatar
Eastern Counties
Posts: 145
Joined: Tue 31 Jan 2006, 18:09
Location: UK

#17 Post by Eastern Counties »

OK, bit of a delay in replying, but I've been on quite a long walk with my puppy. The outcome is that my modem now connects fine and in fact I am sending this via Puppy.

I abandoned EZNet because the eznet down command made my computer crash each time. Instead, I applied the 'one step ata a time' approach to GKDialler. Firstly, I edited dev/modem into a symlink to /dev/usb/ttyUSB0. Secondly, I edited the modem wizard file so that it looked for dev/usb/ttyUSB0 and that a button appeared for ttyUSB0 in the wizard. On selecting the the 'ttyUSB0' button, the wizard still said 'Fail', but I saved it anyway.

Next, I opened GKDialler and entered the relevant info, but then went to /etc/ppp and edited the relevant files there to make sure they were on ATDT and that the number was complete (its too long to fit in the box), and that all other data were correct.

Now, GKDialler works as it should.

Thanks for all the guidance on this. Do you think it would be a help to others with a USB-serial modem connection if I wrote the procedure out more carefully and posted it elsewhere on the forum?

Now, if I can just get Puppy to recognise my printer, I'm all set.

Thanks again

John

User avatar
jmarsden
Posts: 265
Joined: Sat 31 Dec 2005, 22:18
Location: California, USA

#18 Post by jmarsden »

Eastern Counties wrote:OK, bit of a delay in replying, but I've been on quite a long walk with my puppy. The outcome is that my modem now connects fine and in fact I am sending this via Puppy.
Yay!
Thanks for all the guidance on this. Do you think it would be a help to others with a USB-serial modem connection if I wrote the procedure out more carefully and posted it elsewhere on the forum?
It might. I'd suggest you create a wiki page about how to do this, and then announce the page in the HOWTO forum?
Now, if I can just get Puppy to recognise my printer, I'm all set.
I suggest you start a separate forum thread for that :-)

Jonathan

Post Reply