Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GAMMU - 8-bit SMS #757

Open
Geoffrey00 opened this issue Nov 28, 2022 · 4 comments
Open

GAMMU - 8-bit SMS #757

Geoffrey00 opened this issue Nov 28, 2022 · 4 comments

Comments

@Geoffrey00
Copy link

Hi everyone,

in few word: how to get an image from 8-bit sms ?

With more context:
as you can see on the linked picture, my gammu is working well with text sms. It's very nice but i try to process sms with an image.

On the linked picture at top, i have two types of messages:

  1. The "location 12" message is a simple text message, its work very well !
  2. The "location 13" message is an 8-bit message and is supposed to have an attached image

So my question is how can i get the image from this 8 bit sms please ?

My config

Can you help me about this please ?

@pjarmuzek
Copy link

Hi,
I suppose you mean MMS. Gammu does not support MMS.

@arobase-che
Copy link

arobase-che commented Feb 13, 2023

You want to receive a MMS ?
That is possible with GAMMU-smsd and wvdial. (sorry @pjarmuzek, I do it on a daily basis).

On a MMS, you will receive a .bin file in the Inbox of smsd. (like IN20170328_200639_00_++32xxxx.bin)

Saying you have :

InboxPath    = /var/spool/sms/inbox/

Them, you must have a connection to your operator with wvdial. If you only have on device (/dev/ttyUSB0 and no /dev/ttyUSB1) you have to stop gammu on ttyUSB0 and set wvdial instead. I have two, so I set them, one on ttyUSB0 the other on ttyUSB1.

I use that script : https://git.ache.one/util-script/tree/autoMMS.py
The first argument is the .bin file of the MMS.

The script will extract the URL (!!) of the MMS and download it from your operator connection (the URL is internal to your operator). It's why you need data to deal with MMS.

Them, the script create a file named /tmp/mmsFile and it's your MMS. It's in SMIL format, I usually read it from Vim and cut to the images to a file manually (a JPEG start with FF D8 FF who looks like "ÿØÿà "in Vim. Warning, you may have multiple Images and also some text at the end of each images.

You don't have to care about when an image ends because every image viewer ignore extra bytes.

A proper way to handle raw MMS file will be to use a SMIL decoder but it's wasn't that easy to find when I setup my stuff.

I'm still unable to send MMS. :(

@pjarmuzek
Copy link

Gammu itself does not support MMS as I wrote before - you need the third-party program(s) to handle receiving, connection, decoding etc.
Sorry @arobase-che, I do it on daily basis too :)

@arobase-che
Copy link

@pjarmuzek: What about sending MMS ?
Did you come to a way to do it ? I didn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants