#!/usr/bin/env python2 import RFM69_POCSAG from RFM69_POCSAGregisters import * import datetime import time from ConfigParser import SafeConfigParser config = SafeConfigParser() rfmModule = RFM69_POCSAG.RFM69_POCSAG(RF69_433MHZ, pocsagBaudRate=1200, isRFM69HW = True) #rfmModule.shutdown() print "Performing rcCalibration" rfmModule.writeReg(REG_FDEVMSB, 0x00) rfmModule.writeReg(REG_FDEVLSB, 0x4a) freqHz = 434790000 freqHz /= 61.03515625 # divide down by FSTEP to get FRF freqHz = int(freqHz) + 35 # offset per chip (you may have to calibrate) rfmModule.setFreqeuncy(freqHz) rfmModule.rcCalibration() rfmModule.setHighPower(True) import uuid def my_random_string(string_length=10): """Returns a random string of length string_length.""" random = str(uuid.uuid4())+str(uuid.uuid4())+str(uuid.uuid4())+str(uuid.uuid4())+str(uuid.uuid4())+str(uuid.uuid4())+str(uuid.uuid4())+str(uuid.uuid4()) # Convert UUID format to a Python string. random = random.upper() # Make all characters uppercase. random = random.replace("-","") # Remove the UUID '-'. return random[0:string_length] # Return the random string. from pocsag import encodeTXBatch msgs = [] """ msgs.append([False, "133722", 'Zeile 1\nZeile 2\nZeile 3\nZeile 4']) msgs.append([False, "133742", '1234567890^12w3e4rt5zu