From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDC25C433FF for ; Sat, 10 Aug 2019 23:14:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F9EA2086A for ; Sat, 10 Aug 2019 23:14:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726451AbfHJXOH (ORCPT ); Sat, 10 Aug 2019 19:14:07 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:51443 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725863AbfHJXOH (ORCPT ); Sat, 10 Aug 2019 19:14:07 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id BA1B38030F; Sun, 11 Aug 2019 01:13:52 +0200 (CEST) Date: Sun, 11 Aug 2019 01:14:04 +0200 From: Pavel Machek To: ofono@ofono.org, kernel list , linux-arm-kernel , linux-omap@vger.kernel.org, tony@atomide.com, sre@kernel.org, nekit1000@gmail.com, mpartap@gmx.net, merlijn@wizzup.org Subject: Motorola Droid 4 SMS sending Message-ID: <20190810231404.GA26417@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=3D\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 =09 --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl1PT7wACgkQMOfwapXb+vLHKQCbB1FXu15H78z7H1X+NaG1Y/pJ UfsAn1FJ/Qlz2GsssMPxTbGJBNgwHcZZ =YHx4 -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA--