How to sleep and wake up LoRa periodically on STM32 HAL? - stm32

I am not able to find the function to sleep LoRa periodically on STM32 using HAL.

Related

Can you use an STM32F105's I2C bus as both master and slave within the same program?

I would like to use an STM32F105's I2C bus in both master and slave modes.
I'd like it to listen as a slave, except when it is sending data or listening for a response to a packet it sent as master.
Does the CubeMX HAL allow this?

Create MQTT Broker if one isn't present on network with Raspberry pi

I have to build a modular system where each system could run by itself, or if they are connected to the same network, they could work together. Each system would have a raspberry pi that could potentially run an MQTT broker to handle messaging from other components in the system.
But I am wondering if I connect more than one system to the same network, is there a method to figure out if a broker is already present and disregard spinning up another broker so the 2nd system introduced to the network would use the first systems broker?

Acknowledgement in I2C slave

I read the I2C specification provided by nxp.but I am still not clear on some points. can you explain to me?
normally slave is controlled by I2C master. Acknowledgment is enabled by I2C master then how slave generates I2C acknowledgment?
I2C slave address and I2C data byte both are 1-byte data then how I2C slave differentiate between them?
Assuming i2c specification for nxp is identical to industry standard.
1) I don't think that "acknowledgement is enabled by Master" is the correct term here. After each (full) byte sent by the Master it waits for the Slave to send back the acknowledgement bit (or the not acknowledgement ). The slave does this by changing the level of the SDA line.
2) For transferring data from Master to Slave (and back) it is very important to keep the order of the sent bytes. A typical example would be like this:
Master sends: Start Signal
Master sends: Slave Address + Write-Bit
Slave sends: ACK
Master sends: Register Address the master wants to read
Slave sends: ACK
Master sends: repeated Start Signal
Master sends: Slave Address + Read-Bit
Slave sends: ACK
Slave sends: content of register Register Address the master wants to read
Master sends: NACK
Master sends: Stop Signal
If you are looking for some more details on the I2C, there is plenty of it throughout the internet. For me, section 21 of this data sheet helped me a lot to understand.

akka tcp server-client heartbeat message block by scheduler processing

I am using Akka cluster (Server) and exchanging HeartBeat message with client using Akka TCP in every 5 seconds.
HeartBeat is working fine till I am not using scheduler.
but when I am starting 4-5 schedulers, Server is not receiving heartbeat buffer message from client (tcp connection). After scheduler processing, I am getting 4-5 heartbeat messages at same time.
Akka sceduler is blocking actor other processing (buffer reading etc).
I already tried below, but still facing same issue.
different-2 dispatcher
created new actor and added scheduler call in seperate actor.
using 8 core machine
tried fork-join-executor and thread-pool-executor
already tried changing Tcp-SO-ReceivedBufferSize and Tcp-SO-SendBufferSize to 1024 or 2048, but it didn’t work.
already tried Tcp-SO-TcpNoDelay
Kindly help.

IBM Bluemix - IBM IOT out node configuration for Arduino example

I have the IBM tutorial on using Arduino+Bluemix, up and running. I would now like to take a decision on the cloud and let the Arduino subscribe to a topic containing the decision message. For this, I am trying to use the IBM IOT out node in my Node-RED editor. However, I am not sure of how to configure this node.
Are there any tutorials that cover this use-case (IBM IOT out node + Arduino, MQTT)- or documentation on the node properties?
Thanks.
NK
This is the picture of an IoT output node I'm using on the Coursera IoT course, works for me sending data to the Sense HAT device plugged onto my pi.
At the client side I'm using NodeRED (using a Pi this is easy :-) and an IoT input node which does the subscription to the command.
The docs describe how to subscribe to commands HERE under the heading Subscribing to Commands.
The subscription topic should look like iot-2/cmd/[command_id]/fmt/[format_string], so for my pi to subscribe to the command in the picture the topic should be iot-2/cmd/display/fmt/json - although I haven't tried that myself, it should work.
You need to configure the IBM IoT out node to publish messages to the device ID of your Arduino. The msg.payload will be the message you send to your Arduino. You will also need to set the topic as well, the topic contains your deviceId also. Then you will need to have your Arduino subscribe to the topic to receive the messages.