I have a setup where I'm sending 2 bytes of data over 433 MHz modules, in this case soil moisture measurements.
I also send battery voltage and internal chip temperature. I have an 08M2 send the received data to the PC using SERTXD and it works perfect but I wanted to add another wrinkle and have another 08M2 receive the data and immediately retransmit it through bluetooth instead of sertxd.
Sertxd works flawless but the bluetooth loses data. I'm thinking it's a timing issue, the 433 MHz module transmits 2 bytes of data and waits 1 second between transmission, I guess I can bring in the transmitters and modify them for a longer pause between transmissions but they are battery powered and I wanted to keep the sleep time as long as possible. Right now I have the transmitter 08M2 run at 4 Mhz for the reading/data transmission portion and then lower the speed to 250 Khz for the sleep portion, I transmit every 5 minutes or so and the battery usage is minimal.
I have tried HSEROUT and it's a little better but not perfect.
There must be something special with the SERTXD relative to other serial transmission. I guess I can always put an inverter on the sertxd output and drive the bluetooth module that way.
I'm sure I can think of a workaround but I thought I'd ask, thanks in advance for any help.
I also send battery voltage and internal chip temperature. I have an 08M2 send the received data to the PC using SERTXD and it works perfect but I wanted to add another wrinkle and have another 08M2 receive the data and immediately retransmit it through bluetooth instead of sertxd.
Sertxd works flawless but the bluetooth loses data. I'm thinking it's a timing issue, the 433 MHz module transmits 2 bytes of data and waits 1 second between transmission, I guess I can bring in the transmitters and modify them for a longer pause between transmissions but they are battery powered and I wanted to keep the sleep time as long as possible. Right now I have the transmitter 08M2 run at 4 Mhz for the reading/data transmission portion and then lower the speed to 250 Khz for the sleep portion, I transmit every 5 minutes or so and the battery usage is minimal.
I have tried HSEROUT and it's a little better but not perfect.
There must be something special with the SERTXD relative to other serial transmission. I guess I can always put an inverter on the sertxd output and drive the bluetooth module that way.
I'm sure I can think of a workaround but I thought I'd ask, thanks in advance for any help.
Code:
setfreq M8
high C.4 'set up serial port for T setting, needs to be high
pause 10
Main:
Serin C.2, N1200_8,("ABC"),b0,b1 'Receive from 433 Mhz module, data is always sent 2 bytes at a time with at least 1 second pause
'Sertxd (#b0,",",#b1, cr, lf)
Serout C.4,T9600_8,(#b0,",",#b1, cr, lf) 'Send to Bluetooth module
Goto main