Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: neophyte on October 11, 2015, 06:30:59 PM
-
Greetings,
I don't have a router to plug an ethernet cable into so I've been trying to get wireless to work and it has been driving me crazy. I don't have a lot of experience with networking, but this is what I've done so far.
I've manually downloaded wifi.tcz and all of its dependencies onto a usb stick. I created a shell script to tce-load -i the packages needed and it appears to succeed. I'm using an EDIMAX EW-7811Un usb wifi adapter and the kernel appears to recognize it. Lsmod shows 8192cu so the driver for it has loaded. Iwconfig shows the device as wlan0, but unassociated.
If I cd to /tmp/tcloop/wifi/usr/local/bin/ and sudo sh wifi.sh it can choose a public wifi access point and everything appears to work. It leases me an IP and tells me the IP of the dns. Ifconfig shows wlan0 UP and RUNNING. Iwconfig shows me associated with the access point.
Everything is good so far and wireless should work. But it doesn't. I can't ping www.google.com or anything other than the IP it leased me not even the IP for the DNS server. I can't connect with app browser to download any packages.
I've tried connecting to other access points and I get the same results. I've used both public wifi and private shared key ones and in the end it is the same.
I could really use some advice here because I'm at my wits end.
-
Does your public access point require that you log in somewhere with a browser before it will grant you full access? Hotels are my prime example of this.
-
Don't forget default route
-
@andyj
Not that I'm aware of.
@patrikg
What do you mean exactly?
-
Hi neophyte
The script that sets up my network card contains:
route add default gw 192.168.1.1
You would want to substitute the IP address of your router.
To see the result enter route:
tc@box:~/guilib/grabber/grabber-1.1$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
box * 255.255.255.255 UH 0 0 0 lo
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
tc@box:~/guilib/grabber/grabber-1.1$
-
@Rich
Thanks for replying.
I already have a gateway set in my routing table. I tried adding it again with your script, but strangely I still can't seem to ping the gateway. I don't think it is an issue with my access point because I can use the latest raspbian image on my pi with the exact same hardware setup and easily ping the gateway and get internet access.
I'll list some data from various commands. First off ifconfig
eth0 Link encap:Ethernet HWaddr B8:27:EB:DA:9A:7B
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:54 errors:0 dropped:0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4208 (4.1 KiB) TX bytes:4208 (4.1 KiB)
wlan0 Link encap:Ethernet HWaddr 80:1F:02:B6:F2:A2
inet addr:192.168.100.2 Bcast:192.168.100.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4887 errors:0 dropped:7734 overruns:0 frame:0
TX packets:77 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1687480 (1.6 MiB) TX bytes:33917 (33.1 KiB
The wireless adapter clearly shows up and is running. The driver 8192cu is loaded same as on raspbian. Next the result of the arp command:
Green.workgroup (192.168.100.1) at 80:1f:02:b6:f2:8e [ether] on wlan0
route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default Green.workgroup 0.0.0.0 UG 0 0 0 wlan0
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
192.168.100.0 * 255.255.255.0 U 0 0 0 wlan0
Here is the resolv.conf file
search workgroup
nameserver 192.168.100.1
Curiously, I can poll the name server to get the IP address for google.
Server: 192.168.100.1
Address 1: 192.168.100.1 Green.workgroup
Name: www.google.com
Address 1: 216.58.217.36 den03s10-in-f36.1e100.net
Address 2: 2607:f8b0:400f:803::2004 den03s10-in-x04.1e100.net
But I can't ping the server or google:
PING 192.168.100.1 (192.168.100.1): 56 data bytes
--- 192.168.100.1 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss
So in summary, it isn't the hardware, it isn't the access point, it isn't the driver because it is loaded and works with raspbian, I can lookup IP address but I can't ping them or the server that I get the addresses from(?). It is times like this that I really wish I knew more about networking. I wonder if anyone has really gotten wireless to work with the raspberry pi with piCore?
-
Hi neophyte
I use the name servers provides by my ISP:
tc@box:~/guilib/grabber/grabber-1.1$ cat /etc/resolv.conf
nameserver 68.237.161.12
nameserver 71.243.0.12
tc@box:~/guilib/grabber/grabber-1.1$
Also, this might cause some problems:
wlan0 Link encap:Ethernet HWaddr 80:1F:02:B6:F2:A2
inet addr:192.168.100.2 Bcast:192.168.100.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4887 errors:0 dropped:7734 overruns:0 frame:0
TX packets:77 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1687480 (1.6 MiB) TX bytes:33917 (33.1 KiB
Lots of dropped packets in there.
-
@Rich
Yes, most of those dropped packets are from me trying to ping various servers and getting nothing. Still not sure why it's dropping packets. I'll continue to investigate though.
-
hi neophyte,
I think the dropped packets should be a lot less than the RX packets.
Try the iwconfig command. Check Link Quality and Signal level.
wlan0 IEEE 802.11bgn ESSID:"GEwireless2" Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency:2.462 GHz Access Point: 00:04:ED:C9:57:B8
Bit Rate:300 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:****-****-****-****-****-****-****-**** Security mode:open
Power Management:off
Link Quality=100/100 Signal level=74/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
regards
Greg
-
@Greg Erskine
Link Quality and Signal Level is excellent. Here is the output form iwconfig
wlan0 IEEE 802.11bgn ESSID:"local network" Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency:2.412 GHz Access Point: 80:1F:02:B6:F2:8E
Bit Rate:150 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=100/100 Signal level=96/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
-
Hi neophyte,
I think your assumption that the hardware is OK is correct. So it must be a setup/network issue.
I wonder if anyone has really gotten wireless to work with the raspberry pi with piCore?
I use piCore/piCorePlayer with wireless adaptors all the time. Many people, possibly hundreds, have been doing it successfully for a few years.
regards
Greg
-
@Greg
With regards to set-up, since I can't connect to the internet I manually downloaded all of the extensions that I think I need to get wireless to work onto a usb stick. I then created a script to tce-load -i all of the extensions into ram. I'm not sure if I'm missing something or this is an incorrect way of doing it.
Here is the script which contains the list of wireless extensions that I've downloaded. It is for 6.0:
#! /bin/sh
#kernal module
tce-load -i wireless-3.12.36-piCore+.tcz
#wireless tools
tce-load -i libiw.tcz
tce-load -i wireless_tools.tcz
#wpa_supplicant
tce-load -i libnl.tcz
tce-load -i ncurses.tcz
tce-load -i openssl-1.0.1.tcz
tce-load -i readline.tcz
tce-load -i wpa_supplicant.tcz
#wifi set-up script
tce-load -i wifi.tcz
The only real difference between this and the 7.0 version is the wireless-KERNEL-piCore version matches the kernel version for 7.0.
-
Have you tried to ping gateway or another internal ip.
-
@patrikg
yes. I get no response from the gateway I ping. I've tried connecting to multiple different access points both unencrypted and encrypted and pinging the gateways. Same results.
-
Hi neophyte
Check dmesg for errors, maybe a missing firmware message for the network card.
I don't think it is an issue with my access point because I can use the latest raspbian image on my pi with the exact same hardware setup and easily ping the gateway and get internet access.
Maybe try running some of the following commands under raspbian and check for differences:
lsmod
route
cat /etc/resolv.conf
ifconfig
iwconfig