Custom ADV ble frame, stm32wb55 - bluetooth

I am working with stm32wb55 on a ble project, is it possible to create my own adv frame that can be updated periodically, for example every 10 seconds, as I am trying to send sensor data on a ble frame but I don't know where to start or how can I create a ble frame that changes every time period.
Thank you in advance.

Related

Use a Card Reader to input data into an Excel spreadsheet that is running in the background

I currently am collecting data from a large quantity of participants, all of whom have a badge that is scanned at the point of entry; logging ID, date/time etc... This is all tracked on a laptop running Windows 10 / Excel.
The issue here is that the laptop currently must only be devoted to this task. The ideal scenario would be that the card reader (usb peripheral) would input data into the spreadsheet as a background process.
Is there a way to route a USB peripheral to a sole application, even if that application is not in the foreground?
Cheers, and thank you!

Streaming data over bluetooth

I'm working on a project that streams data to a laptop. The data is an analog signal with 5 kHz bandwidth (almost like audio) that is digitized at first and should be transmitted over a bluetooth module to a laptop. I've searched a lot about modules that use this protocol to stream data. I figured out simple bluetooth modules like hc-05 or hc-06 because of their limitation of packet's size and interval time can't be used for this application. It has been suggested to use audio bluetooth module like bc127 and csr because of their appropriate sample rate (I want more than 20 kS/s) and their applications so I want to use them but not for an audio signal for my signal. Now I want to ask you:
1- Can I use these modules to acquire my signal (that is not an audio signal) wireless?
2- Do these modules compress signal for transmission and should I decompress it in receiver side (I know they have some audio DSP but I don't know what are they and their function)?
3- Can laptop's bluetooth hardware receive this data without any problem? If not, what are alternatives?
4- is there any filtering in the proccess? i mean filter about voise band(300 Hz ~ 4 kHz)
thank you.

BLE slave logic to increase battery duration

I'm looking for answers on the net for 2 days, and it seems like I can't find my answer so I finally post it here hoping I just mess something.
I'm conceiving a BLE slave device to log humidity in a room twice a day. This device has to run for at least 2 Years before getting recharged.
What is the BLE logic to ensure long battery life ?
1) Is a long advertisement / connection interval enough ?
2) Do I need to implement a RTC with interrupt to wake up my device and start advertising to get connected?
3) Do I have to use advertising packets only, and include my data into it?
I think I just miss something about bluetooth low energy, and it is a problem to create a ble device.
Thank you very much for you help, and have a good day !
You could calculate power consumption at https://devzone.nordicsemi.com/power/ for Nordic's chip. If the device does not advertise or has an active connection (i.e. it's just sleeping), it consumes almost no power at all and will definitely run for 2 years even on a CR2016 battery. So if possible, if you have for example a button that can start the advertising only when needed, that would be good.
Otherwise if you want it to be always available you must advertise. How long the advertisement interval should be depends on how long connection setup latency you want. If you have a BLE scanner that scans 100% of the time the advertisement interval will be equal to the connection setup time. If you have a low-power BLE scanner that only scans for example 10% of the time you'll have to multiply your advertitsement interval by 10 to get the expected setup time. It all comes down to simple math :)
I'd suggest create a connection rather than just putting the data in the advertisement packets since then you can acknowledge that the data has been arrived.
Note that if you have a connection interval of 4 seconds and have a stable constant connection you can get several years battery time on a coin cell battery.

USB Audio confusion - What data rates are possible?

I'm new to USB development, and i'm quite confused about what data rates are realistic.
I'm trying to develop an external sound card connected on an AVR32 processor, which supports USB Full Speed(12 Mb/s). I'll use USB audio class 1 to send the audio data to a PC. I need to send 24 bit, 48kHz, 2 channels as INput to the computer, but also 24 bit, 48kHz, 1 channel OUTput from the computer. Streaming both ways.
That gives me a data rate of: 24 bit * 48kHz * 3 channels = 3,5 Mb/s, which should be possible by using USB Full Speed?
I understand that the Audio Class sends data via an Isochronous transfer, but i'm confused about how many transactions ( e.g. IN = 256 bytes ) it is possible to make in one frame? according to the USB specification (http://www.usb.org/developers/docs/usb20_docs/#usb20spec - > table 5-4) it seems to be possible to send more than one transaction per frame?
Is it possible to send both IN and OUT packets within one frame?
Thanks in advance!

Arduino 1.05 SoftwareSerial Library

I am new to Arduino and I have 2 issues when I tried the BluetoothShieldDemo.
I can only send data from bluetooth module(through serial monitor) to phone but I cannot send from phone to bluetooth module(to display it in serial monitor). I used oscilloscope to check there is signal in the Arduino board RX pin but no data display in the serial monitor. I suspect it is an IO issue so I changed the IO from digital pin 6 and 7 to digital pin 2 and 3, then digital pin 4 and 5. But it is still not working. Then I change the code to use hardware serial (Serial1) and it is working now. I just wonder why it is not working with the SoftwareSerial.
Although I can send and receive data, I cannot change the bluetooth name. The bluetooth module has no response when the below commands are sent. Is it the bluetooth module is in some kind of locked mode? Or the command is different from manufacturer? The bluetooth module that I got has a single CSR 31A2 chip on it. But the other shield that I saw on the web has 2 chips and it is with CSR BC417.
Codes:
blueToothSerial.print("\r\n+STWMOD=0\r\n");
blueToothSerial.print("\r\n+STNA=BluetoothSlave\r\n");
blueToothSerial.print("\r\n+STOAUT=1\r\n");
blueToothSerial.print("\r\n+STAUTO=0\r\n");
delay(2000);
blueToothSerial.print("\r\n+INQ=1\r\n");
Thanks in advance!
1- When using SoftwareSerial, how are you declaring the pins (Input/Output)?, Are you pulling serial data right (giving it enough time between data transmission, but reading at the right time)?
2- Find the datasheet of your module and see what commands does it support.

Resources