Open KorkyraBoyCRO opened 9 years ago
Did you make any progress? What iOS version does your device have? Did you enable "#define DEBUG1" or DEBUG2 or DEBUG3 in acns_data_source.cpp? Those can give you additional output. I am connecting and getting the notifications with my setup here, however it's seems to be a bit buggy/broken. At times I cannot reconnect my iOS device to the Arduino.
FYI: The name of the BLE device (i.e. ANCS Rusk) comes from an XML file. I found out that the provided file in THIS Library (nrf8001_ancs.xml) contains the name "Notif". However, the name "ANCS Rusk" comes from the Nordic Semiconductor library we have to include (ble-sdk-arduino). This implicates that the wrong file is being loaded.
Unfortunately i haven't...i wasn't able cause i didn't have much time. I am nowhere with this at the moment and that makes me sad. I have the latest iOS 8.3. U say you are getting notifications. Are they full i mean like message text, caller ID etc.? I will try to enable those DEGUG, but what should i do with loading wrong file with ANCS Rusk? Can u maybe share you're code if u have made any changes?
Yes, they are full (at least shortened to the size of the display), however only the last notification is shown on the LCD. Calls, Whatsapp, Facebook where shown, I think Hangouts and SMS too. I am testing my setup with an iPhone 5s on iOS 8.3. The XML file: I have no idea, I am currently trying things out that can be related to that. It's a lot of trial and error for me, since I am new to all of this.
It is same to me. A lot of trial and error. I am new too so i know what you mean. I have iPhone 4s. Are you using liquid crystal LCD. I was trying to make it work on 1.3" OLED but it takes up a lot of memory. Can you maybe provide any code, i must say i am jealous i want it to work too :)
I am using the 1602 LCD, as in the example (only without a shield and buttons). I commented most of the code related to those buttons. My code is exactly like in the example. I only adjusted the pin-connection to my setup. So my code won't really help you:) It may be easier for you try to get it to work with the LCD first and then move to your OLED. I am wondering if this library is abandoned, or being worked on by the author(s). Good luck and let me know if you make any more progress.
Hi Guys - I haven’t been working on this too much lately, but I am still trying to keep it current. I just got it upgraded to the latest version of Arduino.
I have been having a problem with reconnecting. The initial connection with the BTLE board works fine. When the phone leaves and comes back, the BTLE connection works fine and from debug it looks like everything is setup right. However ANCS does not seem to be re-enabled. This worked fine in iOS 7.0 but it looks like this bug got introduced in iOS 8.0. I have an old iPhone on iOS still on 7.0 and it works fine. Things seem to be a bit better in 8.3, but I haven’t had much time to play around with it.
Let me know if you figure anything out. If you guys are actively working on this I will try to find time to get my stuff setup and work on it too.
On Jun 4, 2015, at 5:32 AM, momeedees notifications@github.com wrote:
I am using the 1602 LCD, as in the example (only without a shield and buttons). I commented most of the code related to those buttons. My code is exactly like in the example. I only adjusted the pin-connection to my setup. So my code won't really help you:) It may be easier for you try to get it to work with the LCD first and then move to your OLED. I am wondering if this library is abandoned, or being worked on by the author(s). Good luck and let me know if you make any more progress.
— Reply to this email directly or view it on GitHub https://github.com/robotastic/ANCS-Library/issues/9#issuecomment-108807247.
The Rusk Xml shouldn't matter. I just switched the Nordic configure file with the one in the ANCS example.
Sent from my iPhone
On Jun 4, 2015, at 4:33 AM, KorkyraBoyCRO notifications@github.com wrote:
Unfortunately i haven't...i wasn't able cause i didn't have much time. I am nowhere with this at the moment and that makes me sad. U say you are getting notifications. Are they full i mean like message text, caller ID etc.? I will try to enable those DEGUG, but what should i do with loading wrong file with ANCS Rusk?
— Reply to this email directly or view it on GitHub.
Ok thank you guys for everything...well my goal is to make smartwatch so this is very important part for having normal functional smartwatch like ones you can buy on everbuying.com and similar sites. As soon as i make some free time i will try again with this code...i am thinking i just want to get everything displayed on serial monitor for start so i don't need lcd ( i will comment all the code with lcd in it ). I noticed there is a large part of code that is commented and i will just uncomment it cause i think that should be enough to get everything on seal monitor.
@XML File: I think the Nordic file gets loaded anyway. Because inside the ANCS library, there is no string "ANCS Rusk". I searched every file you included. But since the Nordic library gets included too, I checked the Nordic - and that's where the name seems to be coming from. However, I couldn't change the name (edited the Nordic XML file). If I am not mistaken, this XML file is just a config/settings file for nrfgo Studio. Which in return exports the settings.h file. In the ANCS Library, there is a "settings.h" and a "my_settings.h" (I guess either you or guyzmo created this one) - but "my_settings.h" also does not seem be loaded anywhere.
Regarding the disconnects: It's been working fine for me the last 2 or so hours. I turn bluetooth on my iphone off, wait a little, turn it back on - call myself - LCD and Serial Console get updated.
The initial connection seems to have been my problem. When changing the code and uploading to my UNO. So now I upload everything to my UNO, open the Serial Console, then I reset the UNO (Reset Button), remove the UNO from my iPhone, turn bluetooth on/off, and then it seems to reconnect.
Not sure how hard you tried @KorkyraBoyCRO, but it definitely should work (iPhone4s has Bluetooth 4.0). Just be patient, reset everything in between and also wipe the eeprom from time to time.
BTW: I use Adafruit Bluefruit LE breakout with following Pins: Notif notif(8,2); aci_state.aci_pins.reset_pin = 10; aci_state.aci_pins.interface_is_interrupt = true; aci_state.aci_pins.interrupt_number = 0;
Regarding this Library: It's a great start. I really want it to work. I want to build a nice IoT notification box. I'll be shifting the output from LCD to a LED matrix, as soon as I get behind this library and work some things out:
Of course this library has much greater potential, like @KorkyraBoyCRO project. I hope some more people get active on this. Cheers
Yep - the XML file is used by nrfgo studio and it spits out the settings.h file. The my_settings.h file was my backup. I swapped it with the settings.h file from the Nordic library.
That is totally what I want to do. If you make an progress on the notification box, let me know. I was using the Uno and I started to run out of memory with the Nordic and LCD library loaded. It might be tough to get all that functionality on the board. Using a Raspberry Pi & a BTLE dongle might end up being a more practical solution and cheaper...
@robotastic How did you change the bluetooth name from ANCS Rusk to BLEWatch?
@robotastic I used the included nrf8001_ancs.xml file in nRFgo Studio and modified the device name. After replacing services.h and services_lock.h with the newly generated ones, the device continues to show up as ANCS Rusk. I have tried uncommenting the eepromwipe code as well. Do you know if there are any other steps? Thanks.
hi again
first i would like to say that i didn't changed this line of code in notif.cc:
aci_state.aci_pins.interface_is_interrupt = false;
cause otherwise i couldn't even connect or pair my devices. With that in mind after i pair my devices when i, for example, receive a call i don't get anything on my Serial Monitor ( i will leave a link to my, i mean your code. My goal at this point is just to receive every notification and have it displayed od serial monitor and not lcd ).
this is link : https://gist.github.com/KorkyraBoyCRO/95a47cfae42de9f6c54a
My Serial Monitor show:
NOTE: WHEN IN notif.cc NOTHING WAS CHANGED I WAS STILL ABLE TO PAIR DEVICES AND aci_state.bonded: 1 WAS SHOWING THIS. BTW WHEN I SEARCH DEVICES IN BLUETOOTH SETTINGS ITS NAME IS ANCS Rusk not Notif!
Arduino setup [free SRAM] 689 bytes Apple iOS Notifications Evt Device Started: Setup
Evt Disconnected: phone has deleted the bonding/pairing information Pairing/Bonding info cleared from EEPROM. Bond Cleared Please Reset [free SRAM] 679 bytes Evt Command Response: : Command invalid in the current device state Disconnect Evt Command Response: : Success! Radio Reset