User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

US Robotics 56k External Modem with a Raspberry Pi Model A

Thu Jun 06, 2013 10:15 am

Hey folks, I hope someone out there can help me. I know this is a long post, but it's quite fun. I’m working on a little project to try and use an old serial modem with the Raspberry Pi. My goal is, for now, just to be able to dial up to an Internet ISP. But I would like to take it a step further to investigate if it would be possible to use these old modems with a Pi as a means for a fall back networking solution during times of Internet service outage. Site to site etc.

I have got as far as being able to communicate with the modem, I can dial up and establish a connection but I am having an issue with the communication protocol after this. I think it is causing a failure to authenticate whereupon the other end hangs up the phone after 4 or 5 seconds.

Here is list of what I am using.
  • Normal analogue telephone line, nothing special about it, clear and has no noise
  • UK Telephone Socket to RJ11 lead
  • US Robotics 56k Message Modem
  • RS232 DB9 to DB25 Null Modem Cable
  • RS232 DB9 Gender Changer
  • MAX3232 RS232 DB9 Serial Port To TTL Converter Module
  • Raspberry Pi Model A
  • Motorola Atrix Lapdock as a Console
Here are some pics of the setup
Image
Image

I've also done a little hack to loop back the DSR to DTR pins (4 and 6) so that the modem will accept commands from the Pi. I then insert the Gender Changer into the female side of the null modem cable (shown below) which creates the short so that the DTR light on the modem comes on. Without this the modem doesn't respond to the AT command in minicom etc.
Image
I know this might make some of you tut loudly but I can ensure that this wire is not shorting to any other pins.

Here is a list of things I have tested in isolation
  • The TTL Converter Module works when connected to a PC serial port (Pi to PC)
  • The Modem works when connected to a PC serial port (Modem to PC) AT OK etc
  • The Modem works when connected to the Pi (Pi to Modem) AT OK etc
So with this set up the modem will appear to linux as /dev/ttyAMA0, so I have obviously disabled the getty console from the serial line by removing it from inittab and cmdline.txt leaving it free for me to use with the modem.

So on top of this I installed the ppp and wvdial packages. I am attempting to connect to this ISP and here is my wvdial.conf file. I have also been trying to use http://emergencyinternet.com/ and I get the same results, so I know something is wrong on my side.

Code: Select all

[Dialer Defaults]
Modem Type      = Serial Modem
Phone           = 08445352000 
Baud            = 115200
Auto Reconnect  = yes
Idle Seconds    = 0
New PPPD        = yes
Init1           = ATZ
Dial Command    = ATD
Auto DNS        = yes
Check DNS       = yes
Check Def Route = yes

[Dialer modem]
Modem           = /dev/ttyAMA0
Carrier Check	= no
Username        = free
Password        = dialup
So here is the problem. When I type wvdial modem the modem initlialises, dials, forms a connection and then after a few seconds a lot of strange characters are received which wvdial seems to ignore whereupon the other end hangs up. So I know the physical side of the connection is working, but there is something wrong with the protocol side of things.

I made a short video of this so you can see.
http://www.youtube.com/watch?v=bTGHbSyos60

Here are some pics of the output too.
This one is with Carrier Check on; link.
This one is with Carrier Check off; link.
I have tried various different baud rates and these seem to produce no change. :?

So anyway I’ve been struggling with this for a while now and after tormenting a few of the chaps on IRC for several days with my pestering I thought it's time to try and consult the main forums. I hope someone out there might be able to help.

Any help or suggestion is really appreciated, thanks!

User avatar
bob_binz
Posts: 441
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: US Robotics 56k External Modem with a Raspberry Pi Model

Thu Jun 06, 2013 10:43 am

Just out of curiosity, as I can't see it in your post (doesn't mean it's not there, just that I may have missed it!) have you made a successful connection to that ISP by any other means? (you did say modem works, but not specifically with that ISP)

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: US Robotics 56k External Modem with a Raspberry Pi Model

Thu Jun 06, 2013 10:53 am

I haven't used it to dial that ISP from a PC serial port actually, I guess I could do that to test if the modem is at fault. What I have done is dial other ISPs from the Pi, for instance BT Yahoo PAYG on 0845756000 and this gave me similar (but different) strange characters.

What would be really good is if someone else could try and reproduce this set up and see if they get the same results as me.

User avatar
bob_binz
Posts: 441
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: US Robotics 56k External Modem with a Raspberry Pi Model

Thu Jun 06, 2013 11:07 am

I think at this stage it might be useful to confirm the modem can communicate properly. Obviously its responding correctly to ATZ and ATD commands, but then its echoing garbage on receipt. Does it need any special initialisation string? (try here: http://www.modemhelp.org/inits/usrobotics.html)

It's a long time since I played with modems, and I don't even think I still have a serial one!

User avatar
cyrano
Posts: 714
Joined: Wed Dec 05, 2012 11:48 pm
Location: Belgium

Re: US Robotics 56k External Modem with a Raspberry Pi Model

Thu Jun 06, 2013 11:22 am

115 Kbps seems too high as a first setting. Even PC's serial ports were seldom reliable at 115 Kbps in the serial modem era...

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: US Robotics 56k External Modem with a Raspberry Pi Model

Fri Jun 07, 2013 9:55 pm

bob_binz wrote:I think at this stage it might be useful to confirm the modem can communicate properly. Obviously its responding correctly to ATZ and ATD commands, but then its echoing garbage on receipt. Does it need any special initialisation string? (try here: http://www.modemhelp.org/inits/usrobotics.html)

It's a long time since I played with modems, and I don't even think I still have a serial one!
I did a bit more work to this tonight and it looks like you may be onto something here bob_binz!
I couldn't find my exact modem on that page but I did find the modem manual on the web here.

In the troubleshooting section of that PDF, page 27 I found this line;
Your screen keeps displaying random garbage characters. == You could have a conflict with the remote modem’s settings for word length, parity, and stop bits.
Which seems plausible. It also recommended to use AT&F1 or ATZ4 to reset the modem and load hardware flow control settings. After I added this to wvdial.conf as Init2 there was an improvement, but I'm still not quite there!

In the previous screen shots of the connect output you'll see this line;
CONNECT 45333/ARQ

Which I think is some kind of fax mode. Now I get this line;
CONNECT 45333/ARQ/V90/LAPM/V42BIS
We also get ppp negotiation detected, but the hangup after about 5 seconds still occurs.

See the pictures.
Image and Image.

I've been dialing few different numbers and from some I get a proper login prompt, like BT Yahoo pay as you go on 08457560000 but I don't have credentials for this so I can only get a failed login.

I have a theory. This is that I need to right init string to put the modem into X2 mode which is likely what the modem on the other end of free-dialup.net wants to use. But I don't know what the init string for this is. My brain hurts now, if anyone has any suggestions or ideas please share them.

So close yet so far!

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: US Robotics 56k External Modem with a Raspberry Pi Model

Sat Jun 08, 2013 1:39 am

Davespice wrote:
Your screen keeps displaying random garbage characters. == You could have a conflict with the remote modem’s settings for word length, parity, and stop bits.
Which seems plausible. It also recommended to use AT&F1 or ATZ4 to reset the modem and load hardware flow control settings. After I added this to wvdial.conf as Init2 there was an improvement, but I'm still not quite there!
Ahh hardware flow control CD, RTS, CTS, DTR and DSR, make sure you have correct loopback at the gender changer as this can cause problems.

The Pi and your addon board are not connecting modem control signals so you do NEED the modem to think they are there with connections

1 - 4 - 6 CD-DSR-DTR
7 - 8 CTS - RTS

As far as wvdial is concerned they are not connected.
In the previous screen shots of the connect output you'll see this line;
CONNECT 45333/ARQ

Which I think is some kind of fax mode. Now I get this line;
CONNECT 45333/ARQ/V90/LAPM/V42BIS
We also get ppp negotiation detected, but the hangup after about 5 seconds still occurs.
Suggests partly due to initial garbage you may also have wrong authentication mode PAP, CHAP, MS-CHAP........
I've been dialing few different numbers and from some I get a proper login prompt, like BT Yahoo pay as you go on 08457560000 but I don't have credentials for this so I can only get a failed login.
Suggests they allow PAP others expect CHAP etc...
I have a theory. This is that I need to right init string to put the modem into X2 mode which is likely what the modem on the other end of free-dialup.net wants to use. But I don't know what the init string for this is. My brain hurts now, if anyone has any suggestions or ideas please share them.
So long since I did modem configurations, used to be able to do it in my sleep, sent a document by other means with some ideas.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: US Robotics 56k External Modem with a Raspberry Pi Model

Mon Jun 24, 2013 9:53 am

Okay well I haven't got any further with this. I think there must be some kind of hardware incompatibility going on that I just don't understand. I've also just had my phone bill come through. This is usually close to zero but this time it was £22. I had made 102 calls with a total duration of 103 minutes.

So I presume I was being billed for a whole minute every time I had a failed connection attempt. So if anyone attempts anything like this in the future be aware of this possibility. I think I'm going to give up on this now, I've spent too much time, effort and now money on it. You win some, you lose some :)


Return to “Troubleshooting”