- Keymap layer bug: during space is pressed(mousekey) press Fn(HHKB) then release space before Fn, in result HHKB layer is locked(toggled) unintentionally.
To enable BT when USB powered it still needs to turn siwtch on, Lipo consumes quinscent current at 5V converter in vain.(Not good)
Idea 2:
(USB) +---(Lipo)
| | |
| | +------+
| | |Switch|
| | +------+
| +-------+ |
+-|Charger| |
| +-------+ | +---+
| +-----+ |MCU|----+ Controlled by firmware
| |DC 5V| +---+ | On: Lipo powered
| +-----+ | | Off: USB powered
| | | |enable
+--------------+ | +------+ +-----+
|Power Selector|-----+---|DC3.3V|-----|RN-42|
+--------------+ +------+ +-----+
MCU can controlled power of RN-42 without hardware switch.
When USB powered and switch is on Lipo consumes quinscent current at 5V converter in vain.(Not good)
Idea 3:
(USB) +---(Lipo)
| | |
| | +------+
| | |Switch|SPST(or without)
| | +------+
| +-------+ |
+-|Charger| |
| +-------+ | +---+
| | |MCU|----+ Controlled by firmware
| | +---+ | On: Lipo powered
| | | | Off: USB powered
| | | |enable
+--------------+ +-----+ +------+ +-----+
|Power Selector|-|DC 5V|-|DC3.3V|-----|RN-42|
+--------------+ +-----+ +------+ +-----+
Switch is needed to save Lipo when not used because decent power saving is not available now. If firmware can turn off BT module completely and make MCU deep sleep the switch will be not even needed.
07/16 After fix of voltage dividor on GPIO6, had a trouble that it could not send a char to BT module, though could receive.
Found R8 had wrong 1K resistor and changed to 10K, after that it can send to the module again. Not sure how it had sent with the wrong 1K before.
07/18 On Linux, had an USB related trouble; keyobard or console didn't work for some reason. Changing PID cured this problem. Very annoying, took very long time before resolved it.
In normal sleep the firmware is still running in idle mode, and wakes up about 20 times per second to check ports, update LEDs, etc. During deep sleep, the firmware actually stops runnig some tasks and the LEDs only update about once per second.
To wake from deep sleep there are three ways: (in worst case wake up takes 5ms)
*send a charactor to the UART(first charactor will be lost)
*toggle CTS low to high and wait 5ms
*wake automatically every slot time(<val>*0.625ms)
Once the radio is awake it stay active for exactly 1 second of inactivity and then sleeps again.
Downside: latency and data loss
Disable Output driver Idle or Active (3.1.3)
S%,1000 // set all GPIO pins(0-11) to inputs.
Lower Transmit Power Idle or Active (3.1.4)
SY,<hex> // transmit power setting(takes effect after a power cycle and reboot)
Downside: reducing effective range
Optimizig for Latency
---------------------
By default the firmware is optimized for throughput.
SQ,16 // set latency bit
SQ,0 // unset latency bit
Configuration timer settings
----------------------------
Remote configuration is used for the module to be configured with various commands over Bluetooth(SPP profile only?).
The module has remote configuration timer to allow remote configuration over Bluetooth after power up in Slave mode. In Master modes the remote configuration timer is set to 0(no remote configuration). (In Trigger Master mode the timer is used as an idle timer to break the connection after time expires with no charactors receive.)
ST,0 // no remote, no local when connected
ST,<1-252> // local and remote with timeout in seconds from power up
ST,253 // local only without timeout
ST,254 // remote only without timeout
ST,255 // local and remote without timeout
Android
-------
3.7.1.5 Note: To connect with Android phone the modules must wake up 11ms every 2.5seconds.
Commands
--------
SC,
SM,<val>
SD,
SP,<string> Pin code(alpahnumeric)
SQ,<mask> Special configuration(GPIO, discovery mode, low latency, reboot, UART)