Raspberry pi 3 & Wifi & blynk cloud problem

it kinda looks like what it would be behind the compiler, right?

(i started my MCU journey trying to learn LUA coding, waaaay over my head!)

PS - lets hope we can help these chicken to survive the winter! :slight_smile:

@Dave1829 the Pi code is java and doesn’t use a compiler AFAIK. You can compile code with the Pi though.

I’m told LUA is easier to learn than Arduino code but I haven’t got a clue when I look at LUA code.

Thanks all,

The Pi is connected Wifi… and my router is 35-40 feet away from the Pi (inside isolated coop chicken.) Ethernet cable is not an option. I have tried a netgear wifi extander in the house, less away from the router without more results.

Do you think if i try a usb wifi dongle on the Pi i will have more signal from the wifi router?

What make and model of WiFi dongle are you currently using and surely it is already a USB WiFi dongle?

Is the 35 to 40 feet through fresh air and line of sight? If not please advise what makes up the 35 to 40 feet.

I’m using the builtin wifi adapter in the PI 3. Between the PI and the router, i got the concrete wall of the house and the wood wall of the chicken coop…

With the concrete wall, even without the possible Faraday effect of steel reinforcing in the concrete, then I think you are pushing the signal to the limit.

If you are seeing a lot of dropouts I would probably look at a high powered USB WiFi adaptor with twin aerials. I have a Geetek Janus II that will do 1 to 2km in open air (much, much less through concrete walls). Obviously needs to be compatible with the Pi though.

But the problem is if my signal drop my script crash… if the script can run without crashing if i loose wifi signal it will be a big improvement :wink:

if i can do something like :

If blynk is connected do {
stuff
} if conexion lost do {
stuff
}

at -20 degrees in the night i don’t want my app to crash hehe

I will give you some Arduino code that you might be able to convert to Pi code:

in loop()

  if(Blynk.connected()){  // only run Blynk functions if connected to Blynk
    Blynk.run();
  }

in setup()

timer.setInterval(60000, reconnectBlynk); // check every 60s if connected, needs SimpleTimer library

New function:

void reconnectBlynk() {
  if (!Blynk.connected()) {
    if(Blynk.connect()) {
      BLYNK_LOG("Reconnected");
    } else {
      BLYNK_LOG("Not reconnected");
    }
  }
}

Provided by @vshymanskyy at Continuing loop while reconnecting

That probably has an antenna the size of a matchstick, so that isn’t too good. @Costas suggestion of bigger antenna’s on the Pi will probably be a very effective solution. Your Accesspoint usually has better antenna’s than devices’s like the Pi.

Using Rangeextenders will usually not make things better, but worse. This is due to the technical aspects of Wifi. You must remember Wifi is a half duplex medium, in contrast with Ethernet. When a device receives it cannot send and vice versa. This is because the radio protocol works like this. Ethernet can do both simultaniously, hence full duplex. Because of highly scientific stuff the decay of the radio signal is logarithmic, so if you move away from a certain device 50% of the distance, the signal degradation will be much worse. This is why the wifi range will drop dramatically if there is a wall between the receiver and sender.

Anyway, long story short. try and find a USB dongle which supports external antenna’s and order some huge ass antenna’s from DX or ebay. Make sure it’s compatible with Linux because a lot of sticks are not! Depends on the chipset mostly.

1 Like

Does something like that can improve my pi wifi range?

Yes they are high powered but check the Pi site for compatibility i.e is a driver available or already included in Jessie.

Do you have mains power with the Pi?

Pi USB ports are now much better than they were in the early days but you might need a high powered USB hub to go with the high powered WiFi adaptor.

Take a look at https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=82811&p=585326

MrEngman is a Pi god when it comes to drivers for WiFi adaptors.

It’s made for USB, so it should be able to be powered by USB, but make sure you power your Pi with a decent supply. I’d get a powered hub as Costas suggests.

This is the definitive guide on which WiFi adaptor to use with the Pi http://elinux.org/RPi_USB_Wi-Fi_Adapters

1 Like

Yes i have main power

@Patrice_Bois I have a few dozen WiFi adaptors for my Pi’s covering about 4 or 5 WiFi models.

You don’t really want to be compiling drivers if you can help it.

You should be able to find a fairly high powered WiFi adaptor that already has the drivers in the latest release of Raspbian. Might take a bit of research and a post of two on the Pi forum but worth it in the long run.

1 Like

what about BPL???

Did you change your mind Dave?? :wink:

Hi guys, so i just installed a Asus N-13 wifi dongle… now on the pi i have two wlan available. wlan0 and wlan1, how can i make my new wlan the default one…?

You can edit the interfaces file in /etc/networks. Comment out the wlan0 and add the wlan1 info. That should probably do it.