Saturday, July 18, 2015

Finally Made Fly Snap Mobile to connect to ADB shell using USB cable

As part of my IoT/Home-Automation/Home-Monitoring exercises, I was exploring various low cost Android phones that do following:

  • GPS monitoring -- Tracking the Cars/kids/etc
  • Video Camera(s) -- for Video monitoring
  • BLE -- For any IoT
  • Have Android 4.4.2 and above
  • Have minimum 2 ARM cores and 512 MB Ram
I found/bought following Android phones are reasonable VFM for these purposes:
  • BQ S38  ( 50$ ) : 2-core-Cortex-A7, 512MB Ram, 4" IPS, GPS, No BLE , Android 4.4.2
  • Fly Snap ( 50$) : 4-core-SC7731, 512MB Ram, 4", GPS, No BLE , Android 4.4.2
Though I was able to connect BQ S38 via ADB from my Fedora-15, I am not able to connect the Fly-Snap to ADB-server. It seems there are some drivers for Windows at these links:
I could not use them, as I am not using windows and using Fedora-15 :(

I added following lines to /etc/udev/rules.d/52-android.rules:
SUBSYSTEM=="usb", SYSFS{idVendor}=="1782", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="1782" ATTR{idVendor}=="4012"  MODE="0666", OWNER="yyyy"

1782 and 4012 are takes from command 'dmesg'. Then as root, I issued 'udevadm control --reload-rules'.


But I was not able to connect Fly-Snap. So as another step, I added following line to ~/.android/adb_usb.ini
0x1782

But Then I killed adb-server using 'adb kill-server' and 'adb start-server'. Now I am able to my Fly-Snap device.

Sunday, March 1, 2015

Launchpad can survive on 1000mAh LiPo battery for 1.5 years with Radio Link to RPi board

So after last few days of work on data serialization across Rpi & LaunchPad (MSP430G2553), I integrated the Serialization library that sends couple of 32-bit /16-bit integers from MCU to RPi via NRF24L01+ chip.

Initially MCU was raking around 230uA current . After some tweaking, it came down 130uA .

As final optimization (for this round of testing), I shutdown the NRF24L01+ chip till next time radio-packet-transmission. This step lead to MCU current consumption of 25uA . So in this period (approximate 12 seconds) MCU is in LPM3 sleep-state and radio is in shutdown-state. When MCU wakes-up, it activates NRF chip again & sends radio-packets, during this tx-period, it takes around 400uA for a breif period.


So taking on average current consumption of 50uA (including radio-packet-tx current bump), using battery life calculator for 1000mAh LiPO battery's life is around 14000hours (583 days). Not bad for a starter project :)

I have just documented the initial video for the same at youtube .


I will be submitting the code in github in coming days after stabilization and cleanups.
I will do same test for MSP430F5969 (FRAM board with Super capacitor on it).

Friday, February 27, 2015

Finally able to make Raspberry to talk to MSP430 via NRF24L01+

As a part of my future IoT projects, I was trying to create reusable libraries and utilities for Arduino, MSP430, PIC, Freescale and STM32 processors using Nordic NRF24L01+ wireless transceiver chip. Ultimate goal is to make cheap sensors (that cost less than 7 to10$ including sensors & batteries) that could be deployed in any IoT, HomeAutomation, etc projects. I was planning to use Raspberry (or any cheap Linux board or cheap Android sticks -- future goal)  as my central observer of these cheap nodes.

Here are some  major tasks that were necessary (apart from HW):

  • Circuit diagrams that make connectivity
  • FW for Linux box and MCUs
  • A Data Serialization library for MCUs and Linux box

After lots of trials and tribulations (with limited amount free time after my office/home jobs), I was able to talk Raspberry with following devices (in initial setup scenarios):
  • MSP430 LaunchPad with MSP430G2553
  • MSP430FR5969 LaunchPad
Idea is to make Raspberry as to receive the radio packets from all sensors ( MSP430s, Arduinos, PICs,etc) and this Raspberry connected to network via LAN and WiFi.

As a next step for proper communication along these wide variety of MCUs with different endianness, I need to create small library in C/C++ for packing all types integers (uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t ) and chars.  As I could not get this from web (with whatever search strings I gave), so I created  small library for doing this job. At present this works on Linux (so that Raspberry can understand what wireless nodes are sending), MSP430G2553 and MSP430FR5969. All UT was done for most generic corner cases, I shall be using this for my home IoT framework.

Once I finish more tests and my system, I will publish code at github:
  • Raspberry to MSP430G2553 
  • Raspberry to MSP430FR5969
  • Generic C based Data-Serialization library for Linux/MCUs
I will also publish circuit diagrams for:
  • Raspberry to NRF24L01+
  • MSP430FR5969 to  NRF24L01+
  • MSP430G2553 to  NRF24L01+

Thursday, September 18, 2014

AWM002 Video capturing via webcam

I was planning to use the AWM002 to control access to my home main door. Previously I was using Raspberry for doing same. As Raspberry cost is around 35$ and AWM002 cost is around 11$ (for 10 boards), I wanted to port my application to AWM002 board.


After booting up AWM002 with own OpenWRT kernel, I wanted to use it as video-cam monitor at door entrance. Initially I planned to use mjpg-streamer for OpenWRT. But mjpg-streamer is sending 0-size image on my system.

To isolate issue (whether it is in mjpg-streamer or my usb-webcam), I compiled motion  and deployed on AWM002 board. Now I can see the video perfectly on lan/smartphone via motion-program's-http-URL. I had to tweek following options of motion:
  • stream_localhost off   
    • So that one can access camera from PC/Smartphone
  • output_pictures off
  • output_all off                                                              
  • output_normal off                                                                        
  • output_motion off 
    • All of above options for disabling  the jpeg file generation

Now the AWM002 is running at 18% CPU loading (so enough juice is left for other tasks) with 320x240 resolution. CPU usage drops to 8% when, I make the resolution to 160x128.

I need to bother about CPU load as CPU load has direct effect on battery usage :)

Now steps are to port my python program (on Raspberry) to AWM002.

Monday, September 15, 2014

Able to deploy POCO framework on OpneWRT on AWM002

After successfully installing the OpenWRT linux kernel on AWM002, I configured the OpenWRT build system to have following functionality:

  • GPIO functionality exposed via Linux Kernel GPIO export route.
  • Configured OpenWRT build system to include POCO C++ framework 
    • Create an directory-entry in OpenWRT build root package/libs/poco/
    • Copied all files (actually 2 files)  from  OpenWRT package repo
  • Configured to Linux menuconfg to include to build following libraries
    • librt
    • libstdc++
    • libPoco*
  • My kernel config file

Friday, September 12, 2014

AWM002 booting OpenWRT kernel via tfftp

After successfully made the AWM002 up, I want to load OpenWRT kernel on the same module.

To do that we need to do following:

    • Ensure that you have setup LAN and connected to PC 
    • On PC  tftp server shouble be  running at port 69
    • Ensure that you load your OpenWRT kernel image in root directory (let us say your image name is '/linux_sep_11'
    • You may use OpenWRT kernel from following link
    • If you have any firewall, disable it for the time being.
      • In Fedora, you can do that by 'service iptables stop'
  • Ensure that you have setup serial cable and connected to PC . Ensure that you open a serial terminal and be sure that you have connected to device
  • Now power cycle the board
  • At the same time, press 4 in serial terminal. This should lead to U-Boot prompt 'RT5350 # '
  •  Issue following command to see environment:
    • RT5350 # printenv
      • bootcmd=tftp
      • bootdelay=5
      • baudrate=57600
      • ethaddr="00:AA:BB:CC:DD:10"
      • stdin=serial
      • stdout=serial
      • stderr=serial
      • ipaddr=10.10.10.254 <== this might be different like 192.168.x.x (module ip)
      • serverip=10.10.10.1   <== this might be different like 192.168.x.x (PC ip)
    • Now change 'ipaddr' and 'serverip' to reflect above values, by following UBoot commands
      • setenv ipaddr 10.10.10.254 
      • setenv serverip 10.10.10.1
    • Also add extra (undocumented help option ) like (this will help to point to  '/linux_sep_11', otherwise tftp booting will point to 'test.bin' file ). OTOH, you can rename your '/linux_sep_11' to test.bin (to avoid this extra bootfile setting)
      • setenv  bootfile /linux_sep_11
      • printenv command should show all changed values
      • Now save values to flash by 'saveenv' command
      • Ensure that these values are persistent (check by using 'printenv' command
  • Now power-cycle and press 2 (on serial console to get U-Boot access) to get image from tftp-server.It will ask for confirmation to overwrite flash. Say yes & finally you see OpenWRT booting up.

  • WARNING:  Please keep in mind that you may end bricking up your module in doing these activities and I am no way responsible for that :) . BTW, with these steps on my environment, I have not bricked my AWM002 module

                  Wednesday, September 10, 2014

                  AWM002 serial bootup output


                  • Ensure that you have cutecom is installed for GUI-based terminal viewer.
                  • Configure for 57600 baud for Serial port parameter and chose appropriate serial port (some thing like /dev/ttyUSB0  -- see dmesg output)
                  • Power up AWM002 module


                • You can see following output from serial console


                • 
                  U-Boot 1.1.3 (Jul 29 2013 - 10:29:51)
                  
                  
                  Board: Ralink APS
                  oC DRAM:  32 MB
                  
                  relocate_code Pointer at: 81fb4000
                  
                  ******************************
                  
                  Software System Reset Occurred
                  
                  ******************************
                  
                  spi_wait_nsec: 42 
                  
                  spi device id: c2 20 17 c2 20 (2017c220)
                  
                  find flash: MX25L6405D
                  
                  raspi_read: from:30000 len:1000 
                  
                  .*** Warning - bad CRC, using default environment
                  
                  
                  ============================================ 
                  
                  Ralink UBoot Version: 4.1.0.0
                  
                  -------------------------------------------- 
                  
                  ASIC 5350_MP (Port5<->None)
                  
                  DRAM_CONF_FROM: Boot-Strapping 
                  
                  DRAM_TYPE: SDRAM 
                  
                  DRAM_SIZE: 256 Mbits
                  
                  DRAM_WIDTH: 16 bits
                  
                  DRAM_TOTAL_WIDTH: 16 bits
                  
                  TOTAL_MEMORY_SIZE: 32 MBytes
                  
                  Flash component: SPI Flash
                  
                  Date:Jul 29 2013  Time:10:29:51
                  
                  ============================================ 
                  
                  icache: sets:256, ways:4, linesz:32 ,total:32768
                  
                  dcache: sets:128, ways:4, linesz:32 ,total:16384 
                  
                  
                   ##### The CPU freq = 360 MHZ #### 
                  
                   estimate memory size =32 Mbytes
                  
                  
                  Please choose the operation: 
                  
                     1: Load system code to SDRAM via TFTP. 
                  
                     2: Load system code then write to Flash via TFTP. 
                  
                     3: Boot system code via Flash (default).
                  
                     4: Entr boot command line interface.
                  
                     7: Load Boot Loader code then write to Flash via Serial. 
                  
                     9: Load Boot Loader code then write to Flash via TFTP. 
                  
                  
                  \0x08\0x08\0x08 4 
                  \0x08\0x08\0x08 3 
                  \0x08\0x08\0x08 2 
                  \0x08\0x08\0x08 1 
                  \0x08\0x08\0x08 0 
                  
                     
                  
                  3: System Boot system code via Flash.
                  
                  ## Booti
                  ng image at bc050000 ...
                  
                  raspi_read: from:50000 len:40 
                  
                  .   Image Name:   Linux Kernel Image
                  
                     Image Type:   MIPS Linux Kernel Image (lzma compressed)
                  
                     Data Size:    3830574 Bytes =  3.7 MB
                  
                     Load Address: 80000000
                  
                     Entry Point:  802cf000
                  
                  raspi_read: from:50040 len:3a732e 
                  
                  ..........................
                  .................................   Verifying Checksum ... 
                  OK
                  
                     Uncompressing Kernel Image ... 
                  OK
                  
                  No initrd
                  
                  ## Transferring control to Linux (at address 802cf
                  000) ...
                  
                  ## Giving linux memsize in MB, 32
                  
                  
                  Starting kernel ...
                  
                  
                  
                  LINUX started...
                  
                   THIS IS ASIC
                  Linux version 2.6.21 (ray@asiarf-Aspire-S3) (gcc version 3.4.2) #334 Tue Nov 26 14:28:26 CST 2013
                  
                   The CPU frequency set to 360 MHz
                  CPU revision is: 0001964c
                  Determined physical RAM map:
                   memory: 02000000 @ 00000000 (usable)
                  Initrd not found or empty - disabling initrd
                  Built 1 zonelists.  Total pages: 8128
                  Kernel command line: console=ttyS1,57600n8 root=/dev/ram0
                  Primary instruction cache 32kB, physically tagged, 4-way, linesize 32 bytes.
                  Primary data cache 16kB, 4-way, linesize 32 bytes.
                  Synthesized TLB refill handler (20 instructions).
                  Synthesized TLB load handler fastpath (32 instructions).
                  Synthesized TLB store handler fastpath (32 instructions).
                  Synthesized TLB modify handler fastpath (31 instructions).
                  Cache parity protection disabled
                  cause = 40808008, status = 11000000
                  PID hash table entries: 128 (order: 7, 512 bytes)
                  calculating r4koff... 000000c8(200)
                  CPU frequency 0.05 MHz
                  Using 0.050 MHz high precision timer.
                  Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
                  Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
                  Memory: 26652k/32768k available (2198k kernel code, 6116k reserved, 673k data, 2856k init, 0k highmem)
                  
                  Mount-cache hash table entries: 512
                  NET: Registered protocol fa
                  mily 16
                  SCSI subsystem initialized
                  usbcore: registered new interface driver usbfs
                  usbcore: registered new interface driver hub
                  usbcore: registered new device driver usb
                  deice id : c2 20 17 c2 20 (2017c220)
                  MX25L6405D(c2 2017c220) (8192 Kbytes)
                  mtd .name = raspi, .size = 0x00800000 (8M) .erasesize = 0x00010000 (64K) .numeraseregions = 0
                  Creating 5 MTD partitions on "raspi":
                  0x00000000-0x00800000 : "ALL"
                  0x00000000-0x00030000 : "Bootloader"
                  0x00030000-0x00040000 : "Config"
                  Time: MIPS clocksource has been installed.
                  0x00040000-0x00050000 : "Factory"
                  0x00050000-0x01000000 : "Kernel"
                  mtd: partition "Kernel" extends beyond the end of device "raspi" -- size truncated to 0x7b0000
                  NET: Registered protocol family 2
                  IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
                  TCP established hash table entries: 1024 (order: 1, 8192 bytes)
                  TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
                  TCP: Hash tables configured (established 1024 bind 1024)
                  TCP reno registered
                  detected lzma initramfs
                  detected lzma initramfs
                  initramfs: LZMA lc=3,lp=0,pb=2,dictSize=1048576,origSize=12314112
                  LZMA initramfs by Ming-Ching Tiew .............
                  ............................................................
                  ............................................................
                  .......................................................RT3xxx E
                  HCI/OHCI init.
                  fuse init (API version 7.8)
                  io scheduler noop registered (default)
                  Ralink gpio driver initialized
                  
                  HDLC line discipline: version $Revision: 1.1.1.1 $, maxframe=4096
                  
                  N_HDLC line discipline registered.
                  Serial: 8250/16550 driver $Revision: 1.9 $ 2 ports, IRQ sharing disabled
                  serial8250: ttyS0 at I/O 0xb0000500 (irq = 37) is a 16550A
                  serial8250: ttyS1 at I/O 0xb0000c00 (irq = 12) is a 16550A
                  RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
                  loop: loaded (max 8 devices)
                  rdm_major = 253
                  Ralink APSoC Ethernet Driver Initilization. v2.1  256 rx/tx descriptors allocated, mtu = 1500!
                  MAC_ADRH -- : 0x0000000c
                  MAC_ADRL -- : 0x43305077
                  PROC INIT OK!
                  PPP generic driver version 2.4.2
                  PPP BSD Compression module registered
                  NET: Registered protocol family 24
                  PPPoL2TP kernel driver, V0.17
                  PPTP driver version 0.8.1
                  block2mtd: version $Revision: 1.1.1.1 $
                  rt3xxx-ehci rt3xxx-ehci: Ralink EHCI Host Controller
                  rt3xxx-ehci rt3xxx-ehci: new USB bus registered, assigned bus number 1
                  rt3xxx-ehci rt3xxx-ehci: irq 18, io mem 0x101c0000
                  rt3xxx-ehci rt3xxx-ehci: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
                  usb usb1: configuration #1 chosen from 1 choice
                  hub 1-0:1.0: USB hub found
                  hub 1-0:1.0: 1 port detected
                  
                  rt3xxx-ohci rt3xxx-ohci: RT3xxx OHCI Controller
                  rt3xxx-ohci 
                  rt3xxx-ohci: new USB bus registered, assigned bus number 2
                  rt3xxx-ohci rt3xxx-ohci: irq 18, io mem 0x101c1000
                  usb usb2: configuration #1 chosen from 1 choice
                  hub 2-0:1.0: USB hub found
                  hub 2-0:1.0: 1 port detected
                  Initializing USB Mass Storage driver...
                  usbcore: registered new interface driver usb-storage
                  USB Mass Storage support registered.
                  nf_conntrack version 0.5.0 (256 buckets, 2048 max)
                  ip_tables: (C) 2000-2006 Netfilter Core Team, Type=Restricted Cone
                  TCP cubic registered
                  NET: Registered protocol family 1
                  NET: Registered protocol family 10
                  NET: Registered protocol family 17
                  802.1Q VLAN Support v1.8 Ben Greear 
                  All bugs added by David S. Miller 
                  
                  Freeing unused kernel memory: 2856k freed
                  
                  init started: BusyB
                  ox v1.12.1 (2013-10-15 14:30Algorithmics/MIPS FPU Emulator v1.5
                  :14 CST)
                  
                  starting pid 629, tty '': '/etc_ro/rcS'
                  devpts: called with bogus options
                  Welcome to
                       _______  _______  ___     __  ____   _  _   ___
                      |  ___  \|   __  ||   |   |__||    \ | || | /  /
                      | |___| ||  |__| ||   |__  __ |     \| || |/  /
                      |   _   /|   _   ||      ||  || |\     ||     \
                      |__| \__\|__| |__||______||__||_| \____||_|\___\
                  
                     \0x09             =System Architecture Department=
                  
                  
                  starting pid 638, tty '/dev/ttyS1': '/bin/sh'
                  
                  
                  BusyBox v1.12.1 (2013-10-15 14:30:14 CST) built-in shell (ash)
                  Enter 'help' for a list of built-in commands.
                  
                  # ralink_gpio: sending a SIGUSR1 to process 633
                  
                  internet.sh
                  
                  Password for 'admin' changed
                  
                  rmmod: ralink_wdt: No such file or directory
                  rmmod: cls: No such file or directory
                  rmmod: hw_nat: No such file or directory
                  rmmod: raeth: No such file or directory
                  insmod: bridge.ko: module not found
                  insmod: mii.ko: module not found
                  insmod: raeth.ko: module not found
                  
                  
                  ##### disable 1st wireless interface #####
                  rmmod: rt2860v2_a
                  p_net: No such file or directory
                  rmmod: rt2860v2_ap: No such file or directory
                  rmmod: rt2860v2_ap_util: No such file or directory
                  
                  rt2860v2_ap: module license 'unspecified' taints kernel.
                  
                  
                  ==
                  = pAd = c0002000, size = 805120 ===
                  
                  <-- --="" -="" -f="" -t="" 00="" 01="" 0="" 0x0000000c="" 0x1300="00064380" 0x43305077="" 0x8913="" 0x8914="" 1.="" 1="" 2.="" 20mhz.l="" 2="" 3.="" 3100="" 3900="" 8021q.ko:="" 8021q:="" :="" a0493000="" address="" argument="" assign="" bbp="" be="" blinks="" br0:="" brctl:="" bridge="" bssid="00:0c:43:30:50:90" can="" cannot="" change="" changed="" config="" desc="" detected="" dev_set_promisc="" device="" directory="" do="" does="" done.="" entered="" entering="" error="" esw="" etc="" eth2.1:="" eth2.1="" eth2="" exist="" failed:="" file="" filter="" for="" forwarding="" found="" ifconfig:="" initialize="" insmod:="" insmod="" inva="" invalid="" ioctl="" iptable="" iptables="" is="" kernel="" key1str="" key2str="" key3str="" key4str="" key="" killall:="" killed="" learning="" led="13," length="" lid="" link="" mac_adrh="" mac_adrl="" main="" mangle="" master="" mcs="" mode="" module="" need="" needs="" nf_con="" nf_conntrack_proto_gre:="" nf_nat_pptp:="" nf_nat_proto_gre:="" no="" not="" ntrack_pptp:="" off="4000," offset="70," on="1," or="" partition="" perhaps="" ph="" phy="" phy_rx_ring="" phy_tx_ring="0x016f2000," port="" process="" promiscuous="" propagating="" r4="" ra0="" radvd.conf="" ralink="" reg="" rem:="" remove="" requested="" reset="1," rm:="" rmmod:="" rt28xx_init="" rt305x_esw:="" rtmpallocadapterblock="" rtmpalloctxrxringmemory="" rx="" rx_ring0="0xa16f3000" s="" set:="" set="ff" size="2048" stat="" state="" status="" such="" switch="" sync="" t="" table="" time="4000" to="" topology="" tx_ring="0xa16f2000" type="" udhcpd:="" uity="" upgraded.="" us="" v1.3.5:="" value="ffff506f" vconfig:="" vlan="" write="" x_esw:="" y="" you="" your="">/dev/null 2>&1
                  iptables -D FORWARD -j macipport_filter 1>/dev/null 2>&1
                  iptables -F macipport_filter 1>/dev/null 2>&1
                  iptables -D FORWARD -j web_filter  1>/dev/null 2>&1
                  iptables -F web_filter  1>/dev/null 2>&1
                  iptables -D FORWARD -j malicious_filter 1>/dev/null 2>&1
                  iptables -F malicious_filter  1>/dev/null 2>&1
                  iptables -D INPUT -j malicious_input_filter 1>/dev/null 2>&1
                  iptables -F malicious_input_filter  1>/dev/null 2>&1
                  iptables -P INPUT ACCEPT
                  iptables -P OUTPUT ACCEPT
                  iptables -P FORWARD ACCEPT
                  iptables -t filter -N web_filter 1>/dev/null 2>&1
                  iptables -t filter -N macipport_filter 1>/dev/null 2>&1
                  iptables -t filter -N malicious_filter 1>/dev/null 2>&1
                  iptables -t filter -N synflood_filter 1>/dev/null 2>&1
                  iptables -t filter -N malicious_input_filter 1>/dev/null 2>&1
                  iptables -t filter -N synflood_input_filter 1>/dev/null 2>&1
                  iptables -t filter -A FORWARD -j web_filter 1>/dev/null 2>&1
                  iptables -t filter -A FORWARD -j macipport_filter 1>/dev/null 2>&1
                  iptables -t filter -A FORWARD -j malicious_filter 1>/dev/null 2>&1
                  iptables -t filter -A malicious_filter -p tcp --syn -j synflood_filter 1>/dev/null 2>&1
                  iptables -t filter -A INPUT -j malicious_input_filter 1>/dev/null 2>&1
                  iptables -t filter -A malicious_input_filter -p tcp --syn -j synflood_input_filter 1>/dev/null 2>&1
                  iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu 1>/dev/null 2>&1
                  iptables -A malicious_input_filter -i eth2.2 -p tcp --dport 80 -j DROP
                  /bin/super_dmz -f
                  sh: /bin/super_dmz: not found
                  iptables -t nat -D PREROUTING -j port_forward 1>/dev/null 2>&1
                  iptables -t nat -F port_forward  1>/dev/null 2>&1; iptabl
                  es -t nat -X port_forward  1>/dev/null 2>&1
                  iptables -t nat -D PREROUTING -j DMZ 1>/dev/null 2>&1
                  iptables -t nat -F DMZ 1>/dev/null 2>&1; iptables -t nat -X DMZ  1>/dev/null 2>&1
                  cat /proc/sys/net/netfilter/nf_conntrack_udp_timeout > /var/.udpbackup
                  echo 0 > /proc/sys/net/netfilter/nf_conntrack_udp_timeout
                  cat /var/.udpbackup > /proc/sys/net/netfilter/nf_conntrack_udp_timeout; rm -f /var/.udpbackup
                  cat /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_established > /var/.tcpbackup
                  echo 0 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_established
                  cat /var/.tcpbackup > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_established; rm -f /var/.tcpbackup
                  iptables -t nat -N port_forward 1>/dev/null 2>&1; iptables -t nat -I PREROUTING 1 -j port_forward 1>/dev/null 2>&1
                  iptables -t nat -N DMZ 1>/dev/null 2>&1; iptables -t nat -I PREROUTING 2 -j DMZ 1>/dev/null 2>&1
                  ntp.sh
                  ddns.sh
                  kill -9 `cat /var/run/wscd.pid.ra0`
                  cat: can't open '/var/run/wscd.pid.ra0': No such file or directory
                  kill: you need to specify whom to kill
                  iwpriv ra0 set WscConfMode=0 1>/dev/null 2>&1
                  route delete 239.255.255.250 1>/dev/null 2>&1
                  
                  killall -q klogd
                  killall -q syslogd
                  syslogd -C8 1>/dev/null
                   2>&1
                  klogd 1>/dev/null 2>&1
                  killall -q zebra
                  killall -q ripd
                  echo 0 > /proc/sys/net/ipv6/conf/all/forwarding
                  webs: Listening for HTTP requests at address 10.10.10.254
                  
                  fetchSmbConfig: No such file or directory
                  
                  killall -q -USR1 udhcpd