You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
5.0 KiB

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <link rel="icon" type="image/png" href="/favicon.ico">
  7. <link rel="canonical" href="https://www.mcmillen.dev/blog/20070522-gnokii-tips.html">
  8. <link rel="alternate" type="application/atom+xml" href="https://www.mcmillen.dev/feed.atom" title="Colin McMillen's Blog - Atom">
  9. <title>Gnokii Tips | Colin McMillen</title>
  10. <link rel="preconnect" href="https://fonts.gstatic.com">
  11. <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@500;700&display=block" rel="stylesheet">
  12. <link href="https://fonts.googleapis.com/css?family=Fira+Mono:500&display=block" rel="stylesheet">
  13. <link rel="stylesheet" href="/pygments.css">
  14. <link rel="stylesheet" href="/style.css">
  15. <meta name="twitter:card" content="summary">
  16. <meta name="twitter:site" content="@mcmillen">
  17. <meta name="twitter:title" content="Gnokii Tips | Colin McMillen">
  18. <meta name="twitter:description" content="I own a Nokia 6102i phone (provided by Cingular). gnokii is a Linux program that lets me interface with the phone. Here are some recipes: File I/O">
  19. </head>
  20. <script>
  21. function fixEmails() {
  22. const mailtoArray = [
  23. 'm', 'a', 'i', 'l', 't', 'o', ':',
  24. 'c', 'o', 'l', 'i', 'n', '@',
  25. 'm', 'c', 'm', 'i', 'l', 'l', 'e', 'n',
  26. '.', 'd', 'e', 'v'];
  27. const mailtoLink = mailtoArray.join('');
  28. const anchors = document.getElementsByTagName('a');
  29. for (let i = 0; i < anchors.length; i++) {
  30. const anchor = anchors[i];
  31. if (anchor.href == 'mailto:email@example.com') {
  32. anchor.href = mailtoLink;
  33. if (anchor.innerText == 'colin at mcmillen dot dev') {
  34. anchor.innerText = mailtoLink.substring(7);
  35. }
  36. }
  37. }
  38. }
  39. </script>
  40. <body onload="fixEmails()">
  41. <div id="page-container">
  42. <div id="content-wrap">
  43. <div id="header">
  44. <div class="content">
  45. <a href="/" class="undecorated">Colin McMillen</a>
  46. <span style="float: right;"><a href="/feed.atom"><img src="/img/rss.svg" alt="Atom feed" style="width: 17px; height: 17px; margin-bottom: 1px;"></a></span>
  47. <span style="float: right;"><a href="https://twitter.com/mcmillen"><img src="/img/twitter.svg" alt="@mcmillen"></a></span>
  48. </div>
  49. </div>
  50. <div class="content">
  51. <h1 id="gnokii-tips">Gnokii Tips</h1>
  52. <p><em>Posted 2007-05-22, updated 2021-07-01.</em></p>
  53. <p>I own a Nokia 6102i phone (provided by Cingular). <a href="http://gnokii.org">gnokii</a> is a Linux program that lets me interface with the phone. Here are some recipes:</p>
  54. <h2 id="file-io">File I/O</h2>
  55. <p><code>gnokii --getfilelist "A:\\predefgallery\\predeftones\\predefringtones\\*"</code></p>
  56. <p><code>gnokii --putfile WiiSports.mp3 "A:\\predefgallery\\predeftones\\predefringtones\\WiiSports.mp3"</code></p>
  57. <h2 id="ring-tones">Ring Tones</h2>
  58. <p>Voice mail picks up in 20 seconds, so a ring tone should be about 20 seconds long.</p>
  59. <p>The easiest way to chop an MP3 in Linux is with <code>dd</code>; the drawback is that you need to specify length in KB, not time. To chop an MP3 to be 200 KB long, do:</p>
  60. <p><code>dd if=Mii\ Channel.mp3 of=MiiChan2.mp3 bs=1k count=200</code></p>
  61. <h2 id="phonebook">Phonebook</h2>
  62. <p>To make a Phonebook.ldif file from the phone (suitable for import into Thunderbird):</p>
  63. <p><code>gnokii --getphonebook ME 1 end --ldif &gt; Phonebook.ldif</code></p>
  64. <p>To add the entries in Phonebook.ldif to the phone:</p>
  65. <p><code>cat Phonebook.ldif | gnokii --writephonebook -m ME --find-free --ldif</code></p>
  66. <p>You can specify <code>--overwrite</code> instead of <code>--find-free</code> if you want to overwrite all the entries, but this will lose some data (e.g. speed dial, preferred numbers).</p>
  67. <h2 id="multimedia">Multimedia</h2>
  68. <p>You can get photos like this:<br>
  69. <code>gnokii --getfile "A:\\predefgallery\\predefphotos\\Image000.jpg"</code><br>
  70. They are 640x480 JPG files. (You can also configure the camera so that it takes pictures at 80x96.)</p>
  71. <p>You can also store files:<br>
  72. <code>gnokii --putfile silly.jpg "A:\\predefgallery\\predefphotos\\silly.jpg"</code><br>
  73. These show up on the phone in <code>My Stuff/Images</code>. The files don&rsquo;t need to be any specific size; they are autoscaled. GIFs probably also work.</p>
  74. <p>Videos live here:<br>
  75. <code>gnokii --getfile "A:\\predefgallery\\predefvideos\\Video000.3gp"</code><br>
  76. VLC seems to be able to play <code>.3gp</code> files, but the audio doesn&rsquo;t work.</p>
  77. <p>Audio recordings live here:<br>
  78. <code>gnokii --getfile "A:\\predefgallery\\predefrecordings\\Audio000.amr"</code></p>
  79. <p>Unfortunately, nothing I knew of in 2007 (when this page was first written) would play <code>.amr</code> files, but these days (2021) perhaps <code>ffmpeg input.amr output.mp3</code> would work. You might have to use the <code>-ar</code> flag to specify the audio rate. I haven&rsquo;t actually tried this though!</p>
  80. </div>
  81. </div>
  82. <div id="footer">
  83. <div class="content">
  84. &copy; 2022 <a href="/" class="undecorated">Colin McMillen</a>. No cookies, no tracking.
  85. </div>
  86. </div>
  87. </div>
  88. </body>
  89. </html>