0

Adafruit Bluefruit LE UART Friend -> Sending "page up" as HI
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit Bluefruit LE UART Friend -> Sending "page up" as HI

by mrbaloo on Mon Jun 18, 2018 2:04 pm

Hi

I'm new into the Adafruit Bluefruit LE UART Friend + Arduino. I have successfully got the Adafruit Bluefruit LE UART Friend to connect to my phone and I can also send text messages using two different assigned push buttons using Command mode and AT-commands.

However, I would like to send "Page Up" and "Page Down" instead of just text messages. Is there a way of sending these Control key codes to my phone?


/mrbaloo

mrbaloo
 
Posts: 4
Joined: Mon Jun 18, 2018 2:02 pm

Re: Adafruit Bluefruit LE UART Friend -> Sending "page up" a

by mrbaloo on Sun Jul 22, 2018 3:38 am

Hi

I have now read the official "introducing document" once again. I have now found the AT+BLEKEYBOARDCODE command. This command seems to do exactly what I'm aiming for.

HID keyboard codes are found here: http://www.freebsddiary.org/APC/usb_hid_usages.php

So in my example:

Code: Select all | TOGGLE FULL SIZE
# send PAGE UP
AT+BLEKEYBOARDCODE=00-00-4B
OK
# Indicate that the keys were released (mandatory!)
AT+BLEKEYBOARDCODE=00-00
OK



So PAGE UP = 4B, PAGE DOWN=4E, RIGHT ARROW=4F and LEFT ARROV=50.

I will try this code as soon as possible!

/mrbalooo (happy!)

mrbaloo
 
Posts: 4
Joined: Mon Jun 18, 2018 2:02 pm

Re: Adafruit Bluefruit LE UART Friend -> Sending "page up" a

by KingZi0n on Wed Sep 05, 2018 6:12 pm

Hey I am just wondering if this ever ended up working for you? I am trying to send the PGUP command to my iPhone using the AT command you suggest but it doesn't seem to be working.

KingZi0n
 
Posts: 4
Joined: Sun Sep 07, 2014 7:36 pm

Re: Adafruit Bluefruit LE UART Friend -> Sending "page up" a

by mrbaloo on Sat Sep 08, 2018 9:39 am

Hi, I have not tried the solution yet. I Think this will be my Winter Project to finish.

mrbaloo
 
Posts: 4
Joined: Mon Jun 18, 2018 2:02 pm

Re: Adafruit Bluefruit LE UART Friend -> Sending "page up" a

by KingZi0n on Thu Sep 13, 2018 6:22 pm

Hey so I got it working. I had to do a special sequence of resetting the Bluefruit to get it to reliably connect to the iPhone, but once connected I was able to make it send various standard characters like "A" and "B" etc. but Page Up and Page Down just didn't seem to work. Did some digging and found out that Page Up and Page Down are not supported by iOS, you need to send Apple Key + Up Arrow etc. I looked into sending the proper modifiers to produce the Apple Key but it turned out being more work than it was worth. Ended up using Up and Down arrow to slowly navigate a page. Also discovered that in Safari on iOS that Spacebar will move the page down, so I did set that up to work.

This would likely work with an Android phone but I haven't tested it.

If someone does figure out the proper codes to send the Apple Key modifier please do share.

KingZi0n
 
Posts: 4
Joined: Sun Sep 07, 2014 7:36 pm

Re: Adafruit Bluefruit LE UART Friend -> Sending "page up" a

by mrbaloo on Fri Sep 14, 2018 9:09 am

KingZi0n wrote:Hey so I got it working. I had to do a special sequence of resetting the Bluefruit to get it to reliably connect to the iPhone, but once connected I was able to make it send various standard characters like "A" and "B" etc. but Page Up and Page Down just didn't seem to work. Did some digging and found out that Page Up and Page Down are not supported by iOS, you need to send Apple Key + Up Arrow etc. I looked into sending the proper modifiers to produce the Apple Key but it turned out being more work than it was worth. Ended up using Up and Down arrow to slowly navigate a page. Also discovered that in Safari on iOS that Spacebar will move the page down, so I did set that up to work.

This would likely work with an Android phone but I haven't tested it.

If someone does figure out the proper codes to send the Apple Key modifier please do share.


Good to hear that you made the Connection work out.

mrbaloo
 
Posts: 4
Joined: Mon Jun 18, 2018 2:02 pm

Please be positive and constructive with your questions and comments.