PlayStation 3 Bluetooth Remote

Questions and comments specific to a particular plugin should go here.

Re: PlayStation 3 Bluetooth Remote

Postby jitterjames » Thu Sep 03, 2009 2:35 am

so, no one has figured out how to get enduring events working again with the newer versions of EG? Does anyone know what happened to the core EG code that broke the plugin?

I am using the latest version of EG and it works, but without enduring events so I can't do short press, long press, or autorepeat.

which kind of sucks! I would go back to a 3.6 version but I need the latest version to run the new MCE/vista blaster plugin.

It is a shame because the ps3 remote worked beautifully with EG before the change. Instant response and great reliability, way better than IR and no pointing!
User avatar
jitterjames
Experienced User
 
Posts: 649
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada

Re: PlayStation 3 Bluetooth Remote

Postby jitterjames » Thu Sep 03, 2009 3:45 pm

OK. I managed to fix the problem by lobotomizing part of the code.

This is based on the plugin that comes with the latest version of EG (3.7.r1194)

the result is that long keypresses no longer work, but you can use enduring events so you can get autorepeat and "jump if long keypress" to work again. With a few changes to your macros you regain all the functionality that you had with .S and .L events.

the problem seems to have something to do with threading, but this is a topic I know nothing about. maybe someone else will have some suggestions.

here's the code segment I edited. It starts around line 1037

if evtName == "Release":
#if self.sleepTime > 0:
# self.Timer2 = TimerThread(self.plugin, "Timer2", self.sleepTime, prefix, "Sleep")
# self.Timer2.start()
#if self.hibernateTime > 0:
# self.Timer3 = TimerThread(self.plugin, "Timer3", self.hibernateTime, prefix, "Hibernate")
# self.Timer3.start()

if self.ps3Release:
self.plugin.TriggerEvent(evtName)
self.maskRegularEvent = False
else:
if not self.maskRegularEvent or not regularEvent:
if elapsedTime > self.sleepTime and self.sleepTime > 0:
self.plugin.TriggerEvent("WakeUp")
self.zoneName = "None"
if self.ps3Zone and self.zoneName != zoneName and zoneName != "none":
self.plugin.TriggerEvent(zoneName)
self.plugin.TriggerEnduringEvent(evtName)
#if elapsedTime < self.shortKeyTime and evtName == self.evtName:
# self.Timer1 = TimerThread(self.plugin, "Timer1", self.longKeyTime, prefix, evtName + ".M")
# self.Timer1.start()
# eg.TriggerEvent(evtName + ".D", prefix = prefix)
#else:
# self.Timer1 = TimerThread(self.plugin, "Timer1", self.longKeyTime, prefix, evtName + ".L")
# self.Timer1.start()
# self.Started = True
#self.evtName = evtName
#self.zoneName = zoneName
#self.regularEvent = regularEvent


if not regularEvent:
self.maskRegularEvent = True
Attachments
__init__.py
(53.83 KiB) Downloaded 226 times
User avatar
jitterjames
Experienced User
 
Posts: 649
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada

Re: PlayStation 3 Bluetooth Remote

Postby jitterjames » Thu Sep 03, 2009 3:48 pm

couldn't get colour AND code indentation in the same post!

Code: Select all
                        if evtName == "Release":
                            #if self.sleepTime > 0:
                            #    self.Timer2 = TimerThread(self.plugin, "Timer2", self.sleepTime, prefix, "Sleep")
                            #    self.Timer2.start()
                            #if self.hibernateTime > 0:
                            #    self.Timer3 = TimerThread(self.plugin, "Timer3", self.hibernateTime, prefix, "Hibernate")
                            #    self.Timer3.start()
                            if self.ps3Release:
                                self.plugin.TriggerEvent(evtName)
                            self.maskRegularEvent = False
                        else:
                            if not self.maskRegularEvent or not regularEvent:
                                if elapsedTime > self.sleepTime and self.sleepTime > 0:
                                    self.plugin.TriggerEvent("WakeUp")
                                    self.zoneName = "None"
                                if self.ps3Zone and self.zoneName != zoneName and zoneName != "none":
                                    self.plugin.TriggerEvent(zoneName)
                                self.plugin.TriggerEnduringEvent(evtName)
                                #if elapsedTime < self.shortKeyTime and evtName == self.evtName:
                                #    self.Timer1 = TimerThread(self.plugin, "Timer1", self.longKeyTime, prefix, evtName + ".M")
                                #    self.Timer1.start()
                                #    eg.TriggerEvent(evtName + ".D", prefix = prefix)
                                #else:
                                #    self.Timer1 = TimerThread(self.plugin, "Timer1", self.longKeyTime, prefix, evtName + ".L")
                                #    self.Timer1.start()
                                #    self.Started = True
                                #self.evtName = evtName
                                #self.zoneName = zoneName
                                #self.regularEvent = regularEvent

                            if not regularEvent:
                                self.maskRegularEvent = True
User avatar
jitterjames
Experienced User
 
Posts: 649
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada

Re: PlayStation 3 Bluetooth Remote

Postby CHeitkamp » Thu Sep 03, 2009 6:15 pm

Here an almost complete rewrite of the PS3 BD Remote plugin.
It's not fully compatible to the old version.

Its tested with EventGhost Version: 0.3.7.r1194

Changes:
  • Uses the new eg.WinApi.HID class for the HID stuff.
  • Shows only the HID entries with matching VID+PID
  • Timer-based enduring events replaced with eg.TriggerEnduringEvent
  • Events are now PS3.Button.XXX, to be "compatible" to the default HID plugin
  • Some buttons needed to be renamed to make multi-button easier
  • Multiple button presses are now fully decoded e.g. PS3.Button.L1+R1+Enter (remark: only the following keys are multi-button compatible: L1..L3, R1..R3, PS, Enter, Triangle, Circle, Cross, Square, Select, Start, Top, Right, Down and Left
  • A new action for getting the battery level of the remote. Level: 0 (emtpy) - 5 (full). (remark: to get the battery level at least one key must be received.
  • This plugin version works, even if the battery is not completly full :)
  • The plugin warns if the battery level is < 2 (=almost empty)
  • Zone events are no longer avaible, because they were not fully compatible with the multiple keypress detection
  • The sniff-mode is not implemented, now. I'll do it in one of the next releases.
  • The parser does some plausibility checks on the received data, because sometimes the data gets trashed. E.g. on connection loss or reconnect.
Attachments
PS3.zip
(5.48 KiB) Downloaded 2431 times
CHeitkamp
Plugin Developer
 
Posts: 49
Joined: Sun Jan 27, 2008 12:42 pm
Location: Münster / Germany

Re: PlayStation 3 Bluetooth Remote

Postby Bartman » Thu Sep 03, 2009 6:18 pm

@CHeitkamp
Cool. Did you have any problems with the eg.WinApi.HID stuff?
I added some code to check if the device name given by System.DeviceAttached matches the product and vendor id. Does this work with BT HID devices?
Bartman
Plugin Developer
 
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: PlayStation 3 Bluetooth Remote

Postby jitterjames » Thu Sep 03, 2009 9:40 pm

sounds promising.

# Some buttons needed to be renamed to make multi-button easier

did you actually rename any of the buttons from the previous version of the plugin?


Code: Select all
# Multiple button presses are now fully decoded e.g. PS3.Button.L1+R1+Enter (remark: only the following keys are multi-button compatible: L1..L3, R1..R3, PS, Enter, Triangle, Circle, Cross, Square, Select, Start, Top, Right, Down and Left

very interesting... So you are saying with just the L* and R* buttons I get 9 unique events? More things for my poor little brain to remember!

It's funny I just finished hacking in a little code to store the battery level in case I wanted to check it!

Good job.
User avatar
jitterjames
Experienced User
 
Posts: 649
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada

Re: PlayStation 3 Bluetooth Remote

Postby deega » Mon Sep 28, 2009 1:45 pm

I've been using the plugin most recently posted to this thread and I'm pretty satisfied with it..

I'm having an issue of a different sort and was wondering if anyone else is seeing the same thing or if there is a solution to the problem I may have overlooked.

I have 2 of these remotes and both of them exhibit this same problem. After a time of inactivity the remote disconnects from BT. Pressing a button on the remote does not reconnect the remote. Pulling the batteries for a couple of seconds and replacing them before pressing a button does reconnect the remote.

I have tried various stacks and subversions of Widcomm 5, Bluesoleil 6, Bluesoleil 2, and MS. My best performance in this area came from Bluesoleil 2, which would reconnect the remote by pressing a button most time but caused mayhem in EG. So I don't use BS2.

My config:

XP Pro SP3, CSR USB BT dongle, latest EG.

Am I alone in the woods on this?
deega
 
Posts: 4
Joined: Sat Sep 12, 2009 5:06 pm

Re: PlayStation 3 Bluetooth Remote

Postby jitterjames » Fri Oct 02, 2009 2:49 pm

I've never noticed this happening on mine, but I have a power switch on mine that I frequently turn off and on in order to save the batteries, so it's possible that that is preventing me from noticing this behaviour.
User avatar
jitterjames
Experienced User
 
Posts: 649
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada

Re: PlayStation 3 Bluetooth Remote

Postby CHeitkamp » Fri Oct 02, 2009 2:53 pm

I've never seen it, too. But I don't use it often.

Maybe the batteries are nearly empty?
Then the remote will send a few codes and die a little bit later.

What are the last messages before the disconnect?
CHeitkamp
Plugin Developer
 
Posts: 49
Joined: Sun Jan 27, 2008 12:42 pm
Location: Münster / Germany

Re: PlayStation 3 Bluetooth Remote

Postby derelict » Sat Dec 12, 2009 11:55 pm

any update about when sniff mode will be supported ?

or is there anyone out there... who is able to use the PS3 Remote on Windows 7 with the latest eventghost WITHOUT having to install all that (old) widcomm mess ? or better said, with the "default" windows 7 bluetooth stack ?

If so... how ?

Greets

Marcel
derelict
 
Posts: 35
Joined: Sun Mar 01, 2009 12:55 pm

Re: PlayStation 3 Bluetooth Remote

Postby CHeitkamp » Thu Dec 17, 2009 3:04 am

derelict wrote:any update about when sniff mode will be supported ?

I'm still working on it - but this is a low priority task for me.

derelict wrote:or is there anyone out there... who is able to use the PS3 Remote on Windows 7 with the latest eventghost WITHOUT having to install all that (old) widcomm mess ? or better said, with the "default" windows 7 bluetooth stack ?


There is not problem connecting the remote with the Microsoft default stack. I created a Wiki article with a detailed description.
I've tested it with Windows 7 Professional english and german. With and without Widcomm addon stack 6.2.1.100 installed.
CHeitkamp
Plugin Developer
 
Posts: 49
Joined: Sun Jan 27, 2008 12:42 pm
Location: Münster / Germany

Re: PlayStation 3 Bluetooth Remote

Postby derelict » Thu Dec 17, 2009 7:18 am

I know, that its working fine on windows 7 with either stack.

My main concern is the "standby" mode... Which is, from my understanding, only supported or possible with the (older?) widcomm stack!?

You said sniff mode (remote powersaving) is not your main priority... So how are you using the ps3 remote these days with the latest eventghost without replacing the batteries every two weeks?

How are others using the remote?

For me that powersaving mode is strongly needed and required, because without it, the remote is more or less useless?!

Is there anything i could help you with, in order to get that functionality back into the latest ps3 plugin?

Would it be maybe possible to run some kind of a second (old) eventghost instance just to take care of putting the remote into standby mode?

Greets marcel
derelict
 
Posts: 35
Joined: Sun Mar 01, 2009 12:55 pm

Power, Power ...

Postby superarcan » Thu Feb 04, 2010 2:02 am

Ok, for 3-4 weeks i try to find a solution to power problem, not a result.
So i decide to do it myself .

Application is not a plug-in, it is an exe and is very very beta. If prove to work , i make it more cool/usable.

I test on: Windows XP 32bit , Microsoft Bluetooth stack, last eventghost and last version of PS3 plug-in, Plz test in other configurations, but Windows 7 i do not think it work, and also with other stack i do not think it work.
The app when run ck to see if 5 min pass from the last time you use the remote and if so try to put it to sleep.

The app can interact/disturb with other bluetooth HID device, like mouse , keyboard ...
At start up may disturb bluetooth communication (10s).
In eventghost log some error must appear. is ok like this.

PLZ ck to see if life of battery is better.

if all work fine i make this a windows service or a systray application.
PLZ feedback.
Attachments
BDRemotePowerFix.zip
(57.75 KiB) Downloaded 556 times
superarcan
 
Posts: 12
Joined: Thu Feb 04, 2010 1:28 am

Re: PlayStation 3 Bluetooth Remote

Postby Bartman » Thu Feb 04, 2010 8:36 pm

@superarcan
what does the plugin do?

I added some basic write support to the HID code a few weeks ago. Does this help?
Bartman
Plugin Developer
 
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: PlayStation 3 Bluetooth Remote

Postby superarcan » Fri Feb 05, 2010 1:10 am

Bartman wrote:@superarcan
what does the plugin do?...

its reading some info in bt stake and disconect the device (The remote it's start back to work in ~1s after u press any key)
because i can't check the remote power mode i do not know if it is working or not, but because bt report as not seeing/not speak back from remote ,
like u pres \PS\ key 6s i think is working.
superarcan
 
Posts: 12
Joined: Thu Feb 04, 2010 1:28 am

PreviousNext

Return to Plugin Support

Who is online

Users browsing this forum: No registered users and 3 guests