WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Pi 3 WiFi setup  (Read 10032 times)

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Pi 3 WiFi setup
« on: March 26, 2016, 10:24:36 PM »
Putting this here in case I forget how:)
Thanks to Paul_123  and others for help.

After installing piCore-xx.img, you will/may need to increase mmcblk0p2 in size to make room for the extra files.

tce-load -wi firmware-brcmfmac43430.tcz
tce-load -wi wifi.tcz
filetool.s -b
sudo reboot
sudo wifi.sh

wifi.sh allows you to manually pick a router.
Still need to figure out automatic connection on boot.
Lots more testing/learning wifi stuff.

Bela, could make the standard piCore-xx.img a bit bigger to have room for the wifi and soon bluetooth files.
Maybe one day detect on boot if it is a Pi 3 and have wifi/ble in the kernel boot mmcblk0p1?





Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1153
Re: Pi 3 WiFi setup
« Reply #1 on: March 26, 2016, 11:41:55 PM »
Putting this here in case I forget how:)
Thanks to Paul_123  and others for help.

After installing piCore-xx.img, you will/may need to increase mmcblk0p2 in size to make room for the extra files.

tce-load -wi firmware-brcmfmac43430.tcz
tce-load -wi wifi.tcz
filetool.s -b
sudo reboot
sudo wifi.sh

wifi.sh allows you to manually pick a router.
Still need to figure out automatic connection on boot.
Lots more testing/learning wifi stuff.

Bela, could make the standard piCore-xx.img a bit bigger to have room for the wifi and soon bluetooth files.
Maybe one day detect on boot if it is a Pi 3 and have wifi/ble in the kernel boot mmcblk0p1?

You are very close.   After you run wifi.sh and get your wifi setup.   You need to run a backup to save the wifi.db file that is saved in your home directory.

also put the command in /opt/bootlocal.sh to automatically connect at start.
Code: [Select]
wifi.sh -a


Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: Pi 3 WiFi setup
« Reply #2 on: March 27, 2016, 12:49:34 AM »
Thanks Paul.

I did wonder what that wifi.db file was for.
Might need to edit wifi.sh, got a home network on 10.0.0.x not 192.168.x.x

Gavin

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 404
Re: Pi 3 WiFi setup
« Reply #3 on: March 27, 2016, 01:02:20 AM »
Thanks Paul.

I did wonder what that wifi.db file was for.
Might need to edit wifi.sh, got a home network on 10.0.0.x not 192.168.x.x

Gavin

Hi Gavin,

I think wifi.sh will work with 10.0.0.x. The defaults might be 192.168.x.x but I don't think it stops 10.0.0.x working.

Please let me know if it breaks!

regards
Greg

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: Pi 3 WiFi setup
« Reply #4 on: March 27, 2016, 01:08:36 AM »
Hi Paul,

Got a NBN router, it has Telstra Air and Fon Air these are free access on 192.168.x.x.
Seems it found these first and not my home network.

Hmm seems to be going via the ethernet for openssh.
Still got something to sort out to make it wireless.

Gavin

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Pi 3 WiFi setup
« Reply #5 on: March 27, 2016, 05:54:08 AM »
Bela, could make the standard piCore-xx.img a bit bigger to have room for the wifi and soon bluetooth files.
Maybe one day detect on boot if it is a Pi 3 and have wifi/ble in the kernel boot mmcblk0p1?

Just to make it bigger without adding new files to the image has no sense, as for sure you must resize it anyhow if you add applications, and you can not tell how much space is needed. Resize when it is really needed an easy procedure, safe and well documented.

Actually RPi3 is used as an RPi2 in 32-bit mode, sharing the RPi2 repo, kernel, etc. Just adding the WiFi kernel modules to initrd would be an unneded overhead for RPi2 while an RPi3 dedicated initrd would be an extra 5Mbyte. Also for RPi3 users need the WiFi tcz's to make it usable which is not needed by others, and also wifi kernel modules are different for RPi0/RPi1. Due to different WiFi adapters, firmware, etc. WiFi always need customization.

I do not want to reintroduce multiple SD card images as it was before which makes life more complicated for both users and maintainers. Please keep in mind that TC/piCore is not a distribution but a core system say a toolkit.

Of course if one is making an RPi3 special edition it is fine. We can discuss it, check and if it fits to piCore concept and implementation we can make it available as a community version, I appreciate it. But do not want to change the current SD card structure.





Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: Pi 3 WiFi setup
« Reply #6 on: March 27, 2016, 07:16:55 AM »
Hi Bela,

Got a bit carried way:)
Yep no point wasting space just for the Pi 3.
If I can ever get any, my Pi 3's will be out numbered by Pi Zeros anyway.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1153
Re: Pi 3 WiFi setup
« Reply #7 on: March 27, 2016, 08:11:31 AM »
Thanks Paul.

I did wonder what that wifi.db file was for.
Might need to edit wifi.sh, got a home network on 10.0.0.x not 192.168.x.x

Gavin

Are you trying to use a static IP address?  Wifi.sh will work with any address range with DHCP

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: Pi 3 WiFi setup
« Reply #8 on: March 27, 2016, 10:31:18 PM »
Tested static address before but not in current setup, it was a hack.
Messed about in bootlocal , pkill udhcpc ........
Searching forums now.

Official method?
nodhcp in boot and  ????

In Raspbian set ip addresses in /etc/network/interfaces
Not sure for piCore how to set static addresses

Got busybox-httpd serving a javascript enhanced web page over WiFi.
Can openssh into it.

Very close now to WiFi robots etc, software wise anyway:).
Time to get cameras hooked up and stream them.
Need to get a serious power supply, at limits of current one for the Pi 3.

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: Pi 3 WiFi setup
« Reply #9 on: March 27, 2016, 10:50:12 PM »
Interesting.
nodhcp in boot means I lost the wired ethernet.
Lucky I forgot to disable wifi.sh -a in bootlocal, could wifi back in to fix it.

Might have to set static eth0 and wlan0?


Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: Pi 3 WiFi setup
« Reply #10 on: March 27, 2016, 11:14:57 PM »
removed nodhcp from boot

bootlocal.sh
....
ifconfig wlan0 10.0.0.x
#wifi.sh  -a

interesting  things happening
I can see the wifi webpage but got ntpd: bad address 'pool.nt.org' on boot
Helps if 10.0.0.x is not used on another device:(

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 684
Re: Pi 3 WiFi setup
« Reply #11 on: March 28, 2016, 06:45:40 AM »
You need to setup dns if you use static address.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1153
Re: Pi 3 WiFi setup
« Reply #12 on: March 28, 2016, 08:39:25 AM »
Interesting.
nodhcp in boot means I lost the wired ethernet.
Lucky I forgot to disable wifi.sh -a in bootlocal, could wifi back in to fix it.

Might have to set static eth0 and wlan0?

I would recommend leaving everything DHCP.   If you want your pi to get the same IP address all the time, your DHCP server in your router should be able to be set to do that.

If you want to do static, as patrick mentioned you have to setup dns or set /etc/resolv.conf.   You will also need to set your default route.    Again, udhcpc does all this for you.  Let it.

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: Pi 3 WiFi setup
« Reply #13 on: March 28, 2016, 09:30:11 AM »
Yep leave things as they are.
WiFi is working, webserver is working.
Time to get it sending pics and getting it mobile.
Can start testing wifi on the model A's, A+'s putting the bot army together.

Putting nodhcp  in boot messes up wired eth0 which I need if WiFi goes haywire.
wifi.sh -a in bootlocal works too, boot does get slowed down a bit waiting for connection.

Got lots of gadgets on the home network, anyone can be used to find the wifi Pi's.
Especially if I change sethostname in bootsync to something distinctive. Hal, Huey, Dewey and Louie, No5 ?

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1153
Re: Pi 3 WiFi setup
« Reply #14 on: March 28, 2016, 12:44:51 PM »
Got lots of gadgets on the home network, anyone can be used to find the wifi Pi's.
Especially if I change sethostname in bootsync to something distinctive. Hal, Huey, Dewey and Louie, No5 ?

Actually setting hostname in bootsync.sh doesn't work most of the time.   The only sure fire way to set the hostname is to do it on the boot command line.