🎄⛄❄️🎁 It's beginning to look a lot like ADABOX-mas! The next ADABOX from Adafruit ships soon! Get yours now, or give as a gift! 🎄⛄❄️🎁
0

Raspberry Pi, wireless dongle, hostapd
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Raspberry Pi, wireless dongle, hostapd

by dvdroest on Wed Mar 18, 2015 12:59 pm

Ok, I tried it out and while I do get less errors, the end result stays the same:

Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi ~ $ sudo hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0x1393638
ioctl[SIOCSIWMODE]: Invalid argument
Could not set interface to mode(3)!
Could not set interface to master mode!
rtl871xdrv driver initialization failed.


When installing the library there were some issues as well:
Code: Select all | TOGGLE FULL SIZE
    [FAIL] Stopping ISC DHCP server: dhcpd failed!
    [....] Starting advanced IEEE 802.11 management: hostapdioctl[SIOCSIWMODE]: Invalid argument
     failed!
    [ ok ] Starting ISC DHCP server: dhcpd.


The full log was:
Code: Select all | TOGGLE FULL SIZE
    pi@raspberrypi ~ $ sudo apt-get install adafruit-ap
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following NEW packages will be installed:
      adafruit-ap
    0 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
    Need to get 0 B/709 kB of archives.
    After this operation, 0 B of additional disk space will be used.
    Selecting previously unselected package adafruit-ap.
    (Reading database ... 76976 files and directories currently installed.)
    Unpacking adafruit-ap (from .../adafruit-ap_0.1.7-1_armhf.deb) ...
    Setting up adafruit-ap (0.1.7-1) ...
    [ ok ] Stopping ISC DHCP server: dhcpd.
    [ ok ] Stopping advanced IEEE 802.11 management: hostapd.
    update-rc.d: using dependency based boot sequencing
    update-rc.d: using dependency based boot sequencing
    Enter the WiFi SSID: RaspbyDue
    Enter the WiFi Passphrase: something
    [FAIL] Stopping ISC DHCP server: dhcpd failed!
    [ ok ] Stopping advanced IEEE 802.11 management: hostapd.
    [warn] Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning).
    [....] Reconfiguring network interfaces...Internet Systems Consortium DHCP Client 4.2.2
    Copyright 2004-2011 Internet Systems Consortium.
    All rights reserved.
    For info, please visit https://www.isc.org/software/dhcp/

    Listening on LPF/eth0/b8:27:eb:07:16:e0
    Sending on   LPF/eth0/b8:27:eb:07:16:e0
    Sending on   Socket/fallback
    DHCPRELEASE on eth0 to 192.168.178.1 port 67
    Internet Systems Consortium DHCP Client 4.2.2
    Copyright 2004-2011 Internet Systems Consortium.
    All rights reserved.
    For info, please visit https://www.isc.org/software/dhcp/

    Listening on LPF/eth0/b8:27:eb:07:16:e0
    Sending on   LPF/eth0/b8:27:eb:07:16:e0
    Sending on   Socket/fallback
    DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
    DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
    DHCPREQUEST on eth0 to 255.255.255.255 port 67
    DHCPOFFER from 192.168.178.1
    DHCPACK from 192.168.178.1
    bound to 192.168.178.51 -- renewal in 1646 seconds.
    done.
    ifup: interface eth0 already configured
    [....] Starting advanced IEEE 802.11 management: hostapdioctl[SIOCSIWMODE]: Invalid argument
     failed!
    [ ok ] Starting ISC DHCP server: dhcpd.
    update-rc.d: using dependency based boot sequencing



Everything else seems fine (to me):

ifconfig:
Code: Select all | TOGGLE FULL SIZE
    pi@raspberrypi ~ $ ifconfig
    eth0      Link encap:Ethernet  HWaddr b8:27:eb:07:16:e0
              inet addr:192.168.178.51  Bcast:192.168.178.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:2337 errors:0 dropped:0 overruns:0 frame:0
              TX packets:633 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:134895 (131.7 KiB)  TX bytes:79992 (78.1 KiB)

    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:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    wlan0     Link encap:Ethernet  HWaddr ac:a2:13:1b:5b:bb
              inet addr:192.168.42.1  Bcast:0.0.0.0  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:127408 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:27251339 (25.9 MiB)  TX bytes:0 (0.0 B)


iwconfig:
Code: Select all | TOGGLE FULL SIZE
    pi@raspberrypi ~ $ iwconfig
    wlan0     Ralink STA  ESSID:"11n-AP"  Nickname:"MT7601STA"
              Mode:Auto  Frequency=2.412 GHz  Access Point: Not-Associated
              Bit Rate:1 Mb/s
              RTS thr:off   Fragment thr:off
              Link Quality=10/100  Signal level:0 dBm  Noise level:0 dBm
              Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
              Tx excessive retries:0  Invalid misc:0   Missed beacon:0

    lo        no wireless extensions.

    eth0      no wireless extensions.


I'm running out of ideas, anything you guys can think of?

dvdroest
 
Posts: 6
Joined: Fri Mar 06, 2015 6:21 pm

Re: Raspberry Pi, wireless dongle, hostapd

by adafruit2 on Wed Mar 18, 2015 1:03 pm

and you're 100% sure you're using an adafruit wifi adapter?

adafruit2
Site Admin
 
Posts: 18792
Joined: Fri Mar 11, 2005 7:36 pm

Re: Raspberry Pi, wireless dongle, hostapd

by dvdroest on Wed Mar 18, 2015 7:35 pm

Well, I got this USB wifi adapter from a friend, it's 100% identical to the one on https://www.adafruit.com/products/1030, that's how I found it.

wifi.jpg
wifi.jpg (104.39 KiB) Viewed 2724 times


I can ask him where he got it from?

dvdroest
 
Posts: 6
Joined: Fri Mar 06, 2015 6:21 pm

Re: Raspberry Pi, wireless dongle, hostapd

by RiRa12621 on Thu Jun 25, 2015 4:50 pm

some time has passed since the last post for this topic but I get the same output as the last two guys

Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi ~ $ sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0x1d68638
ioctl[SIOCSIWMODE]: Invalid argument
Could not set interface to mode(3)!
Could not set interface to master mode!
rtl871xdrv driver initialization failed.


output for iwconfig
Code: Select all | TOGGLE FULL SIZE
iwconfig
wlan0     IEEE 802.11bgn  ESSID:off/any 
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
         
lo        no wireless extensions.

eth0      no wireless extensions.


output for ifconfig
Code: Select all | TOGGLE FULL SIZE
 ifconfig
eth0      Link encap:Ethernet  Hardware Adresse b8:27:eb:79:25:b5 
          inet Adresse:192.168.0.104  Bcast:192.168.0.255  Maske:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
          RX packets:51256 errors:0 dropped:1 overruns:0 frame:0
          TX packets:19611 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:1000
          RX bytes:73176419 (69.7 MiB)  TX bytes:1825694 (1.7 MiB)

lo        Link encap:Lokale Schleife 
          inet Adresse:127.0.0.1  Maske:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metrik:1
          RX packets:72 errors:0 dropped:0 overruns:0 frame:0
          TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:0
          RX bytes:6288 (6.1 KiB)  TX bytes:6288 (6.1 KiB)

wlan0     Link encap:Ethernet  Hardware Adresse 00:c0:ca:7f:7b:27 
          inet Adresse:192.168.42.1  Bcast:0.0.0.0  Maske:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metrik:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


and the output for dmesg
Code: Select all | TOGGLE FULL SIZE
dmesg
[    0.000000] Booting Linux on physical CPU 0xf00
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.18.11-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Raspberry Pi 2 Model B
[    0.000000] cma: Reserved 8 MiB at 0x3a800000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 241664
[    0.000000] free_area_init_node: node 0, pgdat 8080f480, node_mem_map ba093000
[    0.000000]   Normal zone: 1888 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 241664 pages, LIFO batch:31
[    0.000000] [bcm2709_smp_init_cpus] enter (8620->f3003010)
[    0.000000] [bcm2709_smp_init_cpus] ncores=4
[    0.000000] PERCPU: Embedded 10 pages/cpu @ba061000 s11456 r8192 d21312 u40960
[    0.000000] pcpu-alloc: s11456 r8192 d21312 u40960 alloc=10*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 239776
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1776 bcm2708_fb.fbheight=952 bcm2709.boardrev=0xa01041 bcm2709.serial=0x8b7925b5 smsc95xx.macaddr=B8:27:EB:79:25:B5 bcm2708_fb.fbswap=1 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p6 rootfstype=ext4 elevator=deadline rootwait
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 940832K/966656K available (5722K kernel code, 397K rwdata, 1748K rodata, 384K init, 763K bss, 25824K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
[    0.000000]     vmalloc : 0xbb800000 - 0xff000000   (1080 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xbb000000   ( 944 MB)
[    0.000000]     modules : 0x7f000000 - 0x80000000   (  16 MB)
[    0.000000]       .text : 0x80008000 - 0x80753a48   (7471 kB)
[    0.000000]       .init : 0x80754000 - 0x807b4000   ( 384 kB)
[    0.000000]       .data : 0x807b4000 - 0x808174bc   ( 398 kB)
[    0.000000]        .bss : 0x808174bc - 0x808d6254   ( 764 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:608
[    0.000000] Architected cp15 timer(s) running at 19.20MHz (virt).
[    0.000013] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 3579139424256ns
[    0.000037] Switching to timer-based delay loop, resolution 52ns
[    0.000332] Console: colour dummy device 80x30
[    0.001802] console [tty1] enabled
[    0.001851] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.001932] pid_max: default: 32768 minimum: 301
[    0.002336] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.002399] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.003672] Initializing cgroup subsys memory
[    0.003767] Initializing cgroup subsys devices
[    0.003821] Initializing cgroup subsys freezer
[    0.003871] Initializing cgroup subsys net_cls
[    0.003935] Initializing cgroup subsys blkio
[    0.004042] CPU: Testing write buffer coherency: ok
[    0.004158] ftrace: allocating 19614 entries in 58 pages
[    0.052742] CPU0: update cpu_capacity 1024
[    0.052822] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
[    0.052862] [bcm2709_smp_prepare_cpus] enter
[    0.053014] Setting up static identity map for 0x528478 - 0x5284ac
[    0.112657] [bcm2709_boot_secondary] cpu:1 started (0) 18
[    0.112968] CPU1: Booted secondary processor
[    0.112976] [bcm2709_secondary_init] enter cpu:1
[    0.113030] CPU1: update cpu_capacity 1024
[    0.113039] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
[    0.132632] [bcm2709_boot_secondary] cpu:2 started (0) 17
[    0.132886] CPU2: Booted secondary processor
[    0.132893] [bcm2709_secondary_init] enter cpu:2
[    0.132925] CPU2: update cpu_capacity 1024
[    0.132933] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02
[    0.152713] [bcm2709_boot_secondary] cpu:3 started (0) 17
[    0.152956] CPU3: Booted secondary processor
[    0.152963] [bcm2709_secondary_init] enter cpu:3
[    0.152992] CPU3: update cpu_capacity 1024
[    0.153000] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03
[    0.153094] Brought up 4 CPUs
[    0.153215] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.153248] CPU: All CPU(s) started in SVC mode.
[    0.154232] devtmpfs: initialized
[    0.179082] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.181051] pinctrl core: initialized pinctrl subsystem
[    0.184163] NET: Registered protocol family 16
[    0.189787] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[    0.190970] bcm2709.uart_clock = 3000000
[    0.193730] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.193782] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.193837] mailbox: Broadcom VideoCore Mailbox driver
[    0.193967] bcm2708_vcio: mailbox at f300b880
[    0.194330] bcm_power: Broadcom power driver
[    0.194368] bcm_power_open() -> 0
[    0.194393] bcm_power_request(0, 8)
[    0.695072] bcm_mailbox_read -> 00000080, 0
[    0.695104] bcm_power_request -> 0
[    0.695247] Serial: AMBA PL011 UART driver
[    0.695396] dev:f1: ttyAMA0 at MMIO 0x3f201000 (irq = 83, base_baud = 0) is a PL011 rev3
[    1.203677] console [ttyAMA0] enabled
[    1.275890] SCSI subsystem initialized
[    1.279905] usbcore: registered new interface driver usbfs
[    1.285577] usbcore: registered new interface driver hub
[    1.291048] usbcore: registered new device driver usb
[    1.297959] Switched to clocksource arch_sys_counter
[    1.333594] FS-Cache: Loaded
[    1.336822] CacheFiles: Loaded
[    1.351353] NET: Registered protocol family 2
[    1.357003] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    1.364263] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    1.370969] TCP: Hash tables configured (established 8192 bind 8192)
[    1.377441] TCP: reno registered
[    1.380720] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    1.386705] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    1.393442] NET: Registered protocol family 1
[    1.398513] RPC: Registered named UNIX socket transport module.
[    1.404457] RPC: Registered udp transport module.
[    1.409226] RPC: Registered tcp transport module.
[    1.413944] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.421369] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    1.429783] bcm2708_dma: DMA manager at f3007000
[    1.434576] vc-mem: phys_addr:0x00000000 mem_base=0x3dc00000 mem_size:0x3f000000(1008 MiB)
[    1.444395] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    1.450920] audit: initializing netlink subsys (disabled)
[    1.456394] audit: type=2000 audit(1.239:1): initialized
[    1.478077] VFS: Disk quotas dquot_6.5.2
[    1.482391] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.491938] FS-Cache: Netfs 'nfs' registered for caching
[    1.498366] NFS: Registering the id_resolver key type
[    1.503532] Key type id_resolver registered
[    1.507727] Key type id_legacy registered
[    1.512991] msgmni has been set to 1853
[    1.518708] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    1.526324] io scheduler noop registered
[    1.530303] io scheduler deadline registered (default)
[    1.535787] io scheduler cfq registered
[    1.542281] BCM2708FB: allocated DMA memory fac00000
[    1.547312] BCM2708FB: allocated DMA channel 0 @ f3007000
[    1.580529] Console: switching to colour frame buffer device 222x59
[    1.604412] bcm2708-dmaengine bcm2708-dmaengine: Load BCM2835 DMA engine driver
[    1.612191] uart-pl011 dev:f1: no DMA platform data
[    1.617673] vc-cma: Videocore CMA driver
[    1.621771] vc-cma: vc_cma_base      = 0x00000000
[    1.626566] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    1.632121] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    1.649437] brd: module loaded
[    1.658277] loop: module loaded
[    1.661830] vchiq: vchiq_init_state: slot_zero = 0xba800000, is_master = 0
[    1.669747] Loading iSCSI transport class v2.0-870.
[    1.675728] usbcore: registered new interface driver smsc95xx
[    1.681706] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.887884] Core Release: 2.80a
[    1.891136] Setting default values for core params
[    1.896056] Finished setting default values for core params
[    2.102154] Using Buffer DMA mode
[    2.105542] Periodic Transfer Interrupt Enhancement - disabled
[    2.111500] Multiprocessor Interrupt Enhancement - disabled
[    2.117175] OTG VER PARAM: 0, OTG VER FLAG: 0
[    2.121637] Dedicated Tx FIFOs mode
[    2.125556] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xbac14000 dma = 0xfac14000 len=9024
[    2.135613] FIQ FSM acceleration enabled for :
[    2.135613] Non-periodic Split Transactions
[    2.135613] Periodic Split Transactions
[    2.135613] High-Speed Isochronous Endpoints
[    2.161603] dwc_otg: Microframe scheduler enabled
[    2.161676] WARN::hcd_init_fiq:412: FIQ on core 1 at 0x803d98b4
[    2.172153] WARN::hcd_init_fiq:413: FIQ ASM at 0x803d9c10 length 36
[    2.182970] WARN::hcd_init_fiq:438: MPHI regs_base at 0xbb80a000
[    2.193551] dwc_otg bcm2708_usb: DWC OTG Controller
[    2.203074] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[    2.214993] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
[    2.225131] Init: Port Power? op_state=1
[    2.233591] Init: Power Port (0)
[    2.241640] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.252992] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.264746] usb usb1: Product: DWC OTG Controller
[    2.273918] usb usb1: Manufacturer: Linux 3.18.11-v7+ dwc_otg_hcd
[    2.284484] usb usb1: SerialNumber: bcm2708_usb
[    2.294358] hub 1-0:1.0: USB hub found
[    2.302652] hub 1-0:1.0: 1 port detected
[    2.311452] dwc_otg: FIQ enabled
[    2.311466] dwc_otg: NAK holdoff enabled
[    2.311476] dwc_otg: FIQ split-transaction FSM enabled
[    2.311516] Module dwc_common_port init
[    2.311919] usbcore: registered new interface driver usb-storage
[    2.322685] mousedev: PS/2 mouse device common for all mice
[    2.333308] bcm2835-cpufreq: min=600000 max=900000
[    2.342888] sdhci: Secure Digital Host Controller Interface driver
[    2.353554] sdhci: Copyright(c) Pierre Ossman
[    2.362627] DMA channels allocated for the MMC driver
[    2.398001] Load BCM2835 MMC driver
[    2.410542] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.421301] ledtrig-cpu: registered to indicate activity on CPUs
[    2.432042] hidraw: raw HID events driver (C) Jiri Kosina
[    2.442246] usbcore: registered new interface driver usbhid
[    2.454371] usbhid: USB HID core driver
[    2.464047] TCP: cubic registered
[    2.472893] Initializing XFRM netlink socket
[    2.481670] NET: Registered protocol family 17
[    2.490710] Key type dns_resolver registered
[    2.499816] Registering SWP/SWPB emulation handler
[    2.510014] registered taskstats version 1
[    2.518137] Indeed it is in host mode hprt0 = 00021501
[    2.528468] vc-sm: Videocore shared memory driver
[    2.537645] [vc_sm_connected_init]: start
[    2.546796] [vc_sm_connected_init]: end - returning 0
[    2.557629] Waiting for root device /dev/mmcblk0p6...
[    2.573511] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.591303] mmc0: new high speed SDHC card at address aaaa
[    2.602019] mmcblk0: mmc0:aaaa SL08G 7.40 GiB
[    2.613723]  mmcblk0: p1 p2 < p5 p6 > p3
[    2.681526] EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)
[    2.694373] VFS: Mounted root (ext4 filesystem) readonly on device 179:6.
[    2.708094] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.714947] devtmpfs: mounted
[    2.715652] Freeing unused kernel memory: 384K (80754000 - 807b4000)
[    2.737797] Indeed it is in host mode hprt0 = 00001101
[    2.938429] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[    2.952721] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.966291] hub 1-1:1.0: USB hub found
[    2.974771] hub 1-1:1.0: 5 ports detected
[    3.258265] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    3.368500] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    3.380274] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.395806] smsc95xx v1.0.4
[    3.462686] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:79:25:b5
[    3.558308] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
[    3.684494] usb 1-1.2: New USB device found, idVendor=046d, idProduct=c52b
[    3.697351] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.710103] usb 1-1.2: Product: USB Receiver
[    3.719850] usb 1-1.2: Manufacturer: Logitech
[    3.742191] input: Logitech USB Receiver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:046D:C52B.0001/input/input0
[    3.760260] hid-generic 0003:046D:C52B.0001: input,hidraw0: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-bcm2708_usb-1.2/input0
[    3.792906] input: Logitech USB Receiver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.1/0003:046D:C52B.0002/input/input1
[    3.811403] hid-generic 0003:046D:C52B.0002: input,hiddev0,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-bcm2708_usb-1.2/input1
[    3.813337] udevd[175]: starting version 175
[    3.859224] hid-generic 0003:046D:C52B.0003: hiddev0,hidraw2: USB HID v1.11 Device [Logitech USB Receiver] on usb-bcm2708_usb-1.2/input2
[    3.958216] usb 1-1.5: new high-speed USB device number 5 using dwc_otg
[    4.105860] usb 1-1.5: New USB device found, idVendor=148f, idProduct=3070
[    4.118806] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.132828] usb 1-1.5: Product: 802.11 n WLAN
[    4.144886] usb 1-1.5: Manufacturer: Ralink
[    4.155868] usb 1-1.5: SerialNumber: 1.0
[    5.021916] cfg80211: Calling CRDA to update world regulatory domain
[    5.198144] usb 1-1.5: reset high-speed USB device number 5 using dwc_otg
[    5.338704] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[    5.358798] random: nonblocking pool is initialized
[    5.383954] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005 detected
[    5.427057] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    5.429238] usbcore: registered new interface driver rt2800usb
[    6.944975] EXT4-fs (mmcblk0p6): re-mounted. Opts: (null)
[    7.178269] EXT4-fs (mmcblk0p6): re-mounted. Opts: (null)
[   11.647732] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   11.650301] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29
[   12.242058] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   13.903261] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1
[   16.516745] Adding 102396k swap on /var/swap.  Priority:-1 extents:1 across:102396k SSFS
[   25.031701] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
[  470.716374] ip_tables: (C) 2000-2006 Netfilter Core Team
[  470.735755] nf_conntrack version 0.5.0 (14834 buckets, 59336 max)

i have to admit that I did not get the wirelass usb card from here but would still kindly ask for help with this topic

usb card I am using is an Alfa Network AWUS036NEH

RiRa12621
 
Posts: 1
Joined: Thu Jun 25, 2015 4:45 pm

Re: Raspberry Pi, wireless dongle, hostapd

by adafruit_support_mike on Thu Jun 25, 2015 11:21 pm

The dmesg trace says you have a Ralink wifi adapter, vendor id: 148f, product id: 3070.

That's a different manufacturer and chipset from the wifi adapters we have in the shop. Ours use the Realtek 8192cu chipset.

Some digging online says that the driver for that device is included in the standard version of Raspbian, but I'm afraid we don't have any specific information on making it work. You might want to check over in the RasPi Forums and see if the folks there have experience working with it: http://www.raspberrypi.org/forums/

adafruit_support_mike
 
Posts: 59487
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

by andrew76 on Sat Jul 11, 2015 9:57 am

Hi!

I followed the tutorial https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point/install-software and things went swimmingly... Since I have a slightly different USB wifi adapter, I followed these instructions https://wireless.wiki.kernel.org/en/users/Documentation/hostapd to compile my own version of hostapd.

The wifi network shows up on my devices, but I can't connect. This is what the log shows:

Code: Select all | TOGGLE FULL SIZE
Jul 11 15:50:33 raspberrypi hostapd: wlan0: STA 80:be:05:64:99:8d IEEE 802.11: authenticated
Jul 11 15:50:33 raspberrypi hostapd: wlan0: STA <mac address redacted> IEEE 802.11: authenticated
Jul 11 15:50:33 raspberrypi hostapd: wlan0: STA <mac address redacted> IEEE 802.11: authenticated
Jul 11 15:50:33 raspberrypi hostapd: wlan0: STA <mac address redacted> IEEE 802.11: associated (aid 1)
Jul 11 15:50:33 raspberrypi hostapd: wlan0: STA <mac address redacted> RADIUS: starting accounting session 05C64C11-00000000
Jul 11 15:50:34 raspberrypi hostapd: wlan0: STA <mac address redacted> IEEE 802.11: authenticated
Jul 11 15:50:34 raspberrypi hostapd: wlan0: STA <mac address redacted> IEEE 802.11: authenticated


My devices tell me "Unable to join the network "MyAP"" or "The Wi-Fi network "MyAP" could not be joined"

My feeling is that the requests coming from the clients aren't being forwarded to the DHCP server.

Code: Select all | TOGGLE FULL SIZE
sudo service isc-dhcp-server status
returns:
Code: Select all | TOGGLE FULL SIZE
Status of ISC DHCP server: dhcpd is running.


Code: Select all | TOGGLE FULL SIZE
 sudo service hostapd status
returns:
Code: Select all | TOGGLE FULL SIZE
[ ok ] hostapd is running.


All the conf files are as described in the article (first link above).

Can anyone help me out?


Thanks!
Andrew

andrew76
 
Posts: 7
Joined: Fri Jul 10, 2015 6:06 am

Re: Raspberry Pi, wireless dongle, hostapd

by andrew76 on Sat Jul 11, 2015 10:19 am

Update:

Looking at
Code: Select all | TOGGLE FULL SIZE
tail -f /var/log/syslog
while bringing up the hostapd service
Code: Select all | TOGGLE FULL SIZE
sudo service hostapd start
yields this log entry:
Code: Select all | TOGGLE FULL SIZE
Jul 11 16:16:48 raspberrypi dhcpd: receive_packet failed on wlan0: Network is down


However,
Code: Select all | TOGGLE FULL SIZE
sudo ifconfig
yields:
Code: Select all | TOGGLE FULL SIZE
eth0      Link encap:Ethernet  HWaddr <redacted> 
          inet addr:192.168.1.167  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6949 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1439 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:465283 (454.3 KiB)  TX bytes:222458 (217.2 KiB)

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:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5568 (5.4 KiB)  TX bytes:5568 (5.4 KiB)

wlan0     Link encap:Ethernet  HWaddr <redacted> 
          inet addr:192.168.42.1  Bcast:192.168.42.255  Mask:255.255.255.0
          UP BROADCAST RUNNING 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)


What am I missing?

andrew76
 
Posts: 7
Joined: Fri Jul 10, 2015 6:06 am

Re: Raspberry Pi, wireless dongle, hostapd

by adafruit_support_mike on Sat Jul 11, 2015 10:30 pm

It looks like wlan0 is trying to get an address via dhcp. What do you have in /etc/network/interfaces?

adafruit_support_mike
 
Posts: 59487
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

by andrew76 on Sun Jul 12, 2015 1:24 am

Here's my /etc/network/interfaces:

Code: Select all | TOGGLE FULL SIZE
auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0

iface wlan0 inet static
  address 192.168.42.1
  netmask 255.255.255.0

up iptables-restore < /etc/iptables.ipv4.nat

andrew76
 
Posts: 7
Joined: Fri Jul 10, 2015 6:06 am

Re: Raspberry Pi, wireless dongle, hostapd

by IdeeQuadrat on Sun Jul 12, 2015 7:48 am

Hallo,

can you please send me a configuration file which made it happen ... ?

ThePiHut dongle and hostapd

ThanX

Andreas

IdeeQuadrat
 
Posts: 1
Joined: Sun Jul 12, 2015 7:19 am

Re: Raspberry Pi, wireless dongle, hostapd

by andrew76 on Sun Jul 12, 2015 9:23 am

... not sure what you mean. I made these changes by hand. Following the tutorial linked in my initial post.

andrew76
 
Posts: 7
Joined: Fri Jul 10, 2015 6:06 am

Re: Raspberry Pi, wireless dongle, hostapd

by adafruit_support_mike on Mon Jul 13, 2015 12:09 am

Try changing the line:

Code: Select all | TOGGLE FULL SIZE
allow-hotplug wlan0
to:

Code: Select all | TOGGLE FULL SIZE
auto wlan0
The 'allow-hotplug' directive tells the OS to configure the interface any time it recognizes a wifi adapter during USB discovery, and that *usually* includes boot time. Sometimes it doesn't work though, so the interface doesn't get configured at boot.

The 'auto' directive tells the OS to configure the interface any time it gets a general "configure the network" signal, which does always happen at boot time.

adafruit_support_mike
 
Posts: 59487
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

by andrew76 on Mon Jul 13, 2015 1:16 am

Thank you for your response. As of today, my Pi2 is wrapped up in a project for the next few weeks. I had wanted to fit it with its own WiFi access so that the users could connect and download data that will be generated within the project. Alas, time ran out for me :-).

I will pick this up sometime in September... fiddle about some more and try to figure out what was going on. I'll get back to you if I get stuck again.


Thanks once more!
Andrew

andrew76
 
Posts: 7
Joined: Fri Jul 10, 2015 6:06 am

Re: Raspberry Pi, wireless dongle, hostapd

by matlabviet on Sun Nov 08, 2015 1:10 pm

I also got a sample problem, and the reason is i bought a fake product that used mt7601U (Ralink) chip.

matlabviet
 
Posts: 2
Joined: Sun Nov 08, 2015 1:09 pm

Re: Raspberry Pi, wireless dongle, hostapd

by matlabviet on Sun Nov 08, 2015 1:13 pm

Now i can use the AP mode with edimax , so any one help me how to back to normal mode from AP mode please! Thank
!

matlabviet
 
Posts: 2
Joined: Sun Nov 08, 2015 1:09 pm

Please be positive and constructive with your questions and comments.