2020-05-28 05:13 AM
Hello,
I have done the MOOC for the stm32wb55 BLE profiles and now I am trying to introduce more BLE characteristics.
I managed to make the sensors work and to transmit them to the ST BLE Sensor app. However I can only have one screen active at a time. So for instance I can either have the temperature or humidity transmitted at a time, but not both at the same time.
I have created a custom template for both of them, and as I said separately they work fine, however I can't figure out how to have both of them at the same time on my ST BLE Sensor app.
Each template has its own UUID(in template_stm.c), specific to temperature and humidity, however I don't really understand this portion of the code from app_ble.c:
/**
* Advertising Data
*/
#if (P2P_SERVER1 != 0)
static const char local_name[] = { AD_TYPE_COMPLETE_LOCAL_NAME ,'T','R','Y','P','I'};
uint8_t manuf_data[14] = {
sizeof(manuf_data)-1, AD_TYPE_MANUFACTURER_SPECIFIC_DATA,
0x01/*SKD version */,
CFG_DEV_ID_P2P_SERVER1 /* STM32WB - P2P Server 1*/,
0x00 /* GROUP A Feature */,
0x04 /* GROUP A Feature */, //0x00040000
0x00 /* GROUP B Feature */,
0x00 /* GROUP B Feature */,
0x00, /* BLE MAC start -MSB */
0x00,
0x00,
0x00,
0x00,
0x00, /* BLE MAC stop */
};
#endif
My transmission works only when I change the mask to 0x00040000 for temperature (the temperature screen in the app and the transmission work fine) or when I change it to 0x00080000 for humidity. How would I manage to have both of them at the same time?
I read the documents associated in their entirety and also I checked the example apps, but I can't seem to figure it out.
Also as a separate issue, when I try to send the data to the pressure UUID, although the code is exactly the same to the other 2 examples, on the app it shows me "Not available".
Does anyone know how to solve these 2 issues?
Thank you,
Bogdan
2020-06-02 04:00 AM
Hello,
Does anyone have any idea for this? I have still not figured it out...
Thank you,
Bogdan
2020-06-02 09:38 AM
Hi, i do not have a solution for your problem but i have some difficulties with the fourth MOOC video. Could you send me your code for the temperature sensor?Unfortunately my app stops even before advertising anything. Thank you!
2020-06-04 01:54 AM
Hello,
I have attached you the program which sends random temperature data to the phone. Make sure to check the scheduler and the functions that you use from it, if you're only following the MOOC, you will notice that some of them are not up to date anymore.
If you have any questions, write them here, and I will try to help you out!
Side note: Can anyone help me with my issue?
Thanks,
Bogdan
2020-06-13 10:57 AM
Hi, unfortunately I don't know how to help you as my attempt stopped even before having the temperature sensor working. I am not sure you can combine two different Gatt profiles without creating a new one that contains services from both.
I've seen you have encountered my same problem with SPI, or at least similar. Have you found a solution?
Thank you for your kindness.
2020-06-13 11:19 AM
Hi,
Well, personally my project is coming to an end and I've chosen to send all the 20 bits of data that are allowed, through one GATT profile.. I don't have enough time left to figure out how to implement more profiles. I've tried creating a new one, but I have no clue how to combine the services..
Anyway, regarding your question, what problem do you have exactly? For me it was that I did not update the interrupts in the SysTick_Handler. Check my program and you are gonna see there a sort of timer for the SD card. (I am not so sure why we need to have it there or what it does exactly, so if you'll know that, please write it here. It might be fun to know)
Have a nice day,
Bogdan