Commit graph

1890 commits

Author SHA1 Message Date
ehouse
d5d29adc0c Change util function to use signed type; other cleanup to compile with various features. 2007-12-05 06:28:51 +00:00
ehouse
1926c84825 Change state icon even when not doing work to get it to show up (unconnected) earlier. 2007-12-05 06:26:21 +00:00
ehouse
e4c2143aed Fix dialog title; send heartbeat based on when connected even if no
messages yet received; reset bt connection on palm in two stages;
remove unused param.  Change version number for beta.
2007-12-03 01:20:32 +00:00
ehouse
9ec0177592 Log BT lib version -- toward refusing to run or alerting user of broken Treo650 (version 1). 2007-12-03 01:18:59 +00:00
ehouse
86f5193801 Fix compilation errors. Not tested. 2007-12-03 01:18:13 +00:00
ehouse
da93ed5b31 Don't use uninitialized values as port numbers; use match for set as well as get. 2007-12-03 00:45:09 +00:00
ehouse
f0e21dbd86 Fix bug showing remote/robot moves only on host to include client too. 2007-12-02 22:07:24 +00:00
ehouse
5457ea1b59 replace all __FUNCTION__ with __func__ 2007-12-02 19:13:25 +00:00
ehouse
25c4368231 Start adding ability to listen on multiple sockets and to dynamically
change the set listened on.  There's still some debugging to do but
nothing that worked before is broken.  Also begin to accept unique
prefixes (e.g. g for get) for commands and attributes on the control
port.  Note that relay-related code in comms seems broken now, but is
without this checkin.
2007-12-01 15:00:30 +00:00
ehouse
a560c9f8a8 Add files forgotten with last checkin; add additional parameter to
addListener so listeners can be removed on reset.
2007-11-28 03:59:26 +00:00
ehouse
e1d5632a7b Re-add direct-via-ip transport, and implement for linux in order to
better test heartbeats.  Fix so can play against Palm over BT.
Assertions failing on Linux when reset, but it's otherwise done.
2007-11-26 02:58:25 +00:00
ehouse
ee726968b0 Don't draw negative number of tiles left. 2007-11-25 15:12:22 +00:00
ehouse
6e71f8197e Add file and line number to debug version of realloc and free. 2007-11-22 05:04:40 +00:00
ehouse
022317b47a Exit on unexpected params; better testing when launching; use bash to create pid file. 2007-11-22 04:59:11 +00:00
ehouse
4c8cf98d24 Add and set a compile-time option so comms will set a periodic timer
and use it to send and check for heartbeats over any transport.
Caller must supply a reset proc which is called when heartbeat hasn't
been received in too long.  No changes required to comms protocol, but
that means the heartbeat interval is fixed at compile time: can't be
negotiated, and the two ends had better agree.  Currently tested with
linux host and PalmOS guest, where only the first heartbeat failure is
recovered from.  So there's some debugging to be done still.
2007-11-18 23:43:27 +00:00
ehouse
cb1222c0f9 Make cooperation in a heartbeat scheme a compile-time option. This is
meant to allow comms to take over heartbeats.
2007-11-18 23:38:56 +00:00
ehouse
f3d67cfb6c Fix bug reassembling packets; advance credit on each send/receive.
With this checkin rfcomm works between two Treos and between Treos and
linux, though with plenty of bugs around reconnecting yet to find.
However, it turns out that even using rfcomm a Treo650 gives no notice
to the other device when shutting down the connection, so rfcomm
doesn't help.  Rfcomm is probably not worth using, but the code's now
here and can be turned on in the Makefiles.
2007-11-18 17:57:28 +00:00
ehouse
cfb01d8f3d Deal with incoming fragmented rfcomm packets; log packet contents. 2007-11-15 14:40:56 +00:00
ehouse
d6163b62ff Add code, disabled in Makefile, to use rfcomm rather than l2cap for
data with the goal of detecting disconnects more quickly.  Stops
working after a few packets (client only tested against host on linux
so far), and doesn't compile for ARM yet, but the framework is there.
Am framing packets on Palm side which may not be necessary.
2007-11-15 14:39:33 +00:00
ehouse
ac42b5e7d6 fix oversized font when scoreboard miniwindow has two lines. 2007-11-14 05:57:12 +00:00
ehouse
1094680ee7 quick hack at framing rfcomm packets 2007-11-14 05:53:28 +00:00
ehouse
6b834cce4a Add ability via compile-time flag to connect via rfcom rather than
l2cap.  Works with two caveats: assumes l2cap-style complete packets
(no framing), and has problems with linux sdp system's tendency to
retain records long after sessions are closed.
2007-11-13 15:20:33 +00:00
ehouse
8dbfe4ed79 fix new compiler warnings; daemonize, and add handler to kill child if
parent dies so that script can kill based on pid file.
2007-11-13 03:53:10 +00:00
ehouse
74a30ffe82 init.d style script for starting and stopping relay 2007-11-13 03:50:41 +00:00
ehouse
ef19abbfd9 Fix reconnect bug: when master's in initial state but listening socket
already inited, shift state to listening
2007-11-10 17:54:05 +00:00
ehouse
0291ec1e75 Turn on self-spawning: main loop should never crash but exists only to
respawn child when it does.  Add crash command to test this.  Add
ability to set logging level from ctrl port.
2007-11-10 05:41:49 +00:00
ehouse
6db5eed156 Add English strings as starting point for translation 2007-11-08 05:18:04 +00:00
ehouse
bdb06cbdf8 Use a single general-purpose callback passed into palm_bt_doWork where
it's needed, removing those passed into _init and _send.  When client
is unable to connect to host, raise alert to user and give choice to
continue trying.  Clear 'suspendBT' flag when user manually resends or
opens different game.  Currently this happens only on guest's failure
to find registered SDP; should also extend to remote device not
running at all and to host failure to send to guest.
2007-11-07 13:40:56 +00:00
ehouse
36c40f3375 Use fixed action queue and memcpy rather than rotating buffer; eliminate sequential duplicates of most actions. 2007-11-06 04:05:11 +00:00
ehouse
383847e75c Fix typo breaking compile. 2007-11-05 03:42:27 +00:00
ehouse
3060888264 Update BT code to advertise and search sdp records and use psm reported to work with new Palm
code.  Log btaddr after converting from name.
2007-11-05 03:38:00 +00:00
ehouse
de640cda98 Update BT code to advertise and search sdp records and use psm reported to work with new Palm
code.  Get rid of pthreads dependency which was for logging only.
2007-11-05 03:17:07 +00:00
ehouse
41936fe18a Byte-swap psm field to callback on ARM: now both client and host work. Move SDP-related constants out where linux can use too. 2007-11-03 22:04:06 +00:00
ehouse
880254c17f Fix tray hanging below main window; draw pending tiles white-on-black as on other platforms. 2007-10-24 12:46:15 +00:00
ehouse
e0f5fcf280 Instead of three fixed-sized fonts, choose fonts (lazily) based on the size of the rect into which it's to be drawn. 2007-10-23 03:08:47 +00:00
ehouse
3480df738c Add ARM support for functions and types required for UUID/PSM lookup.
Almost works: if the ARM build is running as host, all's well; but if
it's client, gets btLibL2DiscConnPsmUnsupported after trying to make
an l2c connection.
2007-09-30 17:33:19 +00:00
ehouse
556dbf46e3 move LOG_OFFSET 2007-09-30 17:22:38 +00:00
ehouse
ef31e3688c fix log_hex to print nibbles in right order. 2007-09-27 02:56:35 +00:00
ehouse
104a173c5d Publish (master) and look for (slave) SPD record so that we're looking for our app and not just BT when connecting. I hoped this would prevent T650s from crashing when nothing's running. It doesn't, but it's the right way to connect, and will allow better error messages or retry logic. Compiles only on 68K at the moment. 2007-09-15 13:50:07 +00:00
ehouse
cc4aeaee8c Turn BT back on as default and up version preparing for next release. 2007-09-15 13:47:28 +00:00
ehouse
473d506611 add logging to help catch a recurring assertion 2007-09-15 13:46:59 +00:00
ehouse
40fdec22a2 up version number for dot release. 2007-08-27 12:43:26 +00:00
ehouse
f0b36895d7 If we get keyUp event, override earlier determination that this device doesn't get them. This works around Tungsten double-key bug. Better fix will be to use the right FtrGet constants to set generatesKeyUp. 2007-08-22 02:36:13 +00:00
ehouse
ab6ed444bb add fnav resource for password dialog, and use it if device has fiveway.
Otherwise use FrmSetFocus.  This works around a bug where key event that
leaks through from parent dialog dismisses dialog (whereupon another comes
up, and eventually cursor is left flashing on parent.)
2007-06-18 13:21:36 +00:00
ehouse
eeafb5c4f2 reset in/out var before each call to util_askPassword 2007-06-10 14:54:47 +00:00
ehouse
719fc3889c turn off BT; remove rc designation so can ship 2007-06-09 18:09:21 +00:00
ehouse
c911780c37 fix to build with relay turned on (part 2) 2007-06-08 03:20:09 +00:00
ehouse
a1ebd16a5a fix to build with relay turned on 2007-06-08 03:15:52 +00:00
ehouse
2f925349a6 Fix so can without BT, and so compiler can be specified to Makefile. 2007-06-02 02:07:45 +00:00
ehouse
edfdda6fd2 Fix so compiles curses-only, and so curses cell can be 2x1 (for square board) 2007-06-01 02:08:04 +00:00