Connect with us

Sending .txt files through voice cell phone network.

Discussion in 'General Electronics Discussion' started by ishbandori, Nov 19, 2013.

Scroll to continue with content
  1. ishbandori

    ishbandori

    6
    0
    Nov 19, 2013
    Hello, I am quite new to electrical engineering and I would like to know whether or not it would be possible to take out a speaker from a mobile phone handset and replace it with an arduino, or a raspberry pie or whatever. And then have that set up send stuff like a .txt file through the cell phone network through to a similar set up in another location?

    I think it would be interesting to do, also if this was possible would it be able to work for landline networks or Satellite phone networks?

    Also I've tried searching for this on the internet but I don't know the first thing to search for in regards to this.
     
  2. OLIVE2222

    OLIVE2222

    690
    25
    Oct 2, 2011
    Hi,

    Yes it' s possible to send text via a cell phone but not using the handset connection.
    As you have Arduino in mind you can use it with a GSM/GPRS shield and send you text via the shield serial port UART the through the air via a SMS or TCPIP.

    regards,
    Olivier
     
  3. batkin

    batkin

    9
    0
    Jul 23, 2013
    It wouldn't be useful compared to today's tech but for fun you could reinvent the modem and assign different frequency tones for different byte values, send them down a standard phone connection and read them out the other side. Start with a slow transmission rate and put in a check digit every X bytes.
     
  4. ishbandori

    ishbandori

    6
    0
    Nov 19, 2013
    Thanks for the answers guys, one other question you might be able to help with. Would you be able to implement either methods using a satellite phone as well? Or would something more complex arise due to the nature of the network? I know it would be too expensive to viably send data through a satellite phone but would the connection principles be the same?
     
  5. Solidus

    Solidus

    349
    4
    Jun 19, 2011
    It wouldn't be much harder to desolder the individual keys which would allow you full access to the phone, albeit in a non-graphical way. It would work for both setups (satellite and cell).

    You would just need to write code that would allow you to step through a buffer and push the keys the respective number of times depending on what character is present.
     
  6. ishbandori

    ishbandori

    6
    0
    Nov 19, 2013
    Thanks Solidus,

    That's a good idea, but what I really want to do is be able to send it via the speaker. So basically unsolder the speaker and send electrical pulses through that link, from there I would like another setup to receive those pulses and decode them with some written software. Do you think through the speaker could work as well?
     
  7. Solidus

    Solidus

    349
    4
    Jun 19, 2011
    You could if you have a phone that supports external software. Android is the only easy candidate I think about this, because its SDK is fully open - that is, there aren't any restrictions.

    On the iPhone there are restrictions as to what apps in the preprogrammed hardware you can access on user apps, and uploading unsigned (that is, not published to the App Store) apps is MUCH more difficult and requires you paying $100/yr. for a dev account (trust me, I'm an app developer for iOS, it thwarts me even).

    Android is much more open. You would need a program loaded on the phone to listen to the microphone line and translate it to characters in a string.

    The easiest way conceptually is to translate the standard Unicode characters into a range of analog amplitudes, because the microphone undergoes ADC (analog to digital conversion) and could distinguish. In an Arduino, you would do this with a PWM statement, like so:

    Code:
    // Unicode characters have a value from 0-255 so they fit in one byte of space. This is used to drive the PWM signal, and can be distinguished on the other end:
    
    char buf[ ] = "Some sample text to send"; 
    
    // (25 characters - 24 letters plus a [I]null terminator[/I])
    
    for (int i = 0; i < 24; i++)
    {
        analogWrite ( transmitPin, char[ i ] );
        // delay for processing on the phone side:
        delay(10);
    }
    
    That code would, when included in a main loop or such, step through the string array (called 'but') incrementally and use the value of that character at the position to form an analog signal for transmission.

    It would have all 24 characters transmitted in about a quarter second.

    This has two possible (major) shortcomings:

    1. If your cable length is too long from controller to phone, the resistance of the wire will cause degradation of the signal amplitude. Because the letter depends on what amplitude is on the line, this will cause errors.

    2. Two letters that are very close together in terms of Unicode value will generate very close PWM signals that may be difficult to distinguish. I want to say this is a null issue, because phones generally have fast, high-resolution PWMs for audio, but hey, knowing all the issues makes one a better builder.

    The other method - buff a UART transmit signal (serial) over the microphone line. It wouldn't be hard to set up a serial port class in the Java Android API to, with a little bit of fiddling, declare the microphone connection as a low-speed serial linkup.

    If run at moderate baud rates (9,600 or lower) signal integrity wouldn't be an issue, and because it's a digital method of transmission, cable length won't hurt the circuit (within reason).

    One could use the USB for the phone as a serial line, this is a well-documented feature, and would be easier. But, I get the feeling that you want to experiment and have a more 'custom' or "hands-on" design, which I sympathize with - I do the same many times.

    If you want more information, let me know - again, I'm a phone software developer, so I can help with the code and software aspects of this, I can (and am willing) to help.
     
  8. OLIVE2222

    OLIVE2222

    690
    25
    Oct 2, 2011
    Hi,

    On cell phone the audio is processed via a voice codec to optimize the bandwidth. So PWM or tones may not pass correctly, to be experimented.

    Olivier
     
  9. Solidus

    Solidus

    349
    4
    Jun 19, 2011
    Over phone calls, and in the passband of human voice and hearing, most definitely. If the PWM frequency is within that range, it should be fine - most cell phones I'd like to say probably have 10 to 12-bit or higher AD converters, which will give plenty of headroom on an analog signal.

    For example, the CDMA EVRC codec operates on 16-bit sampling. This (ideally) should be enough to give each PWM signal enough of a bandgap to pass correctly, even after optimization for vocal range.

    Either way, I'd opt for UART transmission. It's probably a bit harder to code for, but it leaves the logistics of transmission as a null issue.
     
  10. OLIVE2222

    OLIVE2222

    690
    25
    Oct 2, 2011
    I remember an help-desk complain at a local cell phone company about two granny they can't transmit their tiny dogs barking to each other, the music also is not always well transmitted. It's more the algorithm optimized for the speech than the sampling rate or the frequency band who can be a problem to me. But indeed the UART transmission is from far the better solution.

    regards,
    Olivier
     
  11. davenn

    davenn Moderator

    13,808
    1,943
    Sep 5, 2009
    you seem to be stuck on this incorrect idea

    you do realise that a speaker is audio OUT, NOT Audio in.
    You cannot disconnect the speaker and pump a signal into those wires
    Its going to be going against the audio coming from the audio amplifier

    Dave
     
  12. ishbandori

    ishbandori

    6
    0
    Nov 19, 2013
    Sorry, I meant to say microphone.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-