All of lore.kernel.org
 help / color / mirror / Atom feed
* Motorola Droid 4 SMS sending
@ 2019-08-10 23:14 ` Pavel Machek
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2019-08-10 23:14 UTC (permalink / raw)
  To: ofono-bdc2hr5oBkPYtjvyW6yDsg, kernel list, linux-arm-kernel,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	sre-DgEjT+Ai2ygdnm+yROfE0A, nekit1000-Re5JQEeQqe8AvxtiuMwx3w,
	mpartap-hi6Y0CQ0nG0, merlijn-tF0PIh4TN3odnm+yROfE0A


[-- Attachment #1.1: Type: text/plain, Size: 1006 bytes --]

Hi!

Motorola Droid 4 runs packet protocol over serial... and its kernel
driver requires explicit "write()" boundaries at places where packet
boundaries should be.

So I can send SMS using low level g_at... functions (that are not
normally accessible), but not using g_at_chat_send().

If anyone has good idea for clean (or clean enough) solution, let me
know.

Best regards,
									Pavel

   snprintf(buf, sizeof(buf), "AT+GCMGS=\r");
   encode_hex_own_buf(pdu, pdu_len, 0, buf_pdu);

#if WANT_IT_BROKEN
        strcat(buf, buf_pdu+2);
        g_at_chat_send(data->send_chat, buf, none_prefix, NULL, data, NULL);
#else
        g_at_io_write(data->send_chat->parent->io, buf, strlen(buf));
 	g_at_io_write(data->send_chat->parent->io, buf_pdu, strlen(buf_pdu));
	g_io_channel_flush(data->send_chat->parent->io->channel, NULL);
#endif
			
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Motorola Droid 4 SMS sending
@ 2019-08-10 23:14 ` Pavel Machek
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2019-08-10 23:14 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]

Hi!

Motorola Droid 4 runs packet protocol over serial... and its kernel
driver requires explicit "write()" boundaries at places where packet
boundaries should be.

So I can send SMS using low level g_at... functions (that are not
normally accessible), but not using g_at_chat_send().

If anyone has good idea for clean (or clean enough) solution, let me
know.

Best regards,
									Pavel

   snprintf(buf, sizeof(buf), "AT+GCMGS=\r");
   encode_hex_own_buf(pdu, pdu_len, 0, buf_pdu);

#if WANT_IT_BROKEN
        strcat(buf, buf_pdu+2);
        g_at_chat_send(data->send_chat, buf, none_prefix, NULL, data, NULL);
#else
        g_at_io_write(data->send_chat->parent->io, buf, strlen(buf));
 	g_at_io_write(data->send_chat->parent->io, buf_pdu, strlen(buf_pdu));
	g_io_channel_flush(data->send_chat->parent->io->channel, NULL);
#endif
			
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Motorola Droid 4 SMS sending
@ 2019-08-10 23:14 ` Pavel Machek
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2019-08-10 23:14 UTC (permalink / raw)
  To: ofono, kernel list, linux-arm-kernel, linux-omap, tony, sre,
	nekit1000, mpartap, merlijn


[-- Attachment #1.1: Type: text/plain, Size: 1006 bytes --]

Hi!

Motorola Droid 4 runs packet protocol over serial... and its kernel
driver requires explicit "write()" boundaries at places where packet
boundaries should be.

So I can send SMS using low level g_at... functions (that are not
normally accessible), but not using g_at_chat_send().

If anyone has good idea for clean (or clean enough) solution, let me
know.

Best regards,
									Pavel

   snprintf(buf, sizeof(buf), "AT+GCMGS=\r");
   encode_hex_own_buf(pdu, pdu_len, 0, buf_pdu);

#if WANT_IT_BROKEN
        strcat(buf, buf_pdu+2);
        g_at_chat_send(data->send_chat, buf, none_prefix, NULL, data, NULL);
#else
        g_at_io_write(data->send_chat->parent->io, buf, strlen(buf));
 	g_at_io_write(data->send_chat->parent->io, buf_pdu, strlen(buf_pdu));
	g_io_channel_flush(data->send_chat->parent->io->channel, NULL);
#endif
			
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Motorola Droid 4 SMS sending
@ 2019-08-10 23:14 ` Pavel Machek
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2019-08-10 23:14 UTC (permalink / raw)
  To: ofono, kernel list, linux-arm-kernel, linux-omap, tony, sre,
	nekit1000, mpartap, merlijn

[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]

Hi!

Motorola Droid 4 runs packet protocol over serial... and its kernel
driver requires explicit "write()" boundaries at places where packet
boundaries should be.

So I can send SMS using low level g_at... functions (that are not
normally accessible), but not using g_at_chat_send().

If anyone has good idea for clean (or clean enough) solution, let me
know.

Best regards,
									Pavel

   snprintf(buf, sizeof(buf), "AT+GCMGS=\r");
   encode_hex_own_buf(pdu, pdu_len, 0, buf_pdu);

#if WANT_IT_BROKEN
        strcat(buf, buf_pdu+2);
        g_at_chat_send(data->send_chat, buf, none_prefix, NULL, data, NULL);
#else
        g_at_io_write(data->send_chat->parent->io, buf, strlen(buf));
 	g_at_io_write(data->send_chat->parent->io, buf_pdu, strlen(buf_pdu));
	g_io_channel_flush(data->send_chat->parent->io->channel, NULL);
#endif
			
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Motorola Droid 4 SMS sending
  2019-08-10 23:14 ` Pavel Machek
                   ` (2 preceding siblings ...)
  (?)
@ 2019-08-11 14:25 ` Denis Kenzior
  -1 siblings, 0 replies; 5+ messages in thread
From: Denis Kenzior @ 2019-08-11 14:25 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1161 bytes --]

Hi Pavel,

On 8/10/19 6:14 PM, Pavel Machek wrote:
> Hi!
> 
> Motorola Droid 4 runs packet protocol over serial... and its kernel
> driver requires explicit "write()" boundaries at places where packet
> boundaries should be.
> 
> So I can send SMS using low level g_at... functions (that are not
> normally accessible), but not using g_at_chat_send().
> 
> If anyone has good idea for clean (or clean enough) solution, let me
> know.
> 
> Best regards,
> 									Pavel
> 
>     snprintf(buf, sizeof(buf), "AT+GCMGS=\r");
>     encode_hex_own_buf(pdu, pdu_len, 0, buf_pdu);
> 

So speaking from memory, but 27.005 expects CMGS to be a two part 
command.  First you send AT+CMGS=<whatever> and the modem then prompts 
for the PDU using '>'.  Then we provide the PDU followed by Ctrl-Z.  If 
the Motorola modem doesn't do this, then you're stuck providing a full 
Motorola-Hacked-AT-Commands implementation of your own.

You can try hacking GAtChat to add a bunch of behavior-modifications 
like this, but I imagine that this protocol is different enough where 
such changes become a nightmare to keep track of.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-08-11 14:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-10 23:14 Motorola Droid 4 SMS sending Pavel Machek
2019-08-10 23:14 ` Pavel Machek
2019-08-10 23:14 ` Pavel Machek
2019-08-10 23:14 ` Pavel Machek
2019-08-11 14:25 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.