Jump to content

billius

Active Members
  • Posts

    32
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by billius

  1. Is anyone else interested in getting this working? my adapter is shown with lsusb: Bus 001 Device 004: ID 0bda:8187 Realtek Semiconductor Corp. RTL8187 Wireless Adapter the driver is available in opkg's repository: Package: kmod-rtl8187 Version: 3.2.9+2012-02-27-1 Depends: kernel (= 3.2.9-1-7ca3c65ac3709dabad42d460596851da), kmod-eeprom-93cx6, kmod-mac80211, kmod-usb-core Provides: Status: install user installed Architecture: ar71xx Installed-Time: 2340tesccc as you can see above, it needs kernel 3.2.9, when uname -a reveals that we're running the old 2.6.39.4 kernel. Linux Pineapple 2.6.39.4 #58 Tue Apr 3 14:50:25 BST 2012 mips GNU/Linux this raises a couple of questions: does jasager/karma require this old kernel or can we update it? if not, can we get a module compatible with our kernel? I'm sure there are many people who want to get this done so we can have some nice routing through wifi on other channels, or have a USB hub have a backpack such as Darren's in the case mod challenge with a few RTL8187s.
  2. after much agony trying to get my Huawei modem to work with the pineapple, I managed it with a slightly unconventional approach. newer Huawei modems don't support usb modeswitch, but instead wait for the kernel to work out what it is and use the correct kernel module on it. the first step is to make sure that you have the serial interface enabled. you can check this by issuing: ls /dev/ttyUSB* if you get /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3 then your modem is currently in the correct mode; but if not, you need to insert the correct kernel module. first, find the ID of your USB modem by issuing lsusb and find your modem. for me, it was the fourth one. root@Pineapple:~/sslstrip-0.9# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 0409:0059 NEC Corp. HighSpeed Hub Bus 001 Device 004: ID 0781:5170 SanDisk Corp. Bus 001 Device 007: ID 12d1:140c Huawei Technologies Co., Ltd. with the above, the vendor ID is 12d1 and the product is 140c. for the command to insert the correct module with these options, we need to issue insmod usbserial vendor=0x12d1 product=0x140c (note that we inserted "0x" before each section of the IDs) now we should have the serial interfaces in /dev/USB*. I completely gutted my configuration script in testing (which isn't the best idea; for a better solution read down to the next post to see what Whistle Master did) but my solution works reliably. it simply contains rmmod usbserial sleep 3; insmod usbserial vendor=0x12d1 product=0x140c sleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stop logger "3G: firewall stopped" iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADE iptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPT iptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT ifup wan2 the pineapple needs to know what wan2 is, which we set above. I changed my /etc/config/network file to have: config interface wan2 option ifname ppp0 option device /dev/ttyUSB0 option apn yesinternet option service umts option proto 3g if you use multiple 3G cards and switch between them, you should simply add Whistle Master's section of script to the default one. note that you'll have to change that apn to be your carrier's; my apn is "yesinternet" because i'm using the prepaid mobile package provided by Optus in Australia. please note that it may take a large amount of tweaking to get this to work correctly for you. It's designed to be a starting point to work out how to configure a Huawei modem for the pineapple, and is almost guaranteed to fail for you because of differences with your 3G network provider.
  3. at the moment, you have sda1 mounted on /usb and sda2 is swap, which is not mounted. If you take a look at my /etc/config/fstab: config global automount option from_fstab 1 option anon_mount 1 config global autoswap option from_fstab 1 option anon_swap 0 config mount option target /overlay option device /dev/sda1 option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0 config swap option device /dev/sda2 option enabled 1 does your fstab look like this? at the moment my sda1 (large ext4 partition) is mounted on /overlay, which is then mounted on /, but you have to make sure that swap is enabled with the right partition number. when you're formatting a partition to swap, it's not an ext4 filesystem, so the ID of the partition should be changed. you should be able to create the swap partition entirely in gparted without having to issue mkswap; gparted takes care of this when you tell it to create a swap partition.
  4. what you want to do is: back up the files currently on /usb wipe the usb. use that command to copy the overlay filesystem to the usb change the fstab to mount the usb as the overlay reboot copy the backed up files to /usb- since the usb is mounted as the overlay, this should simply go back onto the usb.
  5. I have 4 routers to cover the floorspace of my house (it's a big house) and 20 at work, all running openWRT. with the filesystem that most embedded systems run on, you have an area of flash that is read only; the part that you flashed to the device. all changes that are made on the filesystem are put into the overlay area; an area that can easily be wiped to reset the device to factory defaults. my mini howto copies all the changes that you've already made in the filesystem (the current overlay) to the usb, then has the device mount the usb at boot instead of the overlay area of the router's flash.
  6. I have multiple USB drives for multiple presets. for example I have one that automatically loads kismet+gpsd and initializes my GPS, and another that searches for WEP to crack as i walk around, doing packet injection automatically. it makes it much easier to do backups too; i can just dd the partition into an image file if need be.
  7. the main thing with newer huawei adapters is rather than modeswitching, inserting the relevant kernel module and forcing it to be a serial connection. you can check this with dmesg; but you should see some ttyUSB* appear if you have a 3g card inserted. you can force the huawei card to go into the serial mode by using: insmod usbserial vendor=0x<vid> product=0x<pid> so if your lsusb returns: Bus 001 Device 002: ID 12d1:140c Huawei Technologies Co., Ltd. then you need to do : rmmod usbserial insmod usbserial vendor=0x12d1 product=0x140c
  8. when faced with a rolling release system such as the version of openWRT on the pineapple, your first instinct is to do a full system upgrade. due to the changes with the "at" command, darren's webUI controls for starting services such as Karma or DNSspoof don't work. you are likely to get something like: cron.err atd[2488]: Userid 0 not found - aborting job can anyone find a solution to this? we could always replace the at command with something else, as he suggested in previous episodes.
  9. I did this, but i found that the restrictions of simply having the usb on the mountpoint /usb too great, so I changed the overlayfs to be on the usb. this allows me to put files anywhere on my filesystem and the only things that are stored on the pineapple's flash are the files that come with the pineapple; any changes are stored on the USB. to do this, you need to copy the current overlayfs to your /usb (after you've followed darren's guide) by sshing to 172.16.42.1 and using: tar -C /overlay -cvf - . | tar -C /usb/ -xf - then I change the fstab (in the webUI) mount config to be: from: option target /usb to: option target /overlay if you are having trouble doing this, refer here: http://wiki.openwrt.org/doc/howto/extroot
×
×
  • Create New...