The main point here is that unlike the peripheral_server_uart interface which uses the UART only when there’s an active connection, you’re configuring the UART to always be enabled and always processing the messages, and enabling/disabling the RSL10’s RF interface based on those messages. If the command is to disable the BLE interface you would power-down the RF interface. In addition, if the command is to enable the BLE interface you should take the steps in App_Initialize to enable the RF power and call BLE_Initialize(). Based on the received messages, respond by queueing the response, and change a state or data variable as appropriate based on the received message. Now define a UART Interrupt Service Routine to process received bytes. You’ll likely want to define the UART to be interrupt based on reception of a byte and either DMA or interrupt based to transmit back to the external controller. Start with an example such as peripheral_server.Īdd a uart.c file and define a UART_init() function that you call from the app_init(). based on the state controlled via the UART, enable/disable the RSL10 BLE communication, monitor and control what is communicated.Implement a UART interface to control / query the RSL10 state.I think you’re trying to do something like this But it sounds like you’re trying to control more than just that via UART command interface. As the computer has only usb port ,I used RS485 to usb converter.In windows i am getting the response data when i send request data.When using in linux i tried minicom software ,but I am not getting the response data when i send request data. If you simply want the RSL10 to be “ON” or “OFF” the air, you could use a GPIO from an external controller to indicate the desired state. I Want to read data from a sensor which has RS485 interface.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |