Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation addition needed to man page for libcwiid #39

Open
knoxvillesjoker opened this issue Aug 8, 2020 · 0 comments
Open

Documentation addition needed to man page for libcwiid #39

knoxvillesjoker opened this issue Aug 8, 2020 · 0 comments

Comments

@knoxvillesjoker
Copy link

For Python console these are the commands to pay attention to. They are not clearly documented anywhere:

You will need to pair the wiimote via the bluetooth console with these set of commands
bluetoothctl
scan on
(hit sync button on wiimote) once it shows up
pair mac_addr_of_wiimote
Note: do not trust or connect wiimote here as it will break cwiid, wminput as they use a separate authentication mechanism.
This step is only needed as the recent updates for Bluetooth Low Energy(BTLE) and hcitool scanning functionality slightly broke the existing library infrastructure in more modern versions of linux.

to conennect use this invocation set:
import cwiid
name = cwiid.Wiimote()
(at this point hit sync button on bottom of remote)
if no errors you are connected

rpt_modes are invoked to report with the following nomenclature
wm where wm is the name of your defined instance of the cwiid.Wiimote() invocation
RPT mode options are as follows:
RPT_STATUS minimal report
RPT_NUNCHUK report on the nunchuk
RPT_MOTIONPLUS report on the motionplus adapter
RPT_IR report on the IR function, requires bar accessory to work
RPT_EXT reports all readings on whatever connected device
RPT_CLASSIC report on the classic controller
RPT_BTN report on the wiimote controller
RPT_BALANCE report on the balance controller
RPT_ACC report on the wiimote accelerometer readings
so wm.rpt_mode= cwiid.RPT_BTN sets it to report wiimote button status information

wm.led=# where # equals a decimal value 1 - 15 noted here: https://github.com/abstrakraft/cwiid/blob/master/libcwiid/command.c
wm.rumble=# where # equals a uint8_t value noted here: https://github.com/abstrakraft/cwiid/blob/master/libcwiid/command.c

dir(cwiid) options are defined here: https://github.com/abstrakraft/cwiid/blob/master/python/cwiidmodule.c under cwiid constants
wm.state reports what the current readings are from the wiimote based upon the currently set report mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant