You can put almost anything into advertising packet just be aware of size limitation - 31 bytes. There are some assigned ids here https://www.bluetooth.com/specification ... s-profile/
e.g. name is 0x09, structure is sequence of length,type,value,.. Good is to use nrfconnect
on your phone, pick device from list and click "RAW" and you will see advertising packet structure.
Advertising packet is broadcast to anyone, scan response is for those who ask back and scan your device (still without connection). Also it is possible to keep some part of packet fixed (e.g. name if you want any) and vary the rest (e.g. manufacturer data) if one needs to send more data. Then the receiving device must collect more packets over time.
I am not sure how exactly this can be done on the PI, this is generic BLE knowledge. Personally I use it with Espruino on nrf52 smartwatches - the api description https://www.espruino.com/Reference#l_NRF_setAdvertising
explains a lot of possibilities or there are examples e.g. here https://www.espruino.com/BLE%20Advertising
or here http://forum.espruino.com/conversations/306687/
to get more info what should be possible on the Pi too.
BTW if you are into BLE, current best choice for hackable BLE smartwatch that can run your Arduino or Espruino code without taking it apart is probably the P8 for ~US$18 or F07 fitness tracker for $14-$16 see e.g. https://hackaday.com/2020/05/02/cheap-s ... -own-code/
or Espruino for P8 here
, for F07 here
Also the Pinetime
watch is very similar/same to P8 (same manufacturer, mostly same hardware inside) but P8 is better choice IMO.