wtshing
Posts: 8
Joined: Wed Jan 31, 2018 3:52 pm

Is it possible to use both wifi & bt connection at the same time?

Wed Jan 31, 2018 4:06 pm

Hi guys,

Currently, I am doing a project and I want to ask some questions.

1. Will the iot market product become non-functionable if the Internet connection is lost (cannot connect to the their cloud)?

2. Will the above problem exist for the Rpi products?

3. If I want to do a project that, if the WIFI connection is lost for my RPi zero w, the device will automatically change to use bt to communicate with other connected gadgets. Is it possible to do this?

Thanks a lot!

User avatar
Douglas6
Posts: 4801
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Is it possible to use both wifi & bt connection at the same time?

Wed Jan 31, 2018 8:20 pm

1. Depends.
2. Depends.
3. Depends.

User avatar
Roken
Posts: 314
Joined: Sun Dec 31, 2017 4:35 pm
Location: UK

Re: Is it possible to use both wifi & bt connection at the same time?

Wed Jan 31, 2018 9:29 pm

You could probably script it by checking if wlan0 has an IP address, and switching if it doesn't (or switching back if it does).
Headless PI. OMG, someone cut it's head off. Oh, hang on. it didn't have one to start with.

Heater
Posts: 14257
Joined: Tue Jul 17, 2012 3:02 pm

Re: Is it possible to use both wifi & bt connection at the same time?

Wed Jan 31, 2018 9:45 pm

wtshing,
1. Will the iot market product become non-functionable if the Internet connection is lost (cannot connect to the their cloud)?
What IOT product do you mean?

Certainly there are IOT devices that become useless if the manufacturer's servers goes away. It has happened many times already.
2. Will the above problem exist for the Rpi products?
No. The Raspberry Pi is not such a device. It's a general purpose computer. What it does is all up to you.
3. If I want to do a project that, if the WIFI connection is lost for my RPi zero w, the device will automatically change to use bt to communicate with other connected gadgets. Is it possible to do this?
I'm sure it's possible. You just have to configure/program it so.
Memory in C++ is a leaky abstraction .

wtshing
Posts: 8
Joined: Wed Jan 31, 2018 3:52 pm

Re: Is it possible to use both wifi & bt connection at the same time?

Thu Feb 01, 2018 7:36 am

Roken wrote:
Wed Jan 31, 2018 9:29 pm
You could probably script it by checking if wlan0 has an IP address, and switching if it doesn't (or switching back if it does).
Thanks a lot!

Will it be so difficult for the programming?

wtshing
Posts: 8
Joined: Wed Jan 31, 2018 3:52 pm

Re: Is it possible to use both wifi & bt connection at the same time?

Thu Feb 01, 2018 7:40 am

Heater wrote:
Wed Jan 31, 2018 9:45 pm
wtshing,
1. Will the iot market product become non-functionable if the Internet connection is lost (cannot connect to the their cloud)?
What IOT product do you mean?

Certainly there are IOT devices that become useless if the manufacturer's servers goes away. It has happened many times already.
2. Will the above problem exist for the Rpi products?
No. The Raspberry Pi is not such a device. It's a general purpose computer. What it does is all up to you.
3. If I want to do a project that, if the WIFI connection is lost for my RPi zero w, the device will automatically change to use bt to communicate with other connected gadgets. Is it possible to do this?
I'm sure it's possible. You just have to configure/program it so.
1. Just the general market product nowadays. It's because I want to create a product that can solve some limitations of the current market product. I want to keep the function simple (e.g. just turn on/ off the light bulbs), but can enhance the stability of the system.

2. This mean I can solve this limitations!

3. Do you know how to handle this? You can just give me the general method/ some useful posts if you can. I am just a newbie to RPi, thank you very much.

Once again, thanks.

User avatar
Roken
Posts: 314
Joined: Sun Dec 31, 2017 4:35 pm
Location: UK

Re: Is it possible to use both wifi & bt connection at the same time?

Thu Feb 01, 2018 8:22 pm

wtshing wrote:
Thu Feb 01, 2018 7:36 am
Roken wrote:
Wed Jan 31, 2018 9:29 pm
You could probably script it by checking if wlan0 has an IP address, and switching if it doesn't (or switching back if it does).
Thanks a lot!

Will it be so difficult for the programming?
A bash script should be enough. I haven't worked with BT, but a simple bash test for wlan0 could be:

Code: Select all

WLAN=`ifconfig wlan0 | awk '/broadcast/ {print $2}'`; if [[ $WLAN != "" ]]; then echo "wlan0 is connected"; else echo "wlan0 is down"; fi
Headless PI. OMG, someone cut it's head off. Oh, hang on. it didn't have one to start with.

ejolson
Posts: 4036
Joined: Tue Mar 18, 2014 11:47 am

Re: Is it possible to use both wifi & bt connection at the same time?

Fri Feb 02, 2018 2:50 am

wtshing wrote:
Thu Feb 01, 2018 7:36 am
Will it be so difficult for the programming?
Someone who grew up in the tropics asked whether ice skating was difficult to someone who grew up where the lakes are frozen. Likewise, someone who grew up where the lakes are frozen asked whether swimming was difficult to someone from the tropics.

If you learn something as a child, it does not seem difficult, especially if all the other children are doing it too. That is why computer literacy, in the sense of reading and writing computer programs, has been added to the school curriculum. If things go as planned, the answer to your question will be "programming is easy."

Return to “General discussion”