Quantcast
Channel: Cypress Semiconductor - PRoC BLE
Viewing all 548 articles
Browse latest View live

CY5677 CYSMART Visual studio example

$
0
0
Forums: 

Hello folks,

 

I'm still working on the CY5677 dongle with the example linked by Madhu Sudhan (thanks to him) at: http://www.cypress.com/forum/proc-ble/cysmart-api-c-example?page=1

I got an issue wich is now solved as mentionned here : http://www.cypress.com/forum/proc-ble/cy5677-cc2650

I'm close to the end of my application but I'm stuck since a long time on an other issue which is notifications are never enable.

I tried to make it work with CYSMART and it's working nicely, same with a phone but never with this application. I tried to solve the issue with the same way Madhu Sudhan solved the last issue but never worked. I join you the code of the notify button : 

private void Notify_Button_Click(object sender, System.EventArgs e)
        {
            AutoResetEvent sync = new AutoResetEvent(false);
            CyApiErr err = CyApiErr.OK;

            CharHandle = 0x0027;
            CCCDHandle = 0x0028;
            // Setup the descriptor write handler
            GATTClientEventCallback.DescriptorWriteHandler = (CyConnectResult, status) =>
            {
                if (status != CyStatus.BLE_STATUS_OK)
                    err = new CyApiErr("Failed to Write: Reason: " + status.ToString());
                sync.Set();
            };

            if (!(NotificationEnabled))
            {
                var NotifByte = new byte[1];

               NotifByte = BitConverter.GetBytes(0x0001);
 

                Array.Resize(ref NotifByte, 1);
                // Initiate write descriptor request to the CCCD

                err = GattClient.WriteDescriptor(new CyGattWriteInfo(CCCDHandle, NotifByte));
 

                if (err.IsOK)
                {
                    sync.WaitOne();
                    NotificationEnabled = true;
                    Notify_Button.Text = "Disable Notification";
                }
            }
            else
            {

                var NotifByte = new byte[1];

                NotifByte = BitConverter.GetBytes(0x0000);

                Array.Resize(ref NotifByte, 1);

                       err = GattClient.WriteDescriptor(new CyGattWriteInfo(CCCDHandle, NotifByte ));

                if (err.IsOK)
                {
                    sync.WaitOne();
                    NotificationEnabled = false;
                    Notify_Button.Text = "Enable Notification";
                }
            }
        }

 

Err is variable is ok when I debug so the transmission seems to be well but the principle of activation seems failed. With CySmart I'm able to write "01:00" or "0100" and it's working. 

Plus I have a question about that on CySmart I can see what is on the joined picture. With characteristic which haven't notification mod I'm ok to write CharHandle and CCCDHandle nicely but with the notification characteristic I have 3 values as joined 0x0027 to 0x0029. What should I put where ?

 

Regards,

Guillaume


Debugging problem with PSoC Creator and MiniProg3

$
0
0
Forums: 

I have a custom board with a CYBLE-022001-00 and a MiniProg3 
The PSoC creator sees the MiniProg3 and the CYBLE-022001-00 and I can connect to it
When I select "Attach to running target", the debug screen comes up but it appears stuck and I never reach a breakpoint in my main.c (see attached) 
Also when I select "program" I get the following message 
"There was an error running the Programmer to configure the device. Try lowering the clock speed used for communication in the Options dialog, under Tools > Options > Program/Debug > Port Configuration. If the problem persists, make sure that the Programmer for this debug target is properly installed and ready to use." 
My clock speed is set to 1.5 MHz. I tried to lower it to 0.8 and 0.2 to no avail 
Could you please help 
Thank you 
Andy

rtc and watchdog timer on PRoC BLE

SCB_P4 component in CYBLE-022001-0 design

$
0
0
Forums: 

I have a custom board with a MMA8653FC accelerometer.

It has the I2C interface and the spec says that the address of the interface is 0x1D
I set up a SCP_P4 component as an I2C master 
Assigned SCL and SDA of the component to CYBLE  according to the board schematic, SCL to pin 19 and SDA to pin 18
I'm getting a Accel_I2C_MSTR_ERR_LB_NAK error in Accel_I2CMasterSendStart routine 
Also board schematic shows that INT1 and INT2 from the accelerometer are assigned to pins 6 and 9 of the CYBLE-022001-0.
I don't know how to do that in PSoC creator. 
Your help is much appreciated.

Project is attached

Thanks

Andy

Communicating to a part via I2C

$
0
0
Forums: 

My board design uses a MMA8653FC Accelerometer 
I defined an I2C SCB to communicate with it 
Set up the SCL and SDA pins per my board schematic. The part SendStart routine returns no error so I assume the SCB is configured properly 
The part spec describes the single byte register read as follows 

5.8.1 Single-byte read 
1. The transmission of an 8-bit command begins on the falling edge of SCL. After the eight clock cycles are used to send the command, note that the data returned is sent with the MSB first after the data is received. Figure 10 shows the timing diagram for the accelerometer 8-bit I2C read operation. 
2. The Master (or MCU) transmits a start condition (ST) to the MMA8653FC [slave address (0x1D), with the R/W bit set to “0” for a write], and the MMA8653FC sends an acknowledgement. 
3. Next the Master (or MCU) transmits the address of the register to read, and the MMA8653FC sends an acknowledgement. 
4. The Master (or MCU) transmits a repeated start condition (SR) and then addresses the MMA8653FC (0x1D), with the R/W bit set to “1” for a read from the previously selected register. 
5. The Slave then acknowledges and transmits the data from the requested register. The Master does not acknowledge(NAK) the transmitted data, but transmits a stop condition to end the data transfer. 

I'm having trouble translating steps 4 and 5 into code that uses the I2C SCB 
#5 implies that the register must be read immediately after the repeated start is sent. It's not clear how to do this in SCB I2C. 
The Accel_I2CMasterReadByte issued after Accel_I2CMasterWriteBuf returns 0xFF because the check if master is active in Accel_I2CMasterReadByte fails : 
Here is a routine I use

byte IIC_RegRead(byte address, byte reg) 

byte b = 0; 
byte repeatStartAddr = (address << 1) | 0x01;  /* slave address 0x1D with the R/W bit set to “1” for a read from the previously selected register. */
status = Accel_I2CMasterSendStart(address,DIR_WRITE); 

if(status == Accel_I2C_MSTR_NO_ERROR) 

Accel_I2CMasterWriteByte(address); // Send IIC "Write" Address 
Accel_I2CMasterWriteByte(reg); // Send Register 

Accel_I2CMasterWriteBuf(address,&repeatStartAddr,1,Accel_I2C_MODE_REPEAT_START); 

----These fail
b = Accel_I2CMasterReadByte(GENERATE_ACK); // *** Dummy read: reads "IIC_ReadAddress" value *** 
b = Accel_I2CMasterReadByte(GENERATE_ACK);  /* read the value */
status = Accel_I2CMasterSendStop(); 

return b; 

Your help is much appreciated. 

byte swapping routines in PSoC creator

$
0
0
Forums: 

Are there byte swapping routines in PSoC creator environment, e.g htonl, ntohl etc etc?

Thank you

Andy

Using Cy5677 USB dongle with LabVIEW

$
0
0
Forums: 

Hi,

I have a cy5677 USB dongle which I have to use to collect data from one of the BLE device.
My aim is to read the data from BLE device to a LabVIEW program. For this I have to control the dongle from LabVIEW software. I have the CySmart API DLL's. LabVIEW will allow calling the Cysmart .net c# api DLLs. Being a newbie yo c# , I don't really understand which all functions/methods has to be used to establish the connection to dongle and to BLe and read the data. I have read through the API manuals. But not sure about the steps to achieve this.

Can some one just list out the sequence functions/classes/methods to be used from the API DLL. It will be really helpful if someone has already done this using LabVIEW and is willing to share some code.

I look forward to the replies.

Regards
Deepu

Programming CYBLE-012011 standalone using CY8CKIT-002 PSoC MiniProg3

$
0
0
Forums: 

Hello,

I just bought CYBLE-012011 evaluation board and the CY8CKIT-002 PSoC MiniProg3 program and debug kit. 

I have installed:

1. All the drivers

2. PSoC creator 4.0

3. PSoc programmer 3.25.0

I am trying out the example from AN96841_Getting_started_With_EZ_BLE_Module document. Although this example is intented for CYBLE-022001-EVAL board, the only parameter I think that needs to be modified is the CAPACITOR_TRIM_VALUE which is 0x0000BCBC for CYBLE-012011. 

I followed that document with CAPACITOR_TRIM_VALUE changed and I was able to build the project with no errors. 

Now I am have trouble in selecting debug target

I followed these steps:

1. Connected my MiniProg3 to CYBLE 012011 Eval board using the 10 pin connector.

2. In PSoC programmer under Port Selection, I can see my device being listed as MiniProg3/1614BB0011BA. I double clicked the name and a blue dot appeared before the name and the connection status changed to connected.

3. In PsoC creator 4.0, Debug -> Select debug target. I had to close the PSoC programmer as only one program can access the device at a time. Now I was able to see my device listed as MiniProg3/1614BB0011BA. However, I could see the BLE device. When I clicked port acquire, it says "There was an error running port acquire: Can not acquire SWD device!".

Questions:

1. How do I get the PSoC creator to connect to my chip?

2. Why CYBLE-012011 is not showing up in the Select Debug Target window?

3.Where do I find my compiled hex file if I want to program using PSoC programmer?

 

Edit1:

The select debug target window says, the channel is not connected to a device or the device is not powered. Do I need to power the CYBLE-012011 Eval board separately?

I can see the status LED(green) flickering. Not sure what it means.

Thank you

Dheeraj

Attachments: 

Cyalkit E02 firmware not complete?

$
0
0
Forums: 

Hi to all,

from the p.31 of Cyalkit e-02 solar powered BLE sensor RDK guide section 3.4, the Serial Command List states that there is the ability to configure basic Eddystone parameters. By using the solar_BLE_sensor_v1.100.hex firmware it seems that only a portion of the commands recognized ([1] -[5] and [19] - [22]). Is this normal? Am i supposed to perform a special procedure in order to "unlock" the eddystone configuration service from USB?

thanks in advance

George

How to program EZ-BLE PRoC Module?

$
0
0
Forums: 

Hello,

I am very confused with EZ-BLE PRoC and EZ-BLE PSoC modules. I have CYBLE-012011 which is a EZ-BLE PRoC module. From this page, it says that the EZ-BLE 012011 evaluation board can be programmed using Cy8CKIT-002 PSOC MINIPROG3 PROGRAM AND DEBUG KIT.

On the programmer, it says "PSoC Architecture Supported - 1, 3, 5". 

How do I know the architecture of my EZ-BLE module?

The programmer is for PSoC architecture. Will it work with PRoC?

If someone would clarify the difference between PSoC and PRoC it would be really helpful.

Thanks

Dheeraj

CY5677 One Master, Multi-Slave

$
0
0
Forums: 

Hey folks,

 

I'm working with the CY5677 Dongle. I developed a custom application based on the Madhu Sudhan's example which can drive the Dongle to connect and drive a slave like CySmart permits to do. The dongle is programmed with the software used for CySmart. That's working very well.

I now have to develop a new application (or upgrade this one) which can read 2 slaves simultaneously, so here is my question : Can I make it with this configuration or the Dongle and the software on it will limit me to one slave ?

 

Regards,

Guillaume

Getting started AN96841 example on CYBLE-012011 eval board

$
0
0
Forums: 

Hello,

I have followed the example mentioned in chap 9 in AN94841 document. These are the changes I did to the firmware code:

1. CAPACITOR_TRIM_VALUE is set to 0x0000BCBC

2. In the file with extension .cydwr, I changed the LED's PORT to P3[6], P3[2] and P3[4].

The generate application, build and flash were successful. I am using CYSMART app on android to interact with the bluetooth device. I was able to select my device, select the Find Me Target and was able to click on the 3 alert types. 

I am using the EVAL board as a standalone device, so I connected 3 LED's to the mentioned pins respectively. When I click the alerts, the app says that 'Written alert successfully'. But the LED's always stay off.

Has anyone tried this example before? What am I missing?

Thank you

Dheeraj

Debugging using printf on PRoC eval 012011 board and MiniProg3

$
0
0
Forums: 

Hello, 

Has anyone tried to redirect printf through SWD using EVAL 012011 board and MiniProg3 connected using a 10-pin connector? What debugging options do I have using this setup?

Thanks

Dheeraj

[Problem with encryption and authentication] - PSoC Creator and CYBLE-022001-00

$
0
0
Forums: 

Good morning,

I am currently developping software with PSoC Creator 3.3 on a chip CYBLE-022001-00. My question is about the security. This is my configuration :

General :

GATT Server.
GAP Paripheral.

GAP Settings (Security) :

Security Mode : Mode 1.
Security Level : Authenticated pairing with encryption.
I/O Capabilities : Display Only.
Bonding requirement : No Bonding.
Encryption key size (bytes) : 16.

 

I have created 2 Services in a Custom profile : One for Read and one for write data. I have a bridge between BLE and I2C (i am using a project « Day035_I2C_BLE_Bridge » for that).

To have an higher security betweek two devices, i am using encryption and authentication. I used the project « Day016_Authentication » to have the same thing. The problem is : during the authentication, i enter the passkey in a smartphone (the passkey generated by the cyble-022001-00), but if i fail the authentication, i am still able to write data in a characteristic and i am able to read theses datas with the I2C component.

In the profile properties, all permissions need an encryption (encryption required) and an authentication (authentication required).

Do you know how it is possible to write (and read) in all characteristics even if the anthentication if fail ?

Thank you for your answer.

 

Kind regards.

Android app sends wrong characteristic handler

$
0
0
Forums: 

Hi,

I am trying to get an interrupt to change some data when an Android app sends a characteristic write request.  Both UUIDS are identical in Android Studio and PSOC Creator, however, this line never seems to match:

if(wrReqParam->handleValPair.attrHandle == CYBLE_DMX_CONTROLLER_CUSTOMCOLOR_CHAR_HANDLE)

The CYBLE_DMX_CONTROLLER_CUSTOMCOLOR_CHAR_HANDLE always has a value of 0x0014u, but the wrReqParam->handleValPair.attrHandle either has a value of 0x0010, or 0x0015.  I have checked and double checked when debugging that the app is sending the characteristic with the correct UUID (00000000-0000-1000-8000-00805f9b34f1), and cannot make sense of this.

Any ideas?

Thank you in advance.

Regards, Tom


Updating application firmware on EZ-BLE 012011 over UART from another micro-controller

$
0
0
Forums: 

Hello, 

I want to update the firmware on EZ-BLE 012011 over UART using another micro-controller. The .hex file containing the application firmware is stored in another micro-controller's flash. The file is then transferred to the EZ-BLE 012011 over UART which will flash the bluetooth module. 

Currently, I am using MiniProg3 to program the EZ-BLE 012011. I am not sure what kind of bootloader is there by default in the EZ-BLE 012011 module(eval board). 

Questions:

1. How do I update/flash the bootloader in EZ-BLE 012011 to accept firmware over UART?

2. If there a UART bootloader is built in already, what protocol should be followed to send the .hex file? 

3. How to set the BLE module into bootloader state?

Thanks

Dheeraj

Writing a single field to a GATT Server

$
0
0
Forums: 

Hi,

I was wondering if it were possible to write to a single variable field in a GATT server without overwriting other fields.  For example, I have 'program, speed, brightness' fields in a characteristic - can I write to just one of those fields, and if so, how?

If not, would it not make more sense just to have a byte array instead of multiple fields?  It would accomplish the same thing.

Thank you in advance.

Confusion regarding 4.1/4.2 development kits and PROC devices

$
0
0
Forums: 

Hello,

I am confused about the development kits and Proc devices currently available.

First I found an CYBLE-212019-00 PROC module BLE 4.1 with an appropriate development kit CY8CKIT-042-BLE for the PSOC 4 hardware.

But after checking the website at Cypress I got the information that a new development kit CY8CKIT-042-BLE-A with BLE 4.2 is out. Unfortunately this new kit seems not to be available everywhere or at any distributor.

As both kits seem to be based on the PSOC 4 I wonder if there is an difference in the software only and the hardware has not changed.

Is that right and I can buy an non A version kit and use or update with the newer software or am I wrong here ?

Same applies for the available CYBLE-212019-00 PROC module which is reported as 4.1 module. Can I update this module to 4.2 with the newer development kit or the updated non A kit ?

Or are there any diffs in the PSOC4 hardware or the older 4.1 devices locked in any way to this version ?

Can somebody please clarify because if I start with a new project I would like to get the latest version if ever possible.

 

Thank you very much for any usefull answer.

 

CYSPP : Compile Error - Undefined Ref to main()

$
0
0
Forums: 

Jeff.

Been running w/ UART_to_BLE_Central for awhile and it's time to move up.

I'm trying to unzip verbatim and compile EZSerial_Host_Demo.cywrk. I am getting error:

Undefined reference to 'main' in Cm0Start.c

I'm a little rusty after just coming back on board w/ PSoC creator. I running the older v3.3. I seem to recall to set dependencies or something.

Can you hep me out?

Thanks. John

CYSPP : iOS & Android App Examples

$
0
0
Forums: 

Jeff.

Are there any iOS or Android tutorial videos or docs w/ example source for basic file transfers to a CYSPP based server?

Also, does Cypress plan to devote continued resources for providing support and 'timely' updates to CYSPP as inevitable bugs begin to appear in the field with any new host platforms? This seems like a daunting task not necessarily within the historical Cypress core product offerings.

Thanks for any business plans insight.

Viewing all 548 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>