linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Motorola Droid 4 SMS sending
@ 2019-08-10 23:14 Pavel Machek
  0 siblings, 0 replies; only message 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] only message in thread

only message in thread, other threads:[~2019-08-10 23:14 UTC | newest]

Thread overview: (only message) (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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).