Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - benstada

Pages: 1
1
TinyDuino Processors & TinyShields / Re: detect other BlueNRG
« on: August 01, 2023, 06:32:08 AM »
void loop() {
  uint8_t sendBuffer[21]="hello\0";
  uint8_t sendLength = 6;
  aci_loop(); //Process any ACI commands or events from the NRF8001- main BLE handler, must run often. Keep main loop short.
  if (ble_rx_buffer_len) {//Check if data is available
    if (SerialMonitorInterface.available()) {
      SerialMonitorInterface.print(ble_rx_buffer_len);
      SerialMonitorInterface.print(" : ");
      SerialMonitorInterface.println((char*)ble_rx_buffer);
    }
    contact();
    ble_rx_buffer_len = 0;//clear afer reading
  }
  else {
    lib_aci_send_data(PIPE_UART_OVER_BTLE_UART_TX_TX, (uint8_t*)sendBuffer, sendLength);
  }
}

2
TinyDuino Processors & TinyShields / Re: detect other BlueNRG
« on: August 01, 2023, 06:27:58 AM »
Now I am so far that both BlueNRGs are visible on my phone with the nrf connect app.
They both send data to my phone and my phone can send RX data as Command to the BlueNrgs
However the data send by one BlueNrg is not recievied by the other.
I am using lib_aci_send_data(PIPE_UART_OVER_BTLE_UART_TX_TX, (uint8_t*)sendBuffer, sendLength))  the buffer contains hello which I receive on my phone.
Maybe it is necessary to connect to the other BlueNRG and enable notifications, I do connect ion my phone  and enable notifications.
Maybe I can Set the Pipe of my other  BLueNrg but I don't know what the ID is.

If the one BlueNRG receives data from the other it knows it's in the neighbourhood.

3
TinyDuino Processors & TinyShields / detect other BlueNRG
« on: July 14, 2023, 04:22:05 AM »
Have to program two wedding rings with a tiny screen and BLE to detect the other ring is in the  neighbourhood and the generate hearts.
The screens are running with the UARTPassThrough.ino example merged with my code and i see them in my phone as two BlueNRGs.
How do i detect the other one is near by?
What do i use?
aci_gap_start_general_discovery_proc(0x4000, 0x4000, 0x00, 0x01); returns 12 which is BLE_STATUS_INVALID_PARAMETER
Can someone point me in the right direction?

Thank You.


Pages: 1
SMF spam blocked by CleanTalk