This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF8001 No Available or Open Pipes

Hi Folks,

I'm running into a problem with the pipes on my nRF8001. After I issue a Connect (0x0F) command, I receive:

  1. CommandResponseEvent (0x84)
  2. ConnectedEvent (0x85)
  3. PipeStatusEvent (0x88)

And the last event is as follows: 0x01 (debug), 0x11 (length = 17), 0x88 (PipeStatusEvent ), 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 (first 8 bytes: PipesOpen), 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 (second 8 bytes: PipesClosed)

According to the datasheet, the 0x01 in the first 8 bytes (PipesOpen) indicates that the service discovery procedure has completed. Then how come all the pipes are unavailable? Should I wait a certain time or should I run a certain command? When I attempt to send data on any pipe number, I get ACI_STATUS_ERROR_PIPE_INVALID.

Thank you for your plumbing help, Soren

Parents
  • Thank you for clarifying the use of pipes. My problem was that I didn't configure any GATT Services in nRFgo Studio, thinking that I would always get an open pipe automatically, so there wasn't any available pipes. Now I added a Heart Rate service with the following pipes:

    
    /* Service: Heart Rate - Characteristic: Heart Rate Measurement - Pipe: BROADCAST */
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_BROADCAST          1
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_BROADCAST_MAX_SIZE 19
    
    /* Service: Heart Rate - Characteristic: Heart Rate Measurement - Pipe: TX */
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_TX          2
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_TX_MAX_SIZE 19
    
    /* Service: Heart Rate - Characteristic: Heart Rate Measurement - Pipe: TX_ACK */
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_TX_ACK          3
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_TX_ACK_MAX_SIZE 19
    
    /* Service: Heart Rate - Characteristic: Heart Rate Measurement - Pipe: RX */
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_RX          4
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_RX_MAX_SIZE 19
    
    /* Service: Heart Rate - Characteristic: Heart Rate Measurement - Pipe: SET */
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_SET          5
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_SET_MAX_SIZE 19
    
    /* Service: Heart Rate - Characteristic: Heart Rate Measurement - Pipe: RX_ACK_AUTO */
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_RX_ACK_AUTO          6
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_RX_ACK_AUTO_MAX_SIZE 19
    
    

    When I connect to nRF8001 on my Ubuntu machine using the hcitool command in the terminal, I get the PipeStatusEvent (0x88) with 0x73 (0b01110011) for OpenPipes and all zeros for ClosedPipes. Then I attempt to use SendData with the pipes number 1,4,5, and 6, I get ACI_STATUS_ERROR_PIPE_TYPE_INVALID (0x95). I even tried pipes number 2 and 3 which returned ACI_STATUS_ERROR_PIPE_STATE_INVALID (0x96). Any other pipe returns ACI_STATUS_ERROR_PIPE_INVALID (0x90)... So I cannot send any data.

    I thought exchanging data over Set Pipes at least should work. What have I missed?

    Cheers, Soren

Reply
  • Thank you for clarifying the use of pipes. My problem was that I didn't configure any GATT Services in nRFgo Studio, thinking that I would always get an open pipe automatically, so there wasn't any available pipes. Now I added a Heart Rate service with the following pipes:

    
    /* Service: Heart Rate - Characteristic: Heart Rate Measurement - Pipe: BROADCAST */
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_BROADCAST          1
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_BROADCAST_MAX_SIZE 19
    
    /* Service: Heart Rate - Characteristic: Heart Rate Measurement - Pipe: TX */
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_TX          2
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_TX_MAX_SIZE 19
    
    /* Service: Heart Rate - Characteristic: Heart Rate Measurement - Pipe: TX_ACK */
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_TX_ACK          3
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_TX_ACK_MAX_SIZE 19
    
    /* Service: Heart Rate - Characteristic: Heart Rate Measurement - Pipe: RX */
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_RX          4
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_RX_MAX_SIZE 19
    
    /* Service: Heart Rate - Characteristic: Heart Rate Measurement - Pipe: SET */
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_SET          5
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_SET_MAX_SIZE 19
    
    /* Service: Heart Rate - Characteristic: Heart Rate Measurement - Pipe: RX_ACK_AUTO */
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_RX_ACK_AUTO          6
    #define PIPE_HEART_RATE_HEART_RATE_MEASUREMENT_RX_ACK_AUTO_MAX_SIZE 19
    
    

    When I connect to nRF8001 on my Ubuntu machine using the hcitool command in the terminal, I get the PipeStatusEvent (0x88) with 0x73 (0b01110011) for OpenPipes and all zeros for ClosedPipes. Then I attempt to use SendData with the pipes number 1,4,5, and 6, I get ACI_STATUS_ERROR_PIPE_TYPE_INVALID (0x95). I even tried pipes number 2 and 3 which returned ACI_STATUS_ERROR_PIPE_STATE_INVALID (0x96). Any other pipe returns ACI_STATUS_ERROR_PIPE_INVALID (0x90)... So I cannot send any data.

    I thought exchanging data over Set Pipes at least should work. What have I missed?

    Cheers, Soren

Children
No Data
Related