traputaca
Posts: 8
Joined: Tue Nov 22, 2016 11:36 pm

ad-hoc connection -- GPIO

Wed Dec 21, 2016 6:22 pm

Hello,

I have a question : is it possible to have an ad-hoc connection (between smartphone and Rpi or computer and Rpi) to launch program, commute the Gpio or other thing where we haven't need internet ?

at home i use mainly VNC or SSH. but i have an outdoor project where i haven't got internet.

Thanks,

james-at-lo-tech
Posts: 45
Joined: Sat Oct 04, 2014 1:07 pm

Re: ad-hoc connection -- GPIO

Wed Dec 21, 2016 7:22 pm

You could use the RPi to create a wireless network and have the phones etc connect to that. Or have a dedicated wireless router doing this bit and the RPi just connected to it by Ethernet.

traputaca
Posts: 8
Joined: Tue Nov 22, 2016 11:36 pm

Re: ad-hoc connection -- GPIO

Wed Dec 21, 2016 7:27 pm

Ok thanks,

I have read i can do an ad-hoc network with my pi, but after, i just have to connect to the network i created ? i just have to connect to the IP (for ssh or vnc) That I configured ?

james-at-lo-tech
Posts: 45
Joined: Sat Oct 04, 2014 1:07 pm

Re: ad-hoc connection -- GPIO

Wed Dec 21, 2016 7:35 pm

Basically, yes, you could run everything from the RPi by running the WiFi in master mode and having a DHCP server also installed (e.g. dnsmasq). It might though be easier, if you're not familiar with this part, to just get a low cost wireless router of some description (NetGear, LinkSys etc) as it will be preconfigured to do all of this already.

User avatar
DougieLawson
Posts: 38883
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: ad-hoc connection -- GPIO

Wed Dec 21, 2016 8:05 pm

Get your RPi running hostapd as an infrastructure access point. Your phone can then join that network as an infrastructure client.
Or run a WiFi AP on your phone and connect it the other way round.

Getting an AP running on your RPi3 is well documented at: https://frillip.com/using-your-raspberr ... h-hostapd/
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Beginners”