I write a project with C# and i want to dial by AT COMMAND to other but my project don't work correctly because it make connection correctly and i hear sound of other side but that not hear my sound
my modem is voice
and i use ATDT0941221225425;
Your question is a little confusing, but what it seems like you're saying is that your modem does dial and connect, but you don't hear the touch tones?
If this is correct, you may need to add some more commands to your command string.
Try sending ATM1L3 to your modem before you send the DT command. This should set the modem monitor speaker to be on until the carrier signal is detected (M1) and be at maximum loudness (L3).
Unfortunately, I don't have a modem at hand to test this and am primarily working from 15+ year old knowledge.
There's a reference of Hayes modem commands at http://seriss.com/people/erco/unixtools/hayes.html, and the Wikipedia article on the Hayes Command set at http://en.wikipedia.org/wiki/Hayes_command_set also has a list.
Related
I've been trying to figure out how to turn my Raspberry Pi into a USB to Bluetooth serial adapter. I want to be able to send data over Bluetooth to the Pi which has a USB thermal printer registered at /dev/usb/lp0.
Using only standard command line apps such as hciconfig, hcitool, rfcomm, and sdptool I have been able to see the Pi as visible, and pair to it from an Android tablet using a Bluetooth SPP app on the Store. However, the tablet disconnects immediately, and no data is sent. rfcomm listen /dev/rfcomm0 1 also waits for a connection forever.
I think I'm able to achieve what I need without custom code, using solely standard command line apps, but I'm not entirely sure. socat will likely be of use to finally connect the sockets.
Figures that I'd get it right after posting. To anyone else looking to do something similar:
Pair with bluez-simple-agent
Create your serial port channel with sdptool add --channel=x sp
Listen for a connection on that channel with sudo rfcomm listen /dev/rfcomm0 x
Cross the streams with socat /dev/rfcomm0 /dev/usb/lp0
Beautiful. It's all so simple now.
I want to read text message using Matlab as hyperterminal using AT commands and bluetooth as connection medium since I am new in it could somebody suggest that how can I do it.
I am using nokia c2-03 for sending the message but if you suggest any other phone i can that too
I connected my phone through USB, saw the Port name then connected it through matlab using
s=serial('COM1');
and then opened the port
fopen(s)
now I don't know what to do I mean now how can send at command to control the device.
PS I am sure that my device supports serial communication.
I am trying to detect if my iPhone is in the same network as my Raspberry Pi. I would like to execute a script when I am at home and my iPhone's presence is registered in my LAN.
It seems that when the phone is in standby not even the iphone-sync port (6207/tcp) is found. "/usr/bin/nmap -n -sT -p62078 [my phone's local IP]" shows no host. I wonder what else I could scan for. Obviously the phone is online and ready to accept facetime calls (data via 3G is deactivated). Could I accomplish something with avahi which I am using on my Raspberry Pi, or are there other ways.
I've just spent a week beating on this problem so I can refrain from sending SMS home alarms to my wife when she's at work.
Pinging won't work because the iPhone won't respond to ICMP when asleep. Reading the ARP cache won't work because a sleeping iPhone will come and go (check it every 30 seconds for a few minutes).
The only way I have found to 'reliably' determine when my two iPhones are on my local (home) network is to use the PCAP dotnet library to look for any packets originating from either of the phones' MAC addresses. For example, if you run Wireshark with the capture filter
ether src <iphone-mac-address>
you will see a surprising amount of network discovery/announcement traffic from the phone. It still has quiescent states, but so far the longest interval I have seen between captured packets is around 10 minutes. You would have to wait until you have not heard from the phone for some interval (I use 15 minutes) before declaring it not-home.
With this technique you will find a phone quickly when it rejoins the home network, assuming your phone is configured for DHCP. I also use port mirroring on my main Ethernet switch to include traffic from my wireless access points.
I don't have a Raspberry Pi solution for this, because my linux expertise is very limited, but someone else may be able to help you along those lines. I have a Windows Service using the PCAP library and so far it works reliably, with the limitation of waiting 15 minutes before deciding an iPhone has left the network.
* update 2-3-2018 *
I have this detection algorithm down to about 5 minutes, using a combination of ping/arp messages directed to each phone, about once per minute. Seems to work great.
You can find a list of devices on your network by investigating your arp cache.
arp -a
Simply write a bash script to run arp -a at a regular interval, and search for the mac address of your phone.
You could go even further with this and perform different actions depending on what brand of device is connected.
The first 3 hexadecimal digits of a mac address are the vendor id.
Take the following mac address:
00:19:E3:AB:CD:EF
00:19:E3: is one of the registered mac address for apple devices.
By comparing the devices on your network with this list, you could detect when for example a '3com' device, or a 'dell' device attaches to your network.
http://www.coffer.com/mac_find/?string=apple
You can do "arp-scan -l -r10" for that (tested this myself), but the problem is if mobile data enabled the iphone will go and suspend wifi if screen is locked to safe battery. so you need to disable mobile data .. then arp-scan will work.
Does anyone know if USB modems are capable of detecting if there is a dial tone on a phone line without taking the line off the hook? I have read that you need to have the modem "open" the line and then there is a command that can be sent to check for dial tone. Is opening the line the same as taking the phone off the hook? If I do this while a call is coming in, will the modem in essence be answering the call?
If this is not the way to go, are USB modems capable of voltage detection? If so, is there a specific voltage that indicates the presence of a dial tone?
Thanks!
A useful primer on telephony.
To determine if there is dial tone, you have to take it off hook and listen. The presence of different voltage levels can be useful in knowing there is a valid circuit or if there is another use of the line, but not reliable to know if it is safe to dial.
yes, I believe opening the line is the same as taking the line off hook. Note, there isn't a dial tone until you go off hook, the telco detects and starts playing audio as an availability indicator.
If you do this while a call is coming in, you would be answering it. When working with automated systems, this is a problem and why inbound and outbound lines are usually segregated. I've seen some techniques that assume an inbound call if there isn't dial tone. If the empty line/human never responds, you only loose the availability of the line for the period of time it takes to determine a lack of response (timeout+retries).
Modems do perform voltage detection (ringing and other conditions). Voltage does not indicate dial tone. Again, it isn't present until you complete the circuit and the telco switch responds. Side note, there is usually a limit to the number of concurrent channels that can continuously play dial tone and this can sometimes cause interesting issues when opening large amounts of channels for an extended period of time.
I'm fairly novice in iPhone development, but trying to create what would seem a fairly simple application.
I want to have 1 program running on my phone/simulator that has a slider and a button, and another receiving program on the mac, such as Processing/Supercollider.
When the button is pressed i want a String such as "hello" to appear in the post window of the program on the mac, and when the slider is moved up/down for an integer, say between 0-99, to correspond with the movement on the phone. I'm assuming a WiFi connection would be essential for the sending of messages between devices.
Does anyone know how I might go about writing this - tutorials/code examples/links to get me started?
Cheers
cocoaasyncsocket is a great wrapper around CFSocket and CFStream, that makes networking much easier. Bonjour has great documentation at developer.apple.com
This should be done over a TCP connection which is established between your iPhone and the PC. For that to happen you need to write 2 pieces of software:
1) A client: to be installed on your iPhone
2) A server: to be installed on your PC
The server will listen to connections coming from the iPhone and once a connection is made you can send messages quite easily between the two.
This will give you a good grasp on the theory
Guide to socket programming in C
Once you have that then you can find tons of Obj-C TCP examples.