1 TODO: sep 2009, now that I am using this as my real phone:
2 - send touch tone commands
3 - keep record of incoming/outgoing calls
4 - reduce time from wake to ring
6 DONE runit to scroll to the bottom
7 DONE bigger buttons in runit
8 text, not icons, for shop config stuff
9 DONE launch/status to update more often
10 DONE gsm info in launch/status
11 DONE gsmd: reading 'extra' needs to cope with multiple lines:
14 - add 'xterm' so I can type...
15 DONE - add 'esc' to 'tapinput'
16 - look for launch errors in .xsession-errors:
17 File "/usr/local/bin/launch", line 324, in press
19 AttributeError: 'Selector' object has no attribute 'offsets'
21 - make sure launch updates when sms message arrives
22 - find out why everything is so slow
23 - make sure only one 'gsm-getsms' running at a time. Maybe kill
25 - trace?? to find out why we don't seem to pick up a message on
26 resume. The newsms file gets changed but maybe no signal gets sent.
27 - "sendsms -n" should go straight to 'new'.
28 - clean up rubbish in 'new' and 'draft' files.
29 - lock should be in charge of buzzer.
30 It turns it off on 'wake' or after a timeout and turns it on when some file changes.
31 Maybe there is an 'alert' file which gets 'sms' or 'ring'.
32 In the case of 'ring' it is updates regularly.
33 'lock' sets a buzz, turns on display, maybe beeps
34 - run gsm-getsms at appropriate times
35 -n when /var/run/gsm-state/new-sms changes
36 DONE -a at boot time, or when gsmd starts??
37 - write some info to a 'new sms' file that I can watch for status
38 Probably just watch the 'newmesg' log and update shortly after that changes.
39 - improve atchan code - better abstractions
40 - 'delete' should return to list view if in message view
41 - Make sure sendsms notices when the files change
42 - Make 'sender' and time easier to read.
43 Probably make lines twice as high
44 time can be 'today' and 'yesterday' and ' 5 minutes ago' etc
45 mark day/month boundaries some how?
46 - figure out if a '+' should be at the front of the phone number
47 - look into timezone information on exesms messages
48 - implement search function
49 - Highlight 'new', 'draft' 'in/out' better. Icon?
50 - Don't duplicate a draft when we edit it.
51 - Find some way to remove cruft from new/draft
52 - buzz buzzer when message arrives.
53 - include transit time in full message view.
54 - Make messages disappear from 'new' when they are read.
55 - popup reading in 'new' mode when selected from launcher
56 - capture and decode catenated messages
57 - figure out why changing lists is so slow.
59 - implement scrolling of message list
60 - change 'open' to 'forward' or 'edit'
62 ?? detect SIM card id and have separate mirror file??
66 - move 'config' to 'listing' page?
67 - change between 'save draft' and 'cancel' when clear.
68 - press-and-hold send to select handler
69 - make 'paste' active only when there is something to paste
70 - send only active when fields are filled in.
73 receive AT response +CBM: 4576,50,1,1,1
74 receive AT response South
75 receive AT response Sydney
79 DONE store direction (in/out) and only one address (Sender or recipient)
81 Inter toy communication:
86 don't suspend just now
90 Use X clipboards for specific messages
91 use lock files for 'dont'
92 use leases for 'call me' and 'everybody'
93 That would require all running as same uid.
94 Maybe DNOTIFY, but cannot use that well from python
95 So write C helper and do inotify?
96 But check gobject doco first.
97 I think I can use dnotify OK, poll each file on each signal.
98 So use that for 'call me on resume'
99 Possibly for 'incoming call', 'received sms',
100 Maybe for 'Internet now available'
101 Used by weather, time,
102 Also 'GSM' and 'GPS' now available
104 Root Properties - one-to-many messages. that are ui based.
105 e.g. 'pause' 'ABC/abc/123/$%&', 'scale size'
108 We have a directory /var/lock/suspend
110 auto: Taking a LOCK_SH on this prevents auto suspend.
111 If auto-suspender can get a LOCK_EX, it suspends, then
113 suspend: Taking a LOCK_SH on this prevents any suspend completing.
114 However any locker must also watch the file with e.g.
115 dnotify, and when the file is nonempty, the lock must be
117 next_suspend: Taking a lock on this while holding a lock on
118 suspend ensures that you will not miss a suspend/resume cycle.
119 On resume, the file is renamed to 'suspend',
120 So 'dnotify' can discover when resume happens and a subsequent
121 suspend will not complete until the lock is released.
124 take a lock on 'suspend'
125 check that link count is non-zero (if zero, close and loop)
127 set up for active system
129 when there is a change in the file:
131 possibly take lock on next_suspend
133 wait for activity on next_suspend (which will be renamed to 'suspend')
138 Alert is currently part of 'lock'. Is that a good idea?
139 The connection is that we only want to sound an alert if there is
140 an easy way to turn it off - and 'lock' is in the best position to
141 turn things off. It is closest to the user. If lock isn't
142 running, don't want to make any noise.
145 - different alerts: ring, sms, alarm, low-battery
146 - different sub-alerts: ring/family. sms/work, alarm/urgent
147 - different settings: silent, unobtrusive, normal
148 - different actions: tone, buzz, flash, repeat count, volume
149 change, LED flash, screen flash.
150 - some alerts stop when there is user input (tone). Some
153 - concurrent alerts?? alarm and SMS at same time?
154 As long as we get attention, and display status on screen..
155 Maybe need alert priority and only play the most important.
157 Configuration: too complex for just directories with symlinks to
159 Still want to make it easy to change config, either temp or perm.
161 Config changes can be
167 Does the alert program do this itself, or does some other program
170 Maybe have a set of .ini files where settings cumulate.
171 Read base, then others
172 - calendar program creates a plan every so often which lists
173 time - profile e.g. 20090228-123456 silent
175 - The location service gives a name to where we are, as precise
176 as possible. We then look for setting "location-$NAME"
177 - ditto for orientation.
180 Disable 'xset' screen blan!k
183 DONE differently OK should become 'go away'
184 DONE Need a 'mode' where all 12 are used. press/hold mode/del to recover.
185 DONE Move > half off screen, and disappear.
186 DONE statusicon to recover
187 DONE Add: Ret UP DOWN LEFT RIGHT
191 Waits for 'internet now available' and if more than 8 hours since
192 last check, download weather details.
197 launcher (folders/tasks), music, shop, sendsms
199 - goes multi-column if possible/needed
200 - auto-scroll when near extreme
201 - tap selects but doesn't activate
202 - small left/right tap areas for select-and-activate
203 - simple text with different colours, or app-specific rendering
204 - alternating background, background for highlight
205 - drags used for text entry
208 Acts like vbox or hbox depending on available space
214 Note pad with search.
215 This might just be an extension to scribble.
216 - simple text file editor
217 - multiple pages with a list that can be selected from
218 - search across all pages - show page name and line.
219 - mark pages 'read-only'
221 - text size. features: highlight strikethrough bold italic
222 - 'link' a word to a page of the same name.
223 - group pages into notebooks???
230 - allow grouping of texts with tap-draw-hold
231 - when we have a group of texts, allow
235 - move a text with tap-hold-draw
236 - easier to select individual text
237 - allow text to be deleted - maybe drag to corner
238 - new line gets leading number or bullet or whatever
240 'text' entries to record opposite corner when drawn
241 some set of the last N text entries
242 these are drawn with a grey background??
246 Set window name to something appropriate
247 DONE run a command and display the output. No user interaction(yet)
248 DONE One button to close
251 - different colour for stderr
252 - buffer to build text, then enter it
253 Combine with launcher??? or teach launcher to understand it better
254 Make it easier to run a little shell script
258 DONE Be more careful about counting up/down - count per button.
259 DONE be careful about press/release difference
260 DONE allow insta-lock with icon
261 LATER use lockfile to tell when someone wants no-blank
262 LATER Have lockfile for 'next suspend'. use inotify for clients
263 to find out when 'next' becomes 'now'
264 DONE use lockfile to tell when someone wants no-suspend
265 DONE suspend when more idle
266 DONE use external net connections to disable suspend
267 DONE maybe don't suspend while charging (of >50%)
268 DONE don't suspend while load-average is high
269 DONE no-suspend setting.
270 Only check TCP if keep-alive is working....
271 Use alsa to play tones for alerts. Also buzz
272 Alerts are requested by creating file /var/run/alert/$name
273 where 'name' is something like 'sms' or 'ring' or 'alarm'
274 We look for /etc/alert/$name to find out what to play.
275 Not sure how to include
283 We terminate the alert tone when a button is pressed
284 Vibrate continues if it is a repeating alert (ring)
288 Events such as SMS, missed-call, alarm get appended to a file
289 The viewer shows recent events and allows the relevant window to be
291 It has a blinking statusicon when there are new events
293 This is probably just included in launcher
296 one pane which just shows a photo, is full screen, taps left and right moves
297 one pane with browser showing date information
301 store addresses with phone numbers
303 Format address label as postscript for printing
304 send phone number to dialler
308 Addresses - people share these
309 Phone number - people have several, and share them
310 Email address - again, can be multiple and shared.
312 So we allow entries to include others by reference
314 Name - given / family
315 Category (family, collegue, church, ...)
316 Address[desc] - l1 / l2 / postcode / country
321 What key to use for 'entity' ??
322 Name? not unique and can change.
323 UUID I guess. assigned sequentially. Maybe use hostname to
328 name = { given = Neil ; family = Brown }
331 address = { type=Home; a= "13 Lang Ave";
332 city="Pagewood"; postcode=2019;
335 Phone = { type=mobile; num=0403463349; }
340 That is horribly verbose and not needed.
341 Though if we store gzipped, it isn't much waste.
343 We don't really want to store it in memory as that isn't paged out,
344 So we want an ondisk format which is very easy to parse. Hopefully
345 it will be cached most of the time.
346 So: ':' separated fields with ',' separated subfields and '=' assignments
347 id:family:given:cat,cat:ref,ref:PO:addr:addrext:city:postcode:country:mobile=number,work=number:Date
349 Should probably use VCARD - it isn't that hard.
350 Just ignore the bits we don't understand yet.
351 When editting, only change fields we understand.
352 When there are interdependent fields like N vs FN and ADR vs LBL
355 No. Don't like VCARD - no references (that I can find) as no ID for each entry ???
357 Anyway I'll use my own internal format and maybe export/import one day if I decide to care.
359 We mmap the file and typicaly use 're' to search through it, while holding a read lock and having
362 We access the address book by extracting addresses.
364 These can have an 're' argument meaning 'first/next that matches re'
365 File contains an initial line with a version number, so that each line starts and ends
366 with '\n'. Thus each field starts and ends with [\n:,=]
368 How to integrate this?
369 Any program that just needs read access goes direct to the file, mmaping and searching
370 Auto updates such as 'last used' can similarly be on on the mmapped file.
371 Updates need to be handled by a single GUI.
372 When someone - e.g. SMS or Call-Log - wants to store a number or edit an entry,
373 they put a resource on the root window. If the contact list is watching, it
374 picks it up. If it isn't, the button is greyed out (or we run the program)
377 Has an edit window where content of interest appears
380 doesn't always move forward at end-of-song
381 have better way to 'play chosen song'
382 If 'seek' dropdown didn't select a time, don't jump at all.
383 report song on root window property
384 Have fs browser to find music folder(s)
385 survive suspend somehow
386 Don't seek when there is nothing to seek (negative offset??)
387 record current location for restart
388 remove "/home/music/ogg" from displayed path
389 grab /var/run/suspend_disabled when playing
390 DONE add volume control
391 DONE Think about seek control
392 Maybe support HTTP: uris such as classic-fm
395 tap 'current song' to go there in browser
399 sync to real time properly
402 wake to music or buzzer
411 Need to add/edit locations and places.
412 When 'choose location' or 'choose place' is up, the
413 'add' and 'edit' button affect the location name instead of the product
414 renaming a thing to 'empty' only works if it is not in use.
415 When we click 'config', product list is replaced by location list.
416 Click 'config' again to go back. Different background colour??
417 If we change place, it changes set of locations
418 '+' adds a new location
419 'edit' changes the name of current location
421 tick and cross become up and down to move current location
425 try to get more timely alerts without polling - Need to use DBUS.
426 DONE Select between pop-up new window and restore old window
427 DONE Show time_to_{full,empty}_now in correct units
428 ?? use 'status' for 'Charging' ...
429 DONE timeout to make window disappear? or to refresh display
430 DONE pop up window with
436 need to consider Wifi, USB, bluetooth, gprs, BT/ppp
438 device specific page for each:
441 connect with DHCP, enter WPA-PSK
442 suspend mode: power off or WOW
444 disable/DHCP-client/DHCP-server
445 if dchp-server: have list of address configs to choose between
446 if another network is active, choose based on that.
459 content for status page:
460 - date, time, timezone??
461 - GSM carrier, Cellid strenght?
462 - Network connectivity
469 - load average / uptime
470 Delay "wmctrl -l" a bit so that we start up faster ??
472 support displaying values from root attributes
473 run wmctrl at the right time better.
474 have a 'status' folder which shows 'today'
476 Don't adjust sizes of entires
477 Allow different sizes items - keep list of offset for click
478 Don't allow item to be selected if no buttons
479 Center type. MAybe "type" can be e.g. "cmd:center" or "thing:right"
480 How to schedule redraw of e.g. time / date / etc
481 Expensive tasks would need to cache values incase they are called too often.
482 don't iconize- just stay behind
483 watch root properties to be notified of window changes.
485 DONE direct button access
490 DONE Two columns with button row at bottom.
491 DONE First column is cmd group and includes 'active windows'
492 DONE Second column is options in the group
493 DONE Buttons are "run" or "stop"
495 I want a third column. When it appears, the first column disappears.
496 This can be used for:
497 - address-book access when making a call
498 - log of recent calls - in or out
500 Why not just put these in the second column with the trigger in the first.
501 So first column gets:
502 contact: shows address book.
503 text entry reduces list
504 selection provides 'call' and 'txt' and 'open' buttons
505 calls: shows similar list, but of recent calls. Can call back
507 Selecting 'last call' or 'dialout' in status window can allows jump to
510 I think I need to rewrite launcher from scratch - it got messy.
512 - text entry at the top:
513 any change is sent to any visible task
514 - buttons at the bottom.
515 these are chosen by active task
516 - left column of task groups.
517 apps comms calls contacts windows games status
518 - right column of tasks
520 A 'tasklist' is given to each column and can be static or dynamic.
521 A 'task' has an appearance and an action.
522 For the right column, the action sets the left column.
523 For the left column, the action sets the buttons
524 The buttons also have appearance and action. The action
525 can do all sorts of things:
526 - run or kill program
527 - raise or close window
528 - make phone call / hang up
530 The two columns can be replaced by a textarea that displays the output
533 The 'aux' button can be pressed or held.
534 - press raises the window, then selects 'status', then returns to previous window
535 - hold ... what can that do? Answer the phone?
536 Maybe if a task is signalling for attention, then 'press' goes to
537 that task, and 'hold' activated the first button for the task.
539 I need to define the interface for pluggins.
540 A plugin needs to be able to:
546 - Add an embedded-window
548 A task must be able to
550 - present some buttons
551 - present an embedded window
552 - receive keyboard input
553 - request that a different task or group be selected
555 Some examples of the embedded window:
556 - tap-board for text/number entry
557 - calendar - one month
558 - text, e.g. SMS message, email
561 This stores a list of groups.
562 Some groups need no further details (e.g. active windows)
563 Others need to explicitly list tasks
565 Internal (in a module)
566 External-window (program to run, window to find)
569 When listing explicit tasks we can use:
573 for external-window, where 'window' is the name of the window
575 for an internal module
577 Each group is given in config file as:
579 if '/type' is missing, "list" is assumed.
580 Types and the required content are:
582 a series of task descriptions
584 a series of window names to ignore (?)
586 file= name of address book
588 nothing - the call log has a standard location
590 If 'type' is 'modules', then each line names a module
592 Modules have an entry point "init" which returns:
593 a list of group types supported
594 a list of internal commands
595 each is paired with an object-creation command.
597 A 'group' object must be able to parse config lines
598 and produce a task list etc.
601 pygtk similar to tangogps
603 Display maps, zoom follow GPS
604 Separate threads for file loading, GPS track, and UI
607 Always compress and write to a file
610 - always all parent maps for a given download
611 - download maps along a path (to some depth/width)
612 This includes a drawn path.
613 If map not available, scale other resolution
616 report time-to-first-fix
617 three different modes interpretting drag
619 2/ draw a path on the map
620 3/ write text to tag location or path.
625 Download and cache NIV if Network available.
629 - support pause/restart
630 - play from start, play last 10 seconds, seek
631 - allow naming of music files
632 - adjustable audio level??
633 - adjustable compression ?? speex/vorbis
637 pops up when a call becomes active
638 presents number*# buttons for tones
639 Allows HOLD/CALL-WAITING/HANG_UP
640 Disappears when no call is active
641 Should handle VOIP too, including call-waiting
644 un-pause after the call ??
645 Warning tone at points in call time
648 Display CNI, look up in address book
649 Choose ring tone bassed on number and time of day??
650 Check device position and be quiet if face down.
653 allow number to be entered somehow
654 choose VOIP or mobile, while number is being entered.
655 silence music, disable suspend
656 Make connections, log, trigger ON-CALL
660 send via eXeTeL if network is up, else ??
662 Editor window: simple text, no new lines. auto scroll,
668 How to select for cut/paste??
669 'cut' button is normally 'select'.
670 tap that, then draw range, then 'cut'
671 status bar with valid spellings? and common continuations
673 send: sends to one or more addresses
674 draft: save as a draft and go to list of drafts
675 config: go to config page.
677 If sending fails, save as draft and go to draft page.
678 If it succeeds, save as 'send' and save to 'sent' page.
680 'message list' page shows one message per line.
681 messages can be selected.
682 the selected message can be:
687 all / draft / new / sent / received
688 restricted by search string
692 delete/view/send buttons
694 One button rotates through all/draft/new/sent/received
699 backend to use for different class of number.
700 each backend has a config page.
701 exetel userid and password
704 Database of all messages
705 Highlight unread messages
706 Sort in selectable order - provide virtual folders
707 Date, Month, Sender "contains text"
710 0000000 006 005 004 # 364 \0 \0 B E G I N : V C A
711 0000020 R D \r \n V E R S I O N : 2 . 1 \r
712 0000040 \n N : F a n n y \r \n T E L ; P R
713 0000060 E F ; W O R K ; V O I C E : 9 2
714 0000100 3 4 8 9 0 8 \r \n T E L ; C E L L
715 0000120 ; V O I C E : 0 4 3 3 2 3 1 0 6
716 0000140 9 \r \n T E L ; H O M E ; V O I C
717 0000160 E : 0 2 9 6 6 1 8 8 8 8 \r \n E N
718 0000200 D : V C A R D \r \n
722 TEL;PREF;WORK;VOICE:92348908^M
723 TEL;CELL;VOICE:0433231069^M
724 TEL;HOME;VOICE:0296618888^M
730 ** Worry about ASCII / UNICODE
731 a/ could use one file per message, named by time
732 with links to a directory for 'draft' or 'new'
733 But that wastes space.
734 b/ could use a TDB database, keyed by date, with
735 a hierarchy of days and years for directories.
736 c/ plain text file, one per month
737 'new' and 'draft' are separate files that list ids.
741 Each SMS entry is one line, space separated:
742 date-time %Y%m%d-%H%M%S.uuid
744 'to' numbers, comma separated
745 'text' of message, URL encoded on to one line with no spaces.
751 There are two dates that could be of interest.
752 - the time I first saw the message (my clock)
753 - the time the message was sent (with incoming messages).
754 We need to record both of these.
755 For outgoing, there could be "time message successfully sent"
758 ----------------------------------------------------------------
759 Thinking about buttons.
761 - I want to easily/quickly get to 'main page' with time and status etc.
762 But sometimes I want to get 'back where I was' after a screen blank
764 - I want the 'power' button to always do the same thing. It wakes up
765 from suspend, so it must wake up the same way from blank.
766 But what should it present: last screen, last launcher, or status?
767 It should be the thing I most likely want after a long abscence, which
768 would be the front status page.
769 It should also be the thing that I can use when there is an incoming call.
770 That would be something with an 'answer' button. So The status page
771 with 'incoming call' selected and 'answer/cancel' buttons at the bottom.
772 'Answer' would alert the GSM-call window to pop up and answer the call.
774 - So the aux button does:
775 - nothing during suspend
776 - wakeup display during blank
777 - launcher when active
779 - But that means the lock program needs to grab AUX, so the earpiece
780 switch gets grabbed too. So either the lock program handles earpiece
781 switching, or it signals someone else. I guess we write to a file when
782 that changes. Though we could go direct to scenarios symlink.
783 How complex should this be?
784 /var/lib/audio/scenario -> handset or headset
785 handset -> scenario/handset ditto for headset
786 scenario points to gsm, voip, stereo, record, gsm-speaker
787 these are each directories which contain 2 .state files.
789 - Maybe I want a button to bring up the tap-board as well??
792 power button always brings up control window, and selects status
793 aux button returns to
800 One can be blue, orange, or purple.
801 We can used the signal:
802 - charging state (powered, battery full)
803 - ringing state (could be different colour depending on if we know them)
804 - blank-but-not-off-yet
805 - wifi associated (might be a waste of battery...)
810 - arrange for power button to present status page
811 - Sort out tapinput usage
812 - install sendsms and make sure I can send via GSM
813 - sync SMS messages from SIM to flash
814 - display unread message info in status page
815 - tap on that goes to SMS application
819 qvga-normal & normal in "/sys/bus/spi/devices/spi2.0/state" .
824 Keep database of locations and cells I have seen.
825 Don't add duplicates that are within 100m... say 3 seconds or arc.
827 ?? Create a key by interleaving bits from lat and long
828 That gives discontinuities.. but we only need to search 2 places.. well, 4.
829 So if we want lat==a..b and long==c..d
830 We find the most sig bit in which a and b (resp c and d) differ
833 ----------------------------------------------------
834 What happens when I type text. I might want to:
836 - make a phone call .. or SMS
837 - look up name in address book
840 - lookup in shopping list
842 Maybe each 'task' can register a text handler.
843 They get called when text changes and can update their name??
844 They could make themselves active, but hopefully only one would do that.
845 How could 'address book' show a list of possibles?
847 I have outgoing calls sortof working.
849 - gsmd to know and track status in 'incoming'.
850 - wait for atchan to be set up so I don't have to press twice DONE
851 - clean text when call completes
852 - steal keyboard input for touchtones ??
854 - address book lookup
857 ----------------------------------------
858 Main page currently has
859 two columns for selection/status
860 buttons at bottom for action
862 Want text input line at the top for e.g. phone number,
863 contact name, calculation, note search
864 But when not typing anything it is visually unpleasant.
865 For buttons at bottom, they simple provide more space.
866 That doesn't work so well at the top.. unless we can do something with the
867 'gravity' setting .. seems unlikely.
868 So I want something permanent there when there is no input.