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.

78 lines
4.4 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. <body>
  21. <div id="page-container">
  22. <div id="content-wrap">
  23. <div id="header">
  24. <div class="content">
  25. <a href="/" class="undecorated">Colin McMillen</a>
  26. <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>
  27. <span style="float: right;"><a href="https://twitter.com/mcmillen"><img src="/img/twitter.svg" alt="@mcmillen"></a></span>
  28. </div>
  29. </div>
  30. <div class="content">
  31. <h1 id="gnokii-tips">Gnokii Tips</h1>
  32. <p><em>Posted 2007-05-22, updated 2021-07-01.</em></p>
  33. <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>
  34. <h2 id="file-io">File I/O</h2>
  35. <p><code>gnokii --getfilelist "A:\\predefgallery\\predeftones\\predefringtones\\*"</code></p>
  36. <p><code>gnokii --putfile WiiSports.mp3 "A:\\predefgallery\\predeftones\\predefringtones\\WiiSports.mp3"</code></p>
  37. <h2 id="ring-tones">Ring Tones</h2>
  38. <p>Voice mail picks up in 20 seconds, so a ring tone should be about 20 seconds long.</p>
  39. <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>
  40. <p><code>dd if=Mii\ Channel.mp3 of=MiiChan2.mp3 bs=1k count=200</code></p>
  41. <h2 id="phonebook">Phonebook</h2>
  42. <p>To make a Phonebook.ldif file from the phone (suitable for import into Thunderbird):</p>
  43. <p><code>gnokii --getphonebook ME 1 end --ldif &gt; Phonebook.ldif</code></p>
  44. <p>To add the entries in Phonebook.ldif to the phone:</p>
  45. <p><code>cat Phonebook.ldif | gnokii --writephonebook -m ME --find-free --ldif</code></p>
  46. <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>
  47. <h2 id="multimedia">Multimedia</h2>
  48. <p>You can get photos like this:<br>
  49. <code>gnokii --getfile "A:\\predefgallery\\predefphotos\\Image000.jpg"</code><br>
  50. They are 640x480 JPG files. (You can also configure the camera so that it takes pictures at 80x96.)</p>
  51. <p>You can also store files:<br>
  52. <code>gnokii --putfile silly.jpg "A:\\predefgallery\\predefphotos\\silly.jpg"</code><br>
  53. 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>
  54. <p>Videos live here:<br>
  55. <code>gnokii --getfile "A:\\predefgallery\\predefvideos\\Video000.3gp"</code><br>
  56. VLC seems to be able to play <code>.3gp</code> files, but the audio doesn&rsquo;t work.</p>
  57. <p>Audio recordings live here:<br>
  58. <code>gnokii --getfile "A:\\predefgallery\\predefrecordings\\Audio000.amr"</code></p>
  59. <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>
  60. </div>
  61. </div>
  62. <div id="footer">
  63. <div class="content">
  64. &copy; 2021 <a href="/" class="undecorated">Colin McMillen</a>. No cookies, no tracking.
  65. </div>
  66. </div>
  67. </div>
  68. </body>
  69. </html>