Increase transmit power :shipit:
rodzic
fe0f348848
commit
bc81068f0a
|
@ -103,7 +103,7 @@
|
|||
|
||||
// Define the name of the accesspoint if the gateway is in accesspoint mode (is
|
||||
// getting WiFi SSID and password using WiFiManager)
|
||||
#define AP_NAME "huangdezeng"
|
||||
#define AP_NAME "zenghi"
|
||||
#define AP_PASSWD "123456"
|
||||
|
||||
|
||||
|
@ -225,9 +225,9 @@ struct wpas {
|
|||
//
|
||||
wpas wpa[] = {
|
||||
{ "" , "" }, // Reserved for WiFi Manager
|
||||
{ "aap", "aapPasswd" },
|
||||
// { "aap", "aapPasswd" },
|
||||
// { "zhixingli", "xc87654321xc" },
|
||||
{ "ape", "apePasswd" }
|
||||
// { "ape", "apePasswd" }
|
||||
};
|
||||
|
||||
// For asserting and testing the following defines are used.
|
||||
|
|
|
@ -498,8 +498,10 @@ int WlanReadWpa() {
|
|||
pass.toCharArray(passBuf,pass.length()+1);
|
||||
Serial.print(F("WlanReadWpa: ")); Serial.print(ssidBuf); Serial.print(F(", ")); Serial.println(passBuf);
|
||||
|
||||
#if 1
|
||||
strcpy(wpa[0].login, ssidBuf); // XXX changed from wpa[0][0] = ssidBuf
|
||||
strcpy(wpa[0].passw, passBuf);
|
||||
#endif// endif 0
|
||||
|
||||
Serial.print(F("WlanReadWpa: <"));
|
||||
Serial.print(wpa[0].login); // XXX
|
||||
|
@ -1219,7 +1221,7 @@ void setup() {
|
|||
wifi_station_set_hostname( hostname );
|
||||
|
||||
// Setup WiFi UDP connection. Give it some time and retry 50 times..
|
||||
while (WlanConnect(1) < 0) {
|
||||
while (WlanConnect(2) < 0) {
|
||||
Serial.print(F("Error Wifi network connect "));
|
||||
Serial.println();
|
||||
yield();
|
||||
|
@ -1447,7 +1449,7 @@ void loop ()
|
|||
|
||||
// If we are not connected, try to connect.
|
||||
// We will not read Udp in this loop cycle then
|
||||
if (WlanConnect(0) < 0) {
|
||||
if (WlanConnect(1) < 0) {
|
||||
#if DUSB>=1
|
||||
Serial.print(F("loop: ERROR reconnect WLAN"));
|
||||
#endif
|
||||
|
|
|
@ -341,8 +341,8 @@ void setPow(uint8_t powe)
|
|||
ASSERT((powe>=2)&&(powe<=15));
|
||||
|
||||
uint8_t pac = (0x80 | (powe & 0xF)) & 0xFF;
|
||||
writeRegister(REG_PAC, (uint8_t)pac); // set 0x09 to pac
|
||||
|
||||
// writeRegister(REG_PAC, (uint8_t)pac); // set 0x09 to pac
|
||||
writeRegister(REG_PAC, (uint8_t)0xff); // set 0x09 to pac
|
||||
// XXX Power settings for CFG_sx1272 are different
|
||||
|
||||
return;
|
||||
|
@ -905,7 +905,9 @@ void initLoraModem()
|
|||
writeRegister(REG_PARAMP, (readRegister(REG_PARAMP) & 0xF0) | 0x08); // set PA ramp-up time 50 uSec
|
||||
|
||||
// Set 0x4D PADAC for SX1276 ; XXX register is 0x5a for sx1272
|
||||
writeRegister(REG_PADAC_SX1276, 0x84); // set 0x4D (PADAC) to 0x84
|
||||
// writeRegister(REG_PADAC_SX1276, 0x84); // set 0x4D (PADAC) to 0x84
|
||||
writeRegister(REG_PADAC_SX1276, 0x87); // set 0x4D (PADAC) to 0x84
|
||||
|
||||
//writeRegister(REG_PADAC, readRegister(REG_PADAC)|0x4);
|
||||
|
||||
// Reset interrupt Mask, enable all interrupts
|
||||
|
|
|
@ -29,16 +29,27 @@ long txDelay= 0x00; // delay time on top of server TMST
|
|||
// Each "real" gateway should support the first 3 frequencies according to LoRa spec.
|
||||
#ifdef XC_DEAL
|
||||
int freqs [] = {
|
||||
470300000, // Channel 0, 868.1 MHz primary
|
||||
470300000, // Channel 1, 868.3 MHz mandatory
|
||||
470300000, // Channel 2, 868.5 MHz mandatory
|
||||
470300000, // Channel 3, 867.1 MHz
|
||||
470300000,
|
||||
470300000,
|
||||
470300000,
|
||||
470300000,
|
||||
470300000,
|
||||
470300000 // Channel, for responses gateway (10%)
|
||||
470300000, // Channel 0, 868.1 MHz primary
|
||||
470300000, // Channel 1, 868.3 MHz mandatory
|
||||
470300000, // Channel 2, 868.5 MHz mandatory
|
||||
470300000, // Channel 3, 867.1 MHz
|
||||
470300000,
|
||||
470300000,
|
||||
470300000,
|
||||
470300000,
|
||||
470300000,
|
||||
470300000 // Channel, for responses gateway (10%
|
||||
|
||||
// 470700000, // Channel 0, 868.1 MHz primary
|
||||
// 470700000, // Channel 1, 868.3 MHz mandatory
|
||||
// 470700000, // Channel 2, 868.5 MHz mandatory
|
||||
// 470700000, // Channel 3, 867.1 MHz
|
||||
// 470700000,
|
||||
// 470700000,
|
||||
// 470700000,
|
||||
// 470700000,
|
||||
// 470700000,
|
||||
// 470700000 // Channel, for responses gateway (10%)
|
||||
};
|
||||
|
||||
#endif /* XC_DEAL */
|
||||
|
|
Ładowanie…
Reference in New Issue