Commit graph

26 commits

Author SHA1 Message Date
ehouse
a79d36a150 Use a timer to avoid trying to get an ACL connection too frequetly.
This seems to trigger crash Treo650s far less often than constantly
retrying.
2007-05-26 22:51:25 +00:00
ehouse
9a86b69527 If BT is off, ask user to turn it on only once. If cancels, warn that
it must be turned on, and don't attempt to turn it on again.  This
prevents BTLib from repeatedly asking for permission to turn BT on.
2007-04-15 16:46:17 +00:00
ehouse
0423ef6152 Return null rather than allocing bt storage if unable to open bt library. 2007-04-13 08:47:22 +00:00
ehouse
5334876568 comment out assert that doesn't seem to matter 2007-03-17 17:31:01 +00:00
ehouse
66d8a99bb1 Put back code to associate service record with listening socket, but
ifdef'd out as it doesn't seem to make any difference.
2007-03-17 15:34:24 +00:00
ehouse
3cf22d6302 compare only six bytes of struct ARM pads to 8. 2007-03-15 05:06:56 +00:00
ehouse
ca849ea934 define constant so tests work on ARM too. 2007-03-09 03:00:44 +00:00
ehouse
129f551737 close and reopen bt module with every new game to fix, badly, client's
failure to connect if it's restarted before host; add event and use to
retry BtLibSocketListen when fails (since failure is usually
temporary).
2007-02-05 04:20:13 +00:00
ehouse
6af89b4182 Add assert; don't call comms if has been set to null (fixes device
reset); fix failure to install connCB (removes need to manually resend
messages when client starts up first.)
2007-02-04 17:13:01 +00:00
ehouse
49d0d2b8f8 Turn on BT so 4.3a4 can have a non-M rev number; up version for 4.2. 2007-02-03 20:36:22 +00:00
ehouse
c06df68133 fix crash when FIVEWAY not on. 2006-11-12 14:28:43 +00:00
ehouse
4e7ed26704 Fix messages getting dropped when remote device isn't connected by, on
getting a new connection, making a callback that calls resend_all().
This means a lot of duplication, but duplication is free with
bluetooth.  The underlying problem is that packets are reported as
sent not when acked by the other side, but when passed to a lower
level that may not be connected at all.
2006-11-11 22:52:39 +00:00
ehouse
1aa6d81177 When bt init fails, put up alert; check for failure after and don't
crash; erase bt status area even when no comms in order to erase after
turning bt off; in connect dlg, use a trigger rather than field and
button for host name.
2006-10-15 16:14:42 +00:00
ehouse
ddecfad8d1 get rid of extra log statement 2006-10-11 02:02:53 +00:00
ehouse
e63ad30e52 Add a bit more logging; do a better job of changing roles. Now can switch
roles with a new game and communication starts without a restart of the
app.
2006-10-07 03:40:29 +00:00
ehouse
7cbc781a07 Add quick hack to show BT connect state on main board, to be replace
by icons or something prettier later.  For new games dialog, replace
hard-coded list of controls to ignore with a runtime list.  This
allows checkboxes and fields to be enabled and disabled more easily.
Works around Palm's lack of a control state meaning "visible but
inactive" that works for all form elements.
2006-09-24 17:56:14 +00:00
ehouse
a88d079029 Add debug menu and in response dump bt state to stream for display.
Track sends and receives.  Add listening state for master, and don't
reset its acl when slave goes away.
2006-09-23 22:58:33 +00:00
ehouse
aee519e453 Don't use service records; don't reset connection state as part of
reset for new game; handle case where callback happens inside of
BtLibLinkDisconnect call.
2006-09-23 15:24:30 +00:00
ehouse
e17a442964 strutils macro change; tweak so compiles non-DEBUG and without Bluetooth 2006-09-15 07:42:10 +00:00
ehouse
d06daad4f0 Names change only: it's actions, not events, that are postponed. 2006-09-14 01:57:40 +00:00
ehouse
3b98337eec Better handling of disconnect and reconnect; esp. slave will keep
trying to connect after losing contact with server.  With this
checkin, a game between palm and linux can be interrupted by either or
both and restarted, with either in either role.  Haven't tested
palm-on-palm yet.  App stop speed is much better now too.
2006-09-14 01:38:09 +00:00
ehouse
c068126c56 tweaks to re/connect logic; process incoming data from main event loop
and enqueue more than one at a time; wipe existing queue when reinited.
2006-09-10 18:34:57 +00:00
ehouse
f46ae953e8 Lots of changes aimed at allowing to quit and restart in the middle of
a BT game: track states so can shutdown cleanly; transition from
master to slave; mechanism to defer work from callbacks to the main
loop.  Can now quit and restart as guest against host on linux.  Have
not tested between two Treos.
2006-09-08 07:06:21 +00:00
ehouse
29c8b461b8 hardcode psm (for now), and remove spd lookup stuff. Was needed to
connect to linux server which doesn't add spd records yet.
2006-08-29 13:23:00 +00:00
ehouse
7d48f2e430 Put up BT device browser while user is picking connection method
rather than when trying to send for first time, then pass address
through from conns dialog to bt code.
2006-08-26 21:12:10 +00:00
ehouse
3c6405d0d1 First shot at bluetooth support (turned off in Makefile by default).
A full robot vs. robot game now works between two Treos.  Added UI to
choose BT as transport mechanism, and added new send proc to establish
socket connection between host and guest.  Works only for two devices:
no piconet yet.  No error recovery, ability to quit game in middle,
start new game, etc.
2006-08-23 04:44:55 +00:00