Interfacing landline with avr

Go To Last Post
50 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello there 

 

I am working on a server and client project which is distributed around the country. Client should send data regularly to server (namely every half an hour). Clients are located in some desolated locations, and there is no internet or mobile broadband coverage there. The only possibility is using landline.

I cannot find any IC to interfacing landline. would you please tell me which chip or IC is used for that purpose?

For example, I use atmega32 with enc28j60 with spi port for Ethernet controller, and sim800 with uasrt port for sending sms, but what about point-to-point connection to landline telephone?

 

Thanx in advance.

Last Edited: Tue. Apr 11, 2017 - 07:24 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow! haven't had this question in years!

 

But the answer hasn't changed:

 

Creating a landline (PSTN; POTS) interface is a specialist subject and subject to lots of regulation - so you do not want to just buy a chip and have to do all this yourself!

 

surprise

 

Just like for GSM, you need to get a PSTN modem module.

 

Multitech, for one, still have them:

 

http://www.multitech.com/brands/...

 

 

http://www.multitech.com/brands/...

 

 

No doubt other suppliers are still available - or maybe you can still find "boxed" modems:

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Thu. Apr 6, 2017 - 04:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Am I the only one having fond memories of...

http://68.media.tumblr.com/77e2550c43135181db41a4dc83dd4fe8/tumblr_inline_n8mer5V2lQ1qz4t9g.jpg

 

cheeky

 

But yeah, this seems to be a question that has arrived here at Freaks about 25 years after the fact!!

 

Actually I shouldn't laugh. We were still doing this in the late 90's...

 

Image result for amstrad emailerhttps://images-na.ssl-images-amazon.com/images/I/319grw5iHlL.jpghttps://i.guim.co.uk/img/static/sys-images/Technology/Pix/pictures/2011/4/28/1304010347657/Amstrad-emailer-002.jpg?w=700&q=55&auto=format&usm=12&fit=max&s=12004b175f898e826656c9235d08f9b0

Last Edited: Thu. Apr 6, 2017 - 04:39 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

p1heidary wrote:
there is no internet or mobile broadband coverage ... sim800

Well, a SIM800 is certainly not mobile broadband !!

 

2/2.5G coverage can get up to 35 km from the tower ...

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Thu. Apr 6, 2017 - 04:49 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think Andy nailed it with:

awneil wrote:
(PSTN; POTS)

In Google "PSTN modem" seems to be a more successful search than "POTS modem" so I'd go with that first.

 

FYI:

 

PSTN: Public Switched Telephone Network

POTS: Plain Old Telephone System/Service

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanx all of you for prompt reply.

 

I am checking these modems, but is there any ic for that?

My client(data logger) is very light and portable. I prefer to add small ic to my board to increase size.

Is there any small chip like sim800 for that purpose? 

 

Off course "RJModem™ Embedded Analog Modem (MTxxxxRJ Series)" (second modem you mentioned)  is so tiny and supports uart port. I would be very appreciative if you give me tutorial about interfacing the device.

Last Edited: Thu. Apr 6, 2017 - 04:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Actually I shouldn't laugh. We were still doing this in the late 90's...

I am so glad to made you happy!!

Last Edited: Thu. Apr 6, 2017 - 05:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

p1heidary wrote:
I prefer to add small ic to my board to increase size.

Again, that will require very specialist design skills and expensive compliance testing - you really do not want to do that!

 

Yes, the "RJModem" is very compact

 

if you give me tutorial about interfacing the device.

It's really no different to the SIM800, or any other modem - AT Commands, and a couple of control lines.

 

Read the Multitech documentation - it tells you everything you need.

 

THere certainly used to be a DevKit - ask your local rep/distributor ...

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Well, a SIM800 is certainly not mobile broadband !!

maybe I didn't used correct expression. My data loggers should use at least three connection to the central server, since it is used for early warning purpose. There was an old project that I want to replace my board with it. I inspected the board and there was no separate modem. There was just some old chips which are not readable. 

Last Edited: Thu. Apr 6, 2017 - 05:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

When I type "PSTN modem chip" into Google I hit things like:

 

https://www.maximintegrated.com/...

 

(WOW! "v22Bis" - that takes me back to the days when the step up from V22 to V22Bis was like switching from ADSL to Fibre!!)

 

Some faster (56,000 baud) chips here:

 

http://www.silabs.com/products/m...

 

HOWEVER it's not the chip that is the tricky bit in this - it is the DAA line interface. It's a real bitch to get right and for certification purposes you have to get the design exactly right - two things may occur: one is that there could be as much as 80V headed your way from the exchange - you need isolation barriers to protect your local circuit. But, more to the point, the telephone company that operate the exchange don't want their own equipment blown up, or worse, one of their on-site engineers electrocuted because your faulty design inadvertently delivered 240V (or something) back up the wires to the exchange!!

 

Buying a module that is complete with line interface is a MUCH better idea - be sure to check that it has all the certification you require to get permission from the phone company to attach it to the line. That certification proves that it has been tested and shown to be safe. (we used to employ an engineer full time with just this one job - getting out modem using designs certified in countries across the world)

Last Edited: Thu. Apr 6, 2017 - 05:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As long as cost isn't too much of a concern, I'd use a satellite connection. It's damn expensive, but it works virtually everywhere on Earth. There are a few different providers and you need to know which one you're going to use before purchasing the hardware as there isn't any module that can work with all of them AFAIK.

 

If you want to stick with landlines, I suggest a dial up modem. For this to work, you need to know the phone numbers of the ports you're going to use.

And since these ports are stationary, your hardware will be as well. So size and weight is probably not actually an issue.

And be aware that you can't just connect anything to the phone ports. As others mentioned before, the are regulations you have to follow if don't want any legal troubles.

Also, there won't be any "all in one chip" solution, this isn't possible for various reasons. You're going to need some analog support circuitry. But complete modules are apparently available.

 

First google result for "arduino modem":

https://forum.arduino.cc/index.p...

"Some people die at 25 and aren't buried until 75." -Benjamin Franklin

 

What is life's greatest illusion?"  "Innocence, my brother." -Skyrim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Satellite is awesome but we don't want to use it now, because there are some infrastructure that my company had bought for previous project which I want to replace now. I mean they have bought some landlines and sim carts and I want to use them for my project.

analog support circuitry

Would you explain more about "analog support circuitry"?

Also is it possible to establish  tcp/ip communication with RJModem and at commands?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

p1heidary wrote:
Would you explain more about "analog support circuitry"?

No, really - do not even think about it!

 

Use a ready-made and certified module - such as the RJModem.

 

Also is it possible to establish  tcp/ip communication with RJModem and at commands?

Yes, of course it is - that is how everyone used to get internet in the days when dialup modems were the only option!

 

Google "PPP" and "SLIP" ... 

 

I think you will also need a TCP/IP stack on the microcontroller - so the ATMega32 may not be a good choice here...

 

Take a look at that Arduino shield for some ideas (although the Conexant link is dead).

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

p1heidary wrote:

analog support circuitry

Would you explain more about "analog support circuitry"?

 

clawson already explained that. The line interface is the problem, and most of the circuitry involved  is analog here.

 

p1heidary wrote:

Also is it possible to establish  tcp/ip communication with RJModem and at commands?

 

Yes, if you find an ISP that still offers this. In this case, you dial the ISP's number to connect to it. It will then offer Internet to your application, including tcp/ip.

Or you can do tcp/ip yourself, but since a dial up connection is point to point, it makes little sense.

"Some people die at 25 and aren't buried until 75." -Benjamin Franklin

 

What is life's greatest illusion?"  "Innocence, my brother." -Skyrim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

pawi777 wrote:
First google result for "arduino modem":

https://forum.arduino.cc/index.p...

I just looked more closely at that, and it is not an actual product - it is just an idea.

 

He has just photoshopped the landline connectors on to a picture of some other shield.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

pawi777 wrote:
Or you can do tcp/ip yourself

He says he already has the infrastructure for this.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
He says he already has the infrastructure for this.

By infrastructure I mean,they have bought landlines and sim carts.

This is early warning project and security issues is important, so they told me I should establish tcp/ip connection between server and clients for authentication.

You know sending just a message is not my goal.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It has already been made very clear that you should NOT try to do telephone line connections and control yourself due to regulations, and to simply buy a pre-made module that does the work for you, and carries the required interface.

 

BUT......

 

Based on your location I wonder if there is any regulation, or interface requirements at all to begin with.  So take a look at Maxim and SiLabs as recommended.

 

Also, if security for this early warning system is so important, do you have permission to be asking these things in a public international forum?

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

p1heidary wrote:
Clients are located in some desolated locations, and there is no internet or mobile broadband coverage there. The only possibility is using landline.
One way to get Internet access into desolate areas is by extending the range of off-the-shelf Wi-Fi routers.

Dual RF transceiver routers can have one RF transceiver to the home router or relay router from the remote router with the remaining RF transceiver for local use by multiple operators.

Medium range (10s km) will need some altitude for one or both ends (pole(s), hill, mountain) (BASE - Building Antenna Structure Earth)

The antennas are inexpensive to very inexpensive (self fabricated); DBS antennas might be re-purposed for Wi-Fi.

Long range (100s km) will need significant antennas and modification of the routers' modulation (from CSMA/CD to TDMA)

An advantage of a router is it has TCP/IP and TLS (megaAVR won't need to do those)

A disadvantage of extended Wi-Fi is infrastructure maintenance whereas that is done by a PSTN operator; the weather events are stronger with altitude (wind, rain, snow, ice, lightning)

A 2G, 3G, or LTE cellular modem can be added to the router (via USB or a plug-in to some routers)

 


WNDW - Wireless Network in Developing World

http://wndw.net/index.html

...

(picture roll)

Rooftop node. In the aftermath of Superstorm Sandy

The aftermath of Hurricane Sandy is an example of the effect of severe weather in the developed world and how WNDW can be effective for such (WNDW is adhoc)

 

Though HSMM-MESH(tm) is not WNDW, the following video series does illustrate how to operate a portable data link :

YouTube

AustinHams

Videos

https://www.youtube.com/user/AustinHams/videos

Start at :

HSMM MESH in Big bend 2013

and go later in time (left and up)

Broadband-Hamnet

http://www.hsmm-mesh.org/ 

Welcome to Broadband-Hamnet™, Ham radio's broadband network without wires

Ubiquiti support now available !

We win awards! See the AWARDS Page

View the NEWS for the latest information

What to do with Mesh? Visit APPLICATIONS

Get On the Map !

SIGN UP to be a local Broadband-Hamnet™ Elmer

Find us on Facebook!

 

Edit : ranges

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Apr 6, 2017 - 07:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is an old POTS Thread, with quite a few associated links:

 

and here:

 

and here:

 

And of course this rather dated web site all about POTS interfacing:

 

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

p1heidary wrote:
By infrastructure I mean,they have bought landlines and sim carts.

This is early warning project and security issues is important, so they told me I should establish tcp/ip connection between server and clients for authentication.

You know sending just a message is not my goal.

Hey p1heidary, your question makes absolutely no sense at all. Your posts are mind boggling confusing. A land line is a direct electrical connection to a telephone switching station. Other than connecting to an Internet Service Provider via a DSL modem I have not heard of anyone using a land line to connect to anything. A sim card is for wireless cell phone activation. Sim cards and land lines do not work together. Establishing a tcp/ip connection over a land line with a sim card says to me you are being asked to do something by people who are absolutely clueless about what is possible and the project can only fail.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

p1heidary in post #1 wrote:

The only possibility is using landline.

 

p1heidary in post #12 wrote:

... they have bought some landlines and sim carts and I want to use them for my project.

 

When you used the term "landline", people thought you meant "Dial-up" phone lines - is that what you actually meant?

 

"Landline" can also refer to leased line from the phone company or an actual wire cable from point A to point B.

 

Please define exactly what you mean by "landline".

Is it provided by the local phone company or someone else?

What requirements are associated with the "landline"?  What signal levels or interface specifications?

What country or countries are the landlines in?

 

Please define "sim carts"?  Who provides them?

 

 

 

Last Edited: Fri. Apr 7, 2017 - 02:34 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
 Establishing a tcp/ip connection over a land line with a sim card says to me
 

I think I did not explain the project clearly.

Clients have three distinct connection to server. 1)Landline 2)Sim Carts(provided by MTN) 3)some local network. 

First item is available in all locations but second and third item does not. So landline is the most important one.

When you used the term "landline", people thought you meant "Dial-up" phone lines - is that what you actually meant?

yes, off course by land line I mean the telephone line which we use everyday.

Is it provided by the local phone company or someone else?

No they are not local, They are just like any other ordinary landline.

What country or countries are the landlines in?

Both server and clients and landlines ans sim cards are located  inside Iran.

Please define "sim carts"?  Who provides them?

Company has bought them form MTN operator. They are just like any other sim carts. I can make call with it and ....

I designed a chip which has enc28j60 and sim 800 module, but currently I am working on integrating PSTN or POST modem to the board.

The remaining part of my project is just connecting micro to pc with PSTN modem via ppp.

I know how to connect two PCs with dial up connection but the confusing part is connecting a my board to PC.

 

Could you guide me about establishing a ppp connection between mentioned micro with PSTN modem and PC?

Last Edited: Fri. Apr 7, 2017 - 04:57 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"sim cart" does not make sense to us. There is a "sim card" which goes into a cell phone, but this has nothing to do with a PSTN connection.

Google lwip ppp over serial

There's a number of hits that should be useful for you.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign wrote:
It has already been made very clear that you should NOT try to do telephone line connections and control yourself due to regulations

No, that is not the only reason!

 

The underlying reason is that designing a SLIC (Subscriber Line Interface Circuit) is a specialist area of analogue design - you don't just need to be a good analogue designer, you also need the specialist experience with phone line interfaces.

 

As already noted, phone lines have high voltages. While unlikely to be fatal, they will give you a jolt - and will certainly fry any electronics which is not fully & properly designed to cope.

 

The OP has indicated that reliability is important; so that will require not just any line interface - but a good line interface.

 

The OP has also stated that these will be in remote locations. That will mean that they're at the ends of long lines, where performance will be marginal;  so, again, a quick hack is unlikely to be reliable - a good line interface is required.

 

Based on your location I wonder if there is any regulation, or interface requirements at all to begin with

See above - even if there isn't regulatory enforcement, performance remains the issue!

 

Also remember that a dial-up line is a direct connection to the exchange - so, if a badly designed device causes any problem or interference at the exchange, they will know exactly who did it!

 

So take a look at Maxim and SiLabs as recommended.

No, really - don't!

 

Get a known, proven module!!

 

Someguy22 wrote:
A land line is a direct electrical connection to a telephone switching station.

Correct

 

Other than connecting to an Internet Service Provider via a DSL modem I have not heard of anyone using a land line to connect to anything.

Nonsense!

 

This is exactly what modems were invented for!

 

Have you never used a Fax machine?

 

Of course it is possible to create an end-to-end dial-up connection between two modems over landlines.

 

A sim card is for wireless cell phone activation. Sim cards and land lines do not work together.

The OP has made clear that he has 3 distinct communication paths:

 

  1. Landlines - using dial-up modems
  2. GSM/GPRS - which would require SIM cards
  3. "some local network" - which remains unclear, but I guess he means a LAN.

 

Establishing a tcp/ip connection over a land line with a sim card

He isn't saying that.

 

people who are absolutely clueless about what is possible and the project can only fail.

I don't know about absolutely clueless, but there does seem to be a significant lack of understanding here.

Looks like some more experienced guidance/consultancy is needed...

 

 

p1heidary wrote:
I think I did not explain the project clearly.

Indeed!

 

Clients have three distinct connection to server. 1)Landline 2)Sim Carts(provided by MTN) 3)some local network. 

Note that it's SIM Card - not SIM Cart

 

It would be more accurate to say that the communication is via GSM/GPRS Cellular Network.

As has been mentioned, the SIM Card is just your authentication to use the network - it's not a "connection" or a communication path.

 

They are just like any other sim cards. I can make call with it and ....

It is generally not a good idea to use "normal" SIM cards for M2M applications; eg, do you actually need voice calls?

Far better to use a service (ie, get a SIM) that's specifically designed and supported for M2M.

 

I designed a chip ...

You mean a board, surely??

 

PSTN or POST modem to the board.

POTS (Plain Old Telephone Service/System) - not "POST"

 

 

 

I know how to connect two PCs with dial up connection but the confusing part is connecting a my board to PC.

How is it confusing? It is exactly the same!!

 

As already noted, google "PPP" and "SLIP" - and, for a TCP/IP stack, try LwIP or, possibly, uIP

 

https://en.wikipedia.org/wiki/Se...

https://en.wikipedia.org/wiki/Po...

https://savannah.nongnu.org/proj...

http://dunkels.com/adam/software...

 

But, if you're dialling-in directly to your server, why do you need TCP/IP ?

 

 

 

 

EDIT: typos

 

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Fri. Apr 7, 2017 - 09:16 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:
One way to get Internet access into desolate areas is by extending the range of off-the-shelf Wi-Fi routers.

No, i don't think that's likely to be a good idea.

 

But there certainly are point-to-point wireless (radio, optical) links commercially available specifically for this type of application.

 

LoRA might be worth a look ... ?

 

The antenna is, of course, of utmost importance!

 

Before dismissing the cellular link, you should check whether a high-gain antenna will get you connected; eg,

 

https://www.siretta.co.uk/produc...

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Power line communication might be an option https://en.wikipedia.org/wiki/Po...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
jgmdesign wrote: It has already been made very clear that you should NOT try to do telephone line connections and control yourself due to regulations No, that is not the only reason!

Where did I say its the ONLY regulation? 

 

awneil wrote:
So take a look at Maxim and SiLabs as recommended. No, really - don't!

Why not?  If the OP wants to roll their own unit shouldn't they consult vendor documentation on the parts?  Of course the OP should not build this thing themselves, but if they insist......................

 

awneil wrote:
Establishing a tcp/ip connection over a land line with a sim card He isn't saying that.

Really?  In Post #12

 

p1heidary wrote:
Also is it possible to establish tcp/ip communication with RJModem and at commands?

 

Thats what I thought the OP wanted to do.

 

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The RJModem is the landline modem - so no SIM required for that.

 

The SIM800 is a GSM/GPRS module - so that one does need a SIM.

 

The ENC28j60 is an Ethernet MAC+PHY - so no SIM required for that.

 

I wrote:
if you're dialling-in directly to your server, why do you need TCP/IP ?

I guess you'll need it anyhow for the Ethernet option - so there's no benefit in avoiding it for the dial-up option?

 

dak664 wrote:
Power line communication might be an option

That only works if you have access to both ends of the power line - which is highly unlikely to be the case in situation the OP describes...

 

EDIT: correct spelling of "GSM"

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Mon. Apr 10, 2017 - 06:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanx from all friends. The discussion gave me a lot of solutions.

 

Finally, As others said I decided to use a dial up model with serial port. But the problem is nowadays such modems are hard to find. Maybe they are scarce in my country (Iran). Most of modems that are available in market are external usb modem. like this one.

As you know guys avr has spi, i2c, usart and serial ports but not usb port. I was wondering whether I can use this modem in my board.

How should I connect this modem to micro? to which port? 

Can I use at commands with this modem, just like I used them with sim800?

 

Thank you for all your guidance.

Last Edited: Mon. Apr 10, 2017 - 04:37 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

p1heidary wrote:
Most of modems that are available in market are external usb modem

Yes - RS232 is pretty much dead as a consumer PC interface.

 

like this one

You need to check very carefully whether that is actually a real modem.

 

Quite possibly, it is just a line interface - and all the real modem/DSP work is done by Windows software on the PC.

 

 

As you know guys avr has spi, i2c, usart and serial ports but not usb port. I was wondering whether I can use this modem in my board.

At the very least, you would have to add an external USB host. And then you'd have to add the USB driver.

This might not be documented - so you might have to reverse-engineer it all.

 

As noted above, you might also have to write all the modem DSP stuff!!

 

How should I connect this modem to micro? to which port? 

That would depend entirely upon your chosen USB host.

 

Can I use at commands with this modem, just like I used them with sim800?

Who knows??

It might be proprietary.

Again, this is unlikely to be documented - you'd have to work it out for yourself.

These are not designed, sold or supported for embedded applications.

 

Seriously, why would you not just use the RJModem (or similar) - it is specifically designed, documented and supported for exactly they type of application you are doing!

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Mon. Apr 10, 2017 - 04:51 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
RJModem (or similar)

As I have not done this for well over decade, I wasn't sure what's currently available.

 

So I put "embedded modem" into google, and one of the first hits was this:

 

http://www.radi.com/

 

They seem to have a range of suitable options.

 

and other suppliers are still available ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Mon. Apr 10, 2017 - 04:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

p1heidary wrote:
Maybe they are scarce in my country (Iran).
PSTN modems are scarce here too.

p1heidary wrote:
How should I connect this modem to micro?
To either a USB megaAVR with a USB host controller (AT90USB1287, AT90USB647) or add a USB host controller to an AVR.

 


http://www.microchip.com/wwwproducts/en/at90usb1287

https://www.arduino.cc/en/Main/ArduinoUSBHostShield

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I wrote:
Quite possibly, it is just a line interface - and all the real modem/DSP work is done by Windows software on the PC.

Known as a "Winmodem" or "soft modem":

 

https://en.wikipedia.org/wiki/So...

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:
either a USB megaAVR with a USB host controller (AT90USB1287, AT90USB647) or add a USB host controller to an AVR.

As noted, all that gives you is the USB Host function.

 

As noted, there is no guarantee the you will be able to get the necessary interface details to actually use the thing - and little or no likelihood that you'll get any actual support!

 

And that's even if it is a real modem - if it's a soft modem, it's useless to you.

 

Again, get a proper embedded module that's specifically designed, documented and supported for this type of application!

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

The "TinyModem" seem ideal for the OP's needs!

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

p1heidary wrote:
Most of modems that are available in market are external usb modem. like this one.
That's similar to what Dell offers here.

The PSTN is controlled within the modem; the modem is compatible with Linux, macOS, and Windows; firmware is mentioned for it so would need a PC or Mac to update the modem's firmware.

Likely USB CDC ACM.

LUFA would fit; could use LUFA low level and PC USB low level to diagnose USB CDC ACM problems.

 


http://www.dell.com/en-us/shop/usr5637-56k-usb-faxmodem/apd/a1631677/networking

http://www.usr.com/products/56k-dialup-modem/usr5637/

http://support.usr.com/support/product-template.asp?prod=5637

http://www.fourwalledcubicle.com/files/LUFA/Doc/151115/html/group___group___u_s_b_class_c_d_c_host.html

via

http://www.fourwalledcubicle.com/LUFA.php

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How many data each time?

 

Perhaps just 300 baud modem like in #3 can do the job.

 

About 15 years ago I made a modem using the sound side of a GSM like signal (a satellite connection not as good as a GSM but same kind of sound storing), and I could get about 50 baud out of that with a 8515.

 

add:

But you need to have a way of dialling !

Last Edited: Mon. Apr 10, 2017 - 05:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:
could use LUFA low level and PC USB low level to diagnose USB CDC ACM problems

But why not just get a modem/module specifically designed for this type of application - where all the necessary protocols, commands, etc, will be properly documented and supported.

 

It's one thing trying to hack consumer gadgets for a one-off hobby project - but that is no way to approach a proper, commercial M2M roll-out ...

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And you can still get a good old modem :

 

https://www.alibaba.com/product-...

 

or this

https://www.alibaba.com/product-...

 

I know that you have to buy 100 but at 6$ each it could work (I guess that size don't matter).

Last Edited: Mon. Apr 10, 2017 - 06:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:
The "TinyModem" seem ideal for the OP's needs!
Cool!

RADICOM: TinyModem™, the world's smallest modem with phone jack

http://www.radi.com/modular51.htm

TinyModem(tm)

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparrow2 wrote:
Perhaps just 300 baud modem

When you're only sending small amounts of data, a slow link can actually be quicker than a fast one!

 

That's because the faster protocols take much longer to "train" to the line - so a slow modem can send all the data in the time it takes a fast one just to "train" !

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In many places it seems that the telephone lines are disappearing, around here we are about the get the NBN (fiber and cable) and a year after that the copper network will be decommissioned and all phone lines will go through the Internet via adaptors.

 

Don't know how this will affect modems type systems, we are being told to move alarm dialers etc. to wireless types.
 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

but "normal" modems use 1200 baud to train with.

 

But it all depends of what OP need, if it's just 20 numbers each 1/2 hour, then who cares about the speed, the dial time would be longer. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

we are being told to move alarm dialers etc. to wireless types

That don't sound safe!

 

I have a 4G modem for my internet, but keep my 2Mbit landline, just to be safe.  

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

but keep my 2Mbit landline,

But we don't get the choice, 12 months after the NBN is connected the landlines are gone from the area, ok they may still be underground rotting away but not functional.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

All the more reason to avoid a consumer device!

 

Note that nothing in this thread has anything specifically to do with AVR - so it should be moved to "General Electronics" ...

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
As noted, all that gives you is the USB Host function.

Could you explain more about "USB Host function"?

Last Edited: Tue. Apr 11, 2017 - 09:22 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

You need a usb host to talk to a usb device. Also you need specific drivers to talk to the modem. These drivers may not be available for anything but a PC.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

p1heidary wrote:
Could you explain more about "USB Host function"?

This is basic stuff that is widely covered - see any basic tutorial or book on USB.

 

Kartman wrote:
You need a usb host to talk to a usb device

Indeed: The modem would be a USB Device - so you would have to implement a USB Host to talk to it.

 

Also you need specific drivers to talk to the modem. These drivers may not be available for anything but a PC.

Indeed.

 

Seriously, that would be a significant overhead that would give you no benefit over using a simple, UART-connected modem - such as the RADICOM: TinyModem or Multitech RJModem.

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...