Release [WIP] Master Control - Testers needed


Please try this: Open "/etc/bluetooth/main.conf" and change "Class = 0x000100" to "Class = 0x000540". This should make your Pandora to be discovered as a keyboard instead as a computer. Also make sure that "DisablePlugins" includes "input"

You will need to restart "bluetoothd" afterwards.

Maybe that helps.
Tried it 3 times (always restarted bluetoothd before I changed the class back and forth) and every time MC crashed with a segfault after a couple of seconds:
=======================================================================================

PND : /media/mmcblk0p1/pandora/apps/mastercontrol.pnd

PND_FSTYPE : Squashfs

APPDATADIR : /media/mmcblk0p1/pandora/appdata/mastercontrol

APPDD_FSTYPE : vfat

PND_CPUSPEED :

EXENAME : pandora/run_mastercontrol.sh

ARGUMENTS :

=======================================================================================

[ START ]--- Mount the PND ----------

Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/mastercontrol"

Mounting the Union FS : mount -t aufs -o exec,noplink,dirs=/media/mmcblk0p1/pandora/appdata/mastercontrol=rw+nolwh":"/mnt/pnd/mastercontrol=rr" none "/mnt/utmp/mastercontrol"

[sUCCESS]--- Mount the PND ----------

[ START ]--- Starting the application ( pandora/run_mastercontrol.sh ) ----------

++ id -u

+ '[' 1000 '!=' 0 ]'

+ gksudo -m 'Master Control needs root privileges to run.Please enter your password' id

uid=0(root) gid=0(root)

+ exec sudo -n ./pandora/run_mastercontrol.sh

++ id -u

+ '[' 0 '!= 0 ]'

+ run=0

++ grep g_

++ cut '-d ' -f1

++ lsmod

+ modules=

+ '[' 0 == 0 ']'

++ modprobe gadgetfs

+ result=

+ '[' 0 '!= 0 ]'

++ mkdir -p /dev/gadgetfs

+ result=

+ '[' 0 '!= 0 ]'

++ mountpoint -q /dev/gadgetfs

++ mount -t gadgetfs gadgetfs /dev/gadgetfs

+ result=

+ '[' 0 '!= 0 ]'

+ cp -n pandora/mastercontrol.conf .

+ cp -n pandora/mastercontrol_keydefs.conf .

+ cp -n pandora/pandora.png .

+ pandora/mastercontrol

./pandora/run_mastercontrol.sh: line 60: 2652 Segmentation fault pandora/mastercontrol

+ /bin/true

+ umount /dev/gadgetfs

+ rmdir /dev/gadgetfs

+ rmmod gadgetfs

[sUCCESS]--- Starting the application ( pandora/run_mastercontrol.sh ) ----------

[ START ]--- Restoring the frame buffer status ----------

[sUCCESS]--- Restoring the frame buffer status ----------

[ START ]--- uMount the PND ----------

[ START ]--- Waiting the Union to be available ----------

[sUCCESS]--- Waiting the Union to be available ----------

auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device

rmdir: failed to remove `/mnt/utmp/mastercontrol': Device or resource busy

[ START ]--- Waiting the PND mount dir to be free ----------

[sUCCESS]--- Waiting the PND mount dir to be free ----------

cleanup done

[sUCCESS]--- uMount the PND ----------

=======================================================================================

Return code is : 1
 
Thanks for reporting back. The crashes are caused somewhere in the GUI. Couldn't find out where yet, because gdb refuses to print a complete backtrace  :angry:

I'm currently building a command line tool especially for testing a BT connection. Hope this will help to fix some problems...
 
Last edited by a moderator:
here the dump for Win7 connection

HCI sniffer - Bluetooth packet analyzer ver 2.5
device: hci0 snap_len: 1500 filter: 0xffffffff
> HCI Event: Connect Request (0x04) plen 10
bdaddr XX:XX:XX:XX:XX:XX class 0x12010c type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
bdaddr XX:XX:XX:XX:XX:XX role 0x00
Role: Master
> HCI Event: Command Status (0x0f) plen 4
Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Role Change (0x12) plen 8
status 0x00 bdaddr XX:XX:XX:XX:XX:XX role 0x00
Role: Master
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 1 bdaddr XX:XX:XX:XX:XX:XX type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 1
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
bdaddr XX:XX:XX:XX:XX:XX mode 1
> HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
> HCI Event: Max Slots Change (0x1b) plen 3
handle 1 slots 5
> HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 1
Features: 0xff 0x3e 0x09 0x76 0x80 0x01 0x00 0x80
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr XX:XX:XX:XX:XX:XX mode 2 clkoffset 0x0000
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040
< ACL data: handle 1 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 0
Connection pending - No futher information available
< ACL data: handle 1 flags 0x02 dlen 10
L2CAP(s): Info req: type 2
> HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr XX:XX:XX:XX:XX:XX mode 2 clkoffset 0x0000
> HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x0c ncmd 1
Error: Command Disallowed
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 2
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr XX:XX:XX:XX:XX:XX name 'TheNameOfMyPC'
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Info rsp: type 2 result 1
Not supported
< ACL data: handle 1 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
Connection successful
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 2
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
< ACL data: handle 1 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
MTU 672
> ACL data: handle 1 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 17
L2CAP(d): cid 0x0040 len 13 [psm 1]
SDP SS Req: tid 0x0 len 0x8
pat uuid-16 0x1124 (HID)
max 64
cont 00
< ACL data: handle 1 flags 0x02 dlen 18
L2CAP(d): cid 0x0040 len 14 [psm 1]
SDP SS Rsp: tid 0x0 len 0x9
count 1
handle 0x10008
cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 23
L2CAP(d): cid 0x0040 len 19 [psm 1]
SDP SA Req: tid 0x1 len 0xe
handle 0x10008
max 300
aid(s) 0x0000 - 0xffff
cont 00
< ACL data: handle 1 flags 0x02 dlen 320
L2CAP(d): cid 0x0040 len 316 [psm 1]
SDP SA Rsp: tid 0x1 len 0x137
count 300
cont 08 6F DE 13 52 2C 01 00 00
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 31
L2CAP(d): cid 0x0040 len 27 [psm 1]
SDP SA Req: tid 0x2 len 0x16
handle 0x10008
max 300
aid(s) 0x0000 - 0xffff
cont 08 6F DE 13 52 2C 01 00 00
< ACL data: handle 1 flags 0x02 dlen 84
L2CAP(d): cid 0x0040 len 80 [psm 1]
SDP SA Rsp: tid 0x2 len 0x4b
count 72
aid 0x0000 (SrvRecHndl)
uint 0x10008
aid 0x0001 (SrvClassIDList)
< uuid-16 0x1124 (HID) >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x11 > <
uuid-16 0x0011 (HIDP) > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x656e uint 0x6a uint 0x100 >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x0011 (HIDP) uint 0x100 > >
aid 0x000d (AdditionalProtocolDescLists)
< < < uuid-16 0x0100 (L2CAP) uint 0x13 > < uuid-16 0x0011 (HIDP) > > >
aid 0x0100 (SrvName)
str "Pandora Master Control"
aid 0x0101 (SrvDesc)
str "By Crionic"
aid 0x0102 (ProviderName)
str "HID Input via Pandora"
aid 0x0200 (VersionNumList)
uint 0x100
aid 0x0201 (SrvDBState)
uint 0x111
aid 0x0202 (unknown)
uint 0x40
aid 0x0203 (unknown)
uint 0x0
aid 0x0204 (unknown)
bool 0x1
aid 0x0205 (unknown)
bool 0x1
aid 0x0206 (unknown)
< < uint 0x22 str 05 01 09 06 a1 01 85 01 a1 00 05 07 19 e0 29 e7 15 00 25 01 75 01 95 08 81 02 95 08 75 08 15 00 25 65 05 07 19 00 29 65 81 00 c0 c0 05 01 09 02 a1 01 85 02 09 01 a1 00 05 09 19 01 29 03 15 00 25 01 95 03 75 01 81 02 95 01 75 05 81 03 05 01 09 30 09 31 15 81 25 7f 75 08 95 02 81 06 c0 c0 05 01 09 05 a1 01 85 03 a1 00 05 09 19 01 29 10 15 00 25 01 95 10 75 01 81 02 05 01 09 30 09 31 09 32 09 33 15 81 25 7f 75 08 95 04 81 02 c0 c0 > >
aid 0x0207 (unknown)
< < uint 0x409 uint 0x100 > >
aid 0x020b (unknown)
uint 0x100
aid 0x020e (unknown)
uint 0x0
cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 17 scid 0x0041
< ACL data: handle 1 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0041 result 0 status 0
Connection successful
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 2
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
< ACL data: handle 1 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
MTU 672
> ACL data: handle 1 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
Success
< ACL data: handle 1 flags 0x02 dlen 5
L2CAP(d): cid 0x0041 len 1 [psm 17]
HIDP: Control: Virtual cable unplug
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0041 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 2
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 19 scid 0x0042
< ACL data: handle 1 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 1 status 2
Connection pending - Authorization pending
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
< ACL data: handle 1 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 0 status 0
Connection successful
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0042 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 2
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 1 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0042 flags 0x00 result 0 clen 4
MTU 672
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
Success
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0042 scid 0x0041
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> HCI Event: QoS Setup Complete (0x0d) plen 21
status 0x00 handle 1 flags 0
Service type: 1
Token rate: 0
Peak bandwith: 0
Latency: 2500
Delay variation: -1
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0042 scid 0x0041
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 1 reason 0x08
Reason: Connection Timeout

The "L2CAP(s): Disconn" was the last line before opening the full interface, then I pushed the Bluetooth button, moved the nubs and pressed some keys, exited from the interface and disconnected from windows.
 
I know I'm a little late to the game here, but can I just say: What a fantastic entry to this community :)

People here have been waiting (literally) for years to get a USB/BT HID tool and had almost given it up as impractical.

Bravo!
 
< ACL data: handle 1 flags 0x02 dlen 5 L2CAP(d):

 cid 0x0041 len 1 [psm 17]

HIDP: Control: Virtual cable unplug
That seems to be the problem here, The Pandora is unplugging the virtual cable, which means, it requests to be disconnected from the host (yes, HID is very polite :) ). So, for some reason, Windows is not allowed to use the HID services.

Please try the following:

In a terminal enter (as root):

echo xx:xx:xx:xx:xx:xx [all] > /var/lib/bluetooth/yy:yy:yy:yy:yy:yy/trusts

where xx... is your Windows bdaddr and yy.. is your Pandora bdaddr (not sure if you need to restart bluetoothd)

This should grant access to all services on the Pandora. Now, try pairing again.

If it still not works, remove the directory /var/lib/bluetooth/yy:yy:yy:yy:yy:yy and try once again. 
 
Last edited by a moderator:
I know I'm a little late to the game here, but can I just say: What a fantastic entry to this community :)

People here have been waiting (literally) for years to get a USB/BT HID tool and had almost given it up as impractical.

Bravo!
Thank you. I really appreciate that :)
 
< ACL data: handle 1 flags 0x02 dlen 5 L2CAP(d):

 cid 0x0041 len 1 [psm 17]

HIDP: Control: Virtual cable unplug
 That seems to be the problem here, The Pandora is unplugging the virtual cable, which means, it requests to be disconnected from the host (yes, HID is very polite :) ). So, for some reason, Windows is not allowed to use the HID services.

Please try the following:

In a terminal enter (as root):

echo xx:xx:xx:xx:xx:xx [all] > /var/lib/bluetooth/yy:yy:yy:yy:yy:yy/trusts

where xx... is your Windows bdaddr and yy.. is your Pandora bdaddr (not sure if you need to restart bluetoothd)

This should grant access to all services on the Pandora. Now, try pairing again.

If it still not works, remove the directory /var/lib/bluetooth/yy:yy:yy:yy:yy:yy and try once again.
Nothing... the file is updating correctly even automatically, anyway i restarted the daemon at every trial but with always the same result
 
Nothing... the file is updating correctly even automatically, anyway i restarted the daemon at every trial but with always the same result
Hm, the file is not automatically updated on my Pandora. What SuperZaxxon version are you using? And are you using any 3rd-party bluetooth tools?
 
SZ 1.55 and I'm using the default bt applet/daemon
Sorry, but I'm not able to reproduce your problem. It seems not to be MC-related. As I said, the Pandora (or better the BT stack) refuses access to the HID service, so it must be something in your BT configuration.

But as long as no one else tries with Win 7, I can't be sure about that.
 
No offense meant (I'm really greatfull that you realize something, I already waited years, in your spare time), but what do you think about modularizing Master Control or implementing profiles in it. I hardly need everything (Keyboard, Mouse, Gamepad, Touchscreen) simultaneously, but more often distinctive devices.
 
I hardly need everything (Keyboard, Mouse, Gamepad, Touchscreen) simultaneously, but more often distinctive devices.
Erm... you just need to press the touch screen to cancel what you don't need. Take 2 seconds.  

There is no issue with the action buttons. You just need to configure the gamepad in Steam (in big picture mode)
Really ? I will try this out then. Never paid attention to that option before.  
 
No offense meant (I'm really greatfull that you realize something, I already waited years, in your spare time), but what do you think about modularizing Master Control or implementing profiles in it. I hardly need everything (Keyboard, Mouse, Gamepad, Touchscreen) simultaneously, but more often distinctive devices.
I don't consider a suggestion as offense :) I already thought about that, and actually I think it's a good idea. This would make it easier to add new devices. The gui could be made optional, too.

I will definitely consider this, but for now the primary goal is, to remove bugs and get to tool working as intended.

There is no issue with the action buttons. You just need to configure the gamepad in Steam (in big picture mode)
Really ? I will try this out then. Never paid attention to that option before.  
Yeah. PS3 and XBOX360 controller are auto detected by Steam. Every other controller must be configured. 
 
eah. PS3 and XBOX360 controller are auto detected by Steam. Every other controller must be configured.
Does not work. I configure most of the controls and it still wants to map nubs and more buttons and until they are all configured (which is not possible since there are not enough buttons) it complains about missing controls, so I can't even use this.

Did you actually try it under steam Linux? does it work for you ?
 
Last edited by a moderator:
eah. PS3 and XBOX360 controller are auto detected by Steam. Every other controller must be configured.
Does not work. I configure most of the controls and it still wants to map nubs and more buttons and until they are all configured (which is not possible since there are not enough buttons) it complains about missing controls, so I can't even use this.

Did you actually try it under steam Linux? does it work for you ?
Don't know what you are doing :) . I can save the settings, even without having all buttons assigned. For me, it doesn't complain about missing controls. But if you need more buttons, you can map them in the config file. The controller supports up to 16 buttons.

But note, that the second analog stick is buggy in this version (it's mapped to the first stick internally)
 
Back
Top