Shop OBEX P1 Docs P2 Docs Learn Events
Transmitting serial(RS-232) over a cell phone audio channel? — Parallax Forums

Transmitting serial(RS-232) over a cell phone audio channel?

RavenkallenRavenkallen Posts: 1,057
edited 2010-08-25 08:27 in General Discussion
I have figured out how to transmit voice/ key presses into a sound that is transmitted over a cellphone and On the the other end is another cellphone that( through a hands free device) uses a Parallax sound impact sensor to turn these noises into a digital signal. It works well, but it is slow. The sound impact sensor takes 50 milliseconds to reset so that it can listen to a new sound.....so question is, Can one(with minimal hardware) transmit Serial(RS-232) over a phone/ Cellphone audio line line. Even a baud rate as low as 1000 bits per second would be acceptable. Would you need some sort of signal booster/ op amp? Or maybe i am barking up the wrong tree? It should work in theory, because the bps needed for the most basic voice communication is 800 bps....

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-19 13:20
    See this thread: http://forums.parallax.com/showthread.php?t=110918

    Also, in the OBEX: http://obex.parallax.com/objects/421/

    I don't know if this has been used with a cell phone, but I see no reason offhand that it wouldn't work.

    -Phil
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2010-08-19 16:40
    considering acoutical modems (( YIKES !!) work-ed OK I don't see a reason that it would not work BUT here is the catch . the encoding for CDMA ect
    does some weaird compression so if your trying to sent data over a Cell Phone LINE you may run in to a issue with harmonics and other nasty stuff..

    But just useing the DA /AD in the phone to act as a" port" I think should work fine .

    Peter KG6LSE
  • velociostrichvelociostrich Posts: 40
    edited 2010-08-19 19:12
    I'm not sure about this, but aren't there laws governing the use of cell phones for such purposes? In other words, that you can't do something like this? I recall reading about a walkie-talkie modification (which falls under "family radio service" laws and not cell phones, but still) that the individual later learned was not allowed by FCC rules, and so stopped using them: http://takethingsapart.blogspot.com/2010/07/note-before-constructing-device-such-as.html
  • BeanBean Posts: 8,129
    edited 2010-08-19 19:27
    I don't know if this is true or not, but I heard that only english is allowed on a CB radio.
    But that the rule is never enforced.

    Data transmision is probably not allowed because you are hogging the channel for long periods of time, not because you are not transmitting voice.

    Bean
  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-08-20 08:29
    Why would data transmission be illegal on a cellphone. I mean cell phone's can access the Internet. Isn't that data transmission?...UGHH blasted FCC, haha..

    @Phil... So the schematic at the bottom of the post would work for turning a audio line into a usable digital signal? I guess i should worry about the hardware first. Your schematic shows only a handful of components, probably stuff i have in my lab. A cell phone's audio might be a little different, though. I am going to need another hands free headset to. Thanks for the help guys. I just need something a little faster than my current setup. It can only transmit a byte or two a second and that is just to slow. I want to control my robot from extreme long distances, but i wanted it to be able to accept commands fast, plus maybe have some data feedback... Of course that would need a full duplex communication method then.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2010-08-20 10:38
    The real trick is getting that 'outgoing audio' faithfully into the telephone.
    Are you going to hardwire this to the audio inputs (plug it into the phone's auxiliary jack for earphone and mike) or are you going to drive a speaker that is held to the mike?

    It might help to have an oscilloscope observe exactly what is going on. And impedance mismatch may frustrate you. Also, will the phone tolerate a 3.3volt input? It may be expecting something completely different on it's mike input.

    You might test a working earphone and mike with a scope to see what they are capable of.
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2010-08-20 12:19
    True related story:

    I tried this in high school by interfacing an Atari 800 with a CB radio base station. The idea was to have a Tandy-100 portable computer with a CB on the other side and transmit homework from home to school. (I was going to use touch tone sounds and a touch tone decoder IC).

    Somehow, the circuit was overdriven and the test sounds ("flight of the bumblebee") drowned out the CB channel for miles and within a couple of miles - drowned out most of the 40 channel band.

    I was paranoid about FCC vans appearing in the neighborhood after that and abandoned the project.
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-08-20 12:19
    The nice thing about using cell phones is that
    usually calls from mobile to mobile are free so
    there would be little cost. I'd use a simple tone
    scheme based on the DTMF signals. You might
    be able to alter the programming of the phones
    to let the ARM chip in the phone handle this. Some
    phones have a data port that you could use to
    connect to your external device.

    You might find satellite communications will do the
    trick for you. There are two systems offering commercial
    access worldwide. You can control a device anywhere
    on the planet. ORBCOMM is one http://www.digi.com/products/wireless/satellite/
    I forget the name of the other one but it uses a low
    orbit fleet of satellites they bought from a sat phone
    business that went bankrupt. I think these providers
    are a bit pricey though so it may not be what you want.

    I have used a mil sat system for data exchange and it
    was very easy to use. Probably the commercial systems
    would be just as easy to use.

    You could use FltSatCom satellite communications for
    free if you are a risk taker ;-) (I'm kidding DON'T do this)
    http://www.google.com/search?hl=en&q=fltsatcom+bootleg&aq=0&aqi=m1&aql=&oq=fleetsatcom+bootleg&gs_rfai=
  • Spiral_72Spiral_72 Posts: 791
    edited 2010-08-20 12:23
    A weird idea.... not that there's anything wrong with that :)

    If you have a scope and some sort of a frequency generator (The BS would work) I think I'd try feeding audio into one and read the output of the other on a scope. I don't know, but I'd be willing to bet that it cuts off at 16kHz or so..... If it DOES, your absolute maximum transfer rate would be less than half that frequency.

    Cells are used to transmit voice.... maybe 100Hz to 4kHz? and audible range, maybe 12kHz? (yes most people can hear past that), so I wonder if it's hardware, maybe software limited.

    If you have the equipment for the test, it might save you a lot of time to know what your dealing with.
  • kwinnkwinn Posts: 8,697
    edited 2010-08-20 14:36
    The cell phones digitize the voice signal so bandwidth is limited by software. A low speed modem (300 - 1200 bps) should work. An alternative might be to use text messaging since that is what the modem is being used for.
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2010-08-20 20:24
    I'm not sure about this, but aren't there laws governing the use of cell phones for such purposes? In other words, that you can't do something like this? I recall reading about a walkie-talkie modification (which falls under "family radio service" laws and not cell phones, but still) that the individual later learned was not allowed by FCC rules, and so stopped using them: http://takethingsapart.blogspot.com/2010/07/note-before-constructing-device-such-as.html

    I doubt there are any laws on cell phone voice use with data . after all most modern phones are just digital data .

    BUT your provider might not like you useing the " Unlimited plan " for 24/7 use .

    as for FRS HT interfaceing . Just don't ! I was a part of a ARDF T-hunt team In LA . who was busy at times hunting down naughty radios of all kinds..
    The FCC takes Interferince VERY seriousy .
    Mind as long as you keep in your channel and I dont see a reason why you would be hunted down .


    Here is the catch . Digital data OOK ( on off keying) are super rich in harmonics . just the thng to splatter a radio . so unless you find a way to run at Super low baud rates or you use a MoDem you will most likely make a bunch of hash .
    If you do want to play with radios . I would firmly suggest a Spectrum anlyzer. this way you will know exactly what you are putting on the air .


    there is a loop hole for FRS data . Look at the GPS FRS Rhino combo radios . they can send there plots via FRS in a APRS fashon of sorts .
  • edited 2010-08-20 20:56
    I'm not sure about this, but aren't there laws governing the use of cell phones for such purposes? In other words, that you can't do something like this? I recall reading about a walkie-talkie modification (which falls under "family radio service" laws and not cell phones, but still) that the individual later learned was not allowed by FCC rules, and so stopped using them: http://takethingsapart.blogspot.com/2010/07/note-before-constructing-device-such-as.html

    I don't know the correct answer but then I seem to think if that was the case then tethering would be illegal but people do it unless it is spelled out in the cell phone contract.

    http://en.wikipedia.org/wiki/Tethering
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2010-08-20 20:59
    You could use FltSatCom satellite communications for
    free if you are a risk taker ;-) (I'm kidding DON'T do this)http://www.google.com/search?hl=en&q=fltsatcom+bootleg&aq=0&aqi=m1&aql=&oq=fleetsatcom+bootleg&gs_rfai=

    Holly, be sure to say hi to the nice visitors from Mossad for us. BTW, we don't know you. :)

    For informational purposes only: http://stackoverflow.com/questions/2129719/cell-phone-hacking-as-in-engineering-hack
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2010-08-21 12:00
    Teathering is a Phone company no no .
    It in its self is not breaking any Direct Fed laws.
  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-08-21 20:15
    Yeah, i would be using a headset for the audio out line to. I don't want to do ANYTHING that is illegal(I wouldn't fit in very well in prison, haha). I just need something simple. Something easy to figure out. I guess my first question should have been; How do you covert a audio signal to a ttl/cmos compatible output. I saw elsewhere that you could use a comparator to function as a signal converter. I have never even used a comparator, but i think i have a couple floating around in my lab. It is kinda similar to the 555, right?

    Thank you everybody for the help....I am not sure if i should continue based upon the legality issues. It is just that, it is so cool to control things around the world with just your cellphone...*sigh*
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2010-08-21 23:35
    I don't want to do ANYTHING that is illegal(I wouldn't fit in very well in prison, haha).....I am not sure if i should continue based upon the legality issues.


    Raven its not Illegal to use your own cell you are paying for .
    As long as you dont crack teh OS to give you free calls or mod the phone's Hardware to violate teh FCC approval your fine from a FCC big black van standpoint

    and the only thing ATT verizon or what not can gripe about is eating up there plan . . BUT they are not allowd to listion with out a court order .
    simple . they dont care whats going over your phone audio . it could be bag pipe music for all they care .


    As for interfaceing

    Most Cell headsets are FET mic based so they are Hi Ω inputs
    make a voltage devider to take the out put of serial ( 100Ω????) and pad it to 1K or so for the FET input . You can tinker with this by useing a 2k pot . run the wiper to the serial port OUT pin and the lower point to ground with a 100Ω Resistor run the upper point to a 10Uf cap and then to the MIC in . ( you NEED the cap as Cell phones Run that FET mic's power off the phone , There is DC there .
    Side note Some Cell phones use auto detect to sense the kind of mic/headset/headphones you use by pulsing each channel ( think of the phone Ohming out the head phones ) .
    You may need to fool the cell in to thinking it has a Headset attched.
    Mind Only fancy phones have this .( may Palm has it )
    I doubt you puting a smart phone for this :) so it may not apply .

    NOW for the RX side

    A comparator sounds ok once you put some sigs trugh it in lab you will see where there is distortion and Just start to tinker .

    one thing to look out for is how the output of the cell is ran . If its ran trugh a cap you may have issues unless you load it and use a buffer . with a string of 1's you may very well RC time charge the audio output cap and it could very easly tweak your output .
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-08-22 06:52
    Re "How do you covert a audio signal to a ttl/cmos compatible output."

    See post #2.

    This is one really cool thing about the propeller. Consider it an audio to ttl chip. That is, you feed a noisy audio signal into a pin, and you can get a nice clean ttl signal out. Behind the scenes is that fascinating bell modem code.

    I've played around with decoding audio, with both analog and digital circuitry. Nothing beats DSP software for the ability to tweak things quickly. And that bell modem code is all written.

    Case in point - take a 400Hz square wave and feed it into a cheapie handheld CB radio and transmit to its friend. Look at the output on a CRO and it is nothing like a square wave. This is because the third and fifth harmonics have had their phases changed. (probably by some low pass filtering in the radio). The ear is insensitive to phase changes for harmonics, but if you are trying to digitally process that square wave, it is very hard. Add a bit of noise, and it is all but impossible.

    The background to that bell modem code has some very detailed noise analyses. It really is a beautiful solution to the problem of transmitting data over noisy audio links.
  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-08-22 10:22
    It sounds like this idea is harder than i thought it was going to be... I guess my first move will be to experiment more with filters/ comparators. So for Phil's object, the hardware that he uses is just a filter circuit of some sort, right? Maybe i should try converting another type of audio signal( Perhaps, from a MP3 player or laptop speakers) to a digital signal... I do not want to give up, but i am in way over my head. I am not very good at analog stuff....
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2010-08-25 08:27
    I suspect that Phil's circuit would work just fine...........if you fully understand it.

    Phil is one of the more diligent creative people on the Forums.
Sign In or Register to comment.