2 Replies Latest reply on Mar 10, 2015 8:19 AM by userc_12290

    Reading sensor value and show it on a iphone display.

      Hello Community


      I try to read switching digital value and show it on a iphone display.

      I have done that setting BCM207373's pin0 to Input, and I can see a message on a teraterm when I turn on or off a switch.

      Here is part of code I add some line to hello sensor.c




      void hello_sensor_send_message(void)


      BLEPROFILE_DB_PDU db_pdu;

      int res = gpio_getPinInput(0,0); <-here

      ble_trace1("res = %d\n",res);     <-here

      // If client has not registered for indication or notification, do not need to do anything

      if (hello_sensor_hostinfo.characteristic_client_configuration == 0)



      // Read value of the characteristic to send from the GATT DB.

      bleprofile_ReadHandle(HANDLE_HELLO_SENSOR_VALUE_NOTIFY, &db_pdu);

      ble_tracen((char *)db_pdu.pdu, db_pdu.len);


      if (hello_sensor_hostinfo.characteristic_client_configuration & CCC_NOTIFICATION)


      bleprofile_sendNotification(HANDLE_HELLO_SENSOR_VALUE_NOTIFY, (UINT8 *)db_pdu.pdu, db_pdu.len);




      if (!hello_sensor_indication_sent)


      hello_sensor_indication_sent = TRUE;

      bleprofile_sendIndication(HANDLE_HELLO_SENSOR_VALUE_NOTIFY, (UINT8 *)db_pdu.pdu, db_pdu.len, hello_sensor_indication_cfm);






      I am a new so please let me know some information or knowledge I need to refer to.


      I will really appreciate your contribution


      Thank you.