How to use minicom to communicate via sms with my usb modem? - linux

I am using a huawei e355 usb modem on linux. I would like to send my usb modem texts from my cell phone and would want my usb modem to store it in some log file and may be communicate back. How do I go about doing this?
I went through a lot of articles but they were more about setting up the modem rather than using it in this particular way.

The best option for your needs would be Gammu. You can download it here http://wammu.eu/. You can also get it over your paket manager.
There is a python API available which makes interacting with texts easier.
For your needs I would recommend you run the gammu-sms daemon (gammu-smsd) and have a script which interacts with the contents of your sms. Check the RunOnReceive variable in the /etc/gammu-smsdrc file.

Try http://www.question-defense.com/2010/07/27/use-minicom-for-linux-modem-dialup-at-command-testing.
This allows you to send and receive texts from the modem; you can then set a callback for what to do once a text is received. I'm currently working on something along these lines, too, so I don't have a complete answer, but this should get you started.

Related

Make the HID keyboard with BLED112

I use the BLED112 and want to make it act like a HID keyboard.
The BLED112 receives the keystroke from the Mobile. For example, "p".
Then the dongle act like a keyboard so we can see the "p" is written on Notepad of PC.
Sending data from Mobile to dongle is not matter. I have already done.
My problem is to send the keystroke event to the PC so the dongle works like a keyboard.
I want an example or the full guide.
Thanks.
BLED112 is a Bluetooth Low Energy dongle provided by Bluegiga (Now acquired by Silicon labs). If you have studied the BLED112 user manual and bluegiga API reference documents, you'd understand that there can be two possible ways to read/write data via BLED112:
Use bgscript
use the bglib library into your C/C++ application
BLED112 is enumerated as a virual com port. I don't recall the name of the windows application that comes with BLED112 but it sounded like BLEGUI or something. This application uses the APIs to handle connections, read and write events. In a nutshell, you need to implement the same thing that this application does. For that, you can leverage the logs it spits on the console. This log will help you with all the commands you need to send and all the response that you need to handle.
Then, you need to make your application communicate with the virtual com port over which these commands will be send and responses will be received at.
Once you establish this, you'd be able to display your keystrokes.
It is a substantial work if you haven't worked with BLE. But like people say, there aren't free lunches!

Device to divert printing to PDF

I'm trying to build a device that is inserted between a client and a printer.
In the normal case this device should just allow the printing to occur as normal, but if a certain event happens it should instead divert the printing to a PDF file on disk.
In essence it should work as a print server that can decide where to send the data to be printed.
The problem is that I want to achieve this using an USB-A to USB-A cable between the client and the device, and the printer via USB to the device.
The device is at the moment a Raspberry Pie running Raspbian.
Printing from the Pie is tested using CUPS, so that works.
Now for the question(s):
How can I allow printing via USB cable from the client? Simply connecting the device and the client does not allow it to be recognised as a printer. CUPS does not seem to support this sharing option.
Can CUPS be configured to support sharing via USB?
Is there any other print software that supports this?
Is there another OS where this could be achieved easier?
Any input is appreciated!

Send a string from Arduino to Windows Store App via Bluetooth?

I am trying to get a Unity3d Windows Store App game to read a string of text that is sent from an Arduino Uno Rev3 over Bluetooth.
Unfortunately, the Windows Store App platform does not allow use of the System.IO.Ports namespace, so I am not sure how to get it to read the Bluetooth data.
Does anybody know how to read data from Bluetooth in a Windows Store App?
Any help is appreciated,
Thanks
If your HC-06 has COM-port capabilities, then you can use: [https://learn.microsoft.com/en-us/uwp/api/windows.devices.serialcommunication
there is a sample on Github:
[https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/SerialArduino
To find out if your device has COM-port capability on windows 10 go to settings/Bluetooth, pair device and go to more settings, tab com-ports and try to add port. If the list is empty unfortunately you can not use Windows.Devices.SerialCommunication APIs to communicate with an Arduino device.
Another way is to use the Bluetooth GATT protocol for communication.
It allows you to read and write data and subscribe to indicate and notify events.
For this there is also a sample on github:
[https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BluetoothLEClient
It depends on your HC-06 what Gatt-services are available but there is most likely a service that can reed and write and get notifications.
Hope this can help you,
Groover
I ended up using a BLE solution based on this example:
https://www.simplicity.be/article/eddy-and-his-stones-diy-arduino-beacon-mobile-apps/

Teensy 2.0 / Atmega32u4 as Keyboard: Send and Receive

I'm currently working on a device which is able to work as a keyboard and communicate via Serial with a self-written software.
Now I have to install serial drivers (from Arduino) on different computers if I want to communicate with my application which I actually want to avoid.
Is there any other solution to solve this problem? Is it possible that my microcontroller works as a keyboard AND is able to send and receive data as HID device?
Thanks and greetings!
I actually do something similar with a 32u4, but it receives its serial over the built-in UART. I do this because it's linking between two separate systems. If it were only one system I could implement a 2nd interface. (Don't forget, a USB HID device must have an IN endpoint even if you are not using it.) Or you could just throw a $2 USB/TTL converter on and do it the same as I did.

What would be the simplest system to send sms from linux server?

What would be the simplest system to send sms from linux server? It`s a Debian system. There would be not much SMSes. What hardware and software to use? Maybe use some SMS sending service?
Yeah, I think the simplest way would be getting a serial GSM modem, or a GSM phone with a serial connection, and a SIM card. Some USB ones can work, but is better getting a serial one and staying on the safe side.
Serial modems don't need any drivers, you just need to connect via the serial port (/dev/tty...) and dump there the commmands...
Also, if you want it easier, you can install the SMS Tools available on Linux. They are packaged with the easy name 'smstools' in Ubuntu, Debian, and other Distros.
Last version is number 3, and you can get some info on this site:
http://smstools3.kekekasvi.com/
If you like to to do it yourself and utilize your old mobile phone, try this recipe :-)
There is a real advantage in this approach over using some email SMS service: computer network problems don't affect local hardware. It's especially important if you use SMSes for monitoring your server.
Each cell phone company offers email addresses to send sms messages to phones. For example verizon uses something like 55512345678#vtext.com to send messages. All you need to do is find a list of each provider's email domain and then find out the service your user subscribes. After that just send the sms like a regular email. This is how most software does it.
Since you are probably looking for a lithuanian service (judging from your name), look into www.gsms.lt.
Maybe this Question helps you. Otherwise take a look at Kannel.
There is another option perl independent exec. Download and Run directly.
No Moderm required. Global sms supported and free try.
you can refer http://www.sms4mail.com/smsmail/smscmd.htm
Use a modem connected to a serial port. And use gnokii.
the simplest way is to use a GPRS modem or a pool of modems. More advance - buy gateway service in cell network operator.

Resources