Blocking on a Socket read operation while in sleep mode

by Omer Gilad » Tue, 29 Dec 2009 06:11:02 GMT

Sponsored Links
 I have code that runs in the background and holds a connected Socket
and it's InputStream.
It calls read() infinitely until something is received, then continues
to parse. Socket timeout is 0 of course.

I am interested in what would happen when the device goes to sleep? Is
the CPU off? Will this socket be responsive in this case (Say, my
server sends some notification)?



Blocking on a Socket read operation while in sleep mode

by Raj » Wed, 20 Jan 2010 02:06:36 GMT

 Yes, the CPU is OFF when the device goes to sleep. The socket is non-
responsive at this time.
Hope that helpps.

> Thanks

Sponsored Links

Other Threads

1. Compile Again after new bzImage


After following the threads on this forum, I have setup a build
environment on Ubuntu 8.10.

I have successfully done the repo sync, and compiled an image, which I
use with the make-live script to test on my Aspire-One.  So far so

I also managed to enable VESA_FB, and remove PMEM etc., and actually
the Android GUI boots up fine on the Aspire-One.  Even better.

Now, I am trying to enable the WiFi card on the Aspire One, which I
know is a ATH5K.  So, I did a 'make menuconfig' again, enabled the
Atheros card as part of the kernel rather than a module, and compiled
bzImage, which amazingly (for this noob) compiles correctly.   Then I
moved the bzImage to the vendor/asus/eee_701 directory as suggested in
the forum.  I do the compile for installer_img again - but the process
comes back within a few seconds saying "Nothing to be done for

Where am I going wrong?  The first time this happened, I did a make
clean (with target set as x86) and it removed everything under out/.
After that when I did the compile again, it took a long time and

I am trying to find out if there is a way to do this in a shorter time
to incorporate just the new bzImage, rather than compile everything

I am sure I have left out a detail or two up there in asking a
question - give the noob a break...



2. IMX31 3stack board. Error msg: Warning: unable to open an initial console

Hail to all experts,

I'm having the error message (bottom). Unlike others mine stopped at
line "Warning: unable to open an initial console.".
"...mydroid/out/target/product/generic/root" compiled into kernel
kernel parameters using "noinitrd android.console=ttymxc1,115200
and I have the file system setup as:

RedBoot> fis list
... Read from 0x07ee0000-0x07eff000 at 0x00080000: ..
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0x00000000  0x00000000  0x00040000  0x00000000
FIS directory     0x00080000  0x00080000  0x0001F000  0x00000000
RedBoot config    0x0009F000  0x0009F000  0x00001000  0x00000000
kernel            0x00100000  0x00100000  0x001E0000  0x00100000
cramfs_system     0x00600000  0x00600000  0x01FE0000  0x00600000
jffs2_data        0x02E00000  0x02E00000  0x00020000  0x02E00000

<And the mx3_3stack.c>

  .name = "nand.bootloader",
  .offset = 0,
  .size = 1024 * 1024},
  .name = "nand.kernel",
  .size = 5 * 1024 * 1024},

  .name = "nand.cramfs_system",
  .size = 40 * 1024 * 1024},
  .name = "nand.jffs2_data",
  .size = 56 * 1024 * 1024},
  .name = "nand.configure",
  .size = 8 * 1024 * 1024},
  .name = "nand.userfs",
  .size = MTDPART_SIZ_FULL},

<init.rc as>
# mount mtd partitions
    # Mount /system rw first to give the filesystem a chance to save a
    mount cramfs /dev/block/mtdblock2 /system
    mount cramfs /dev/block/mtdblock2 /system ro remount

    # We chown/chmod /data again so because mount is run as root +
    mount jffs2 /dev/block/mtdblock3 /data nosuid nodev
    chown system system /data
    chmod 0771 /data

    # Same reason as /data above
    mount yaffs2 m...@cache /cache nosuid nodev
    chown system cache /cache
    chmod 0770 /cache

    # This may have been created by the recovery system with odd
    chown system system /cache/recovery
    chmod 0770 /cache/recovery

Am I having a faulty Android kernel? Please comment, thanks.

<Error msg>
entry=0x80008000, target=0x80008000
Using base address 0x00100000 and length 0x001d2114

............................................................ done,
booting the k
Linux version 2.6.24-335-g47af517 (x...@xin-desktop) (gcc version 4.2.3

 G++ Lite 2008q1-126)) #14 PREEMPT Thu Mar 12 13:38:31 GMT 2009

CPU: ARMv6-compatible processor [4107b364] revision 4 (ARMv6TEJ),
Machine: Freescale MX31/MX32 3-Stack Board
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIPT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets

Built 1 zonelists in Zone order, mobility grouping on.  Total pages:
Kernel command line: noinitrd console=ttymxc0,115200
Unknown boot option `android.console=ttymxc1': ignoring

MXC IRQ initialized
PID hash table entries: 512 (order: 9, 2048 bytes)
MXC GPT timer initialized, rate = 16625000
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

Memory: 128MB = 128MB total
Memory: 125824KB available (3328K code, 490K data, 264K init)
- Hide quoted text -

Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 64 bytes
NET: Registered protocol family 16
L2X0 cache controller enabled
CPU is i.MX31 Revision 2.0
Clock input source is 26000000
MXC GPIO hardware
3-Stack Debug board detected, rev = 0x0200
MXC DMA API initialized
SCSI subsystem initialized
CSPI: mxc_spi-0 probed
CSPI: mxc_spi-1 probed
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
MXC I2C driver
clk: Unable to get requested clock: dfm_clk
mc13783 Rev 3.3 FinVer 0 detected
PMIC RTC successfully probed
PMIC Light successfully loaded
MC13783 regulator successfully probed
Device spi2.2 probed
<6>PMIC Power successfully probed
NET: Registered protocol family 2
Time: mxc_gpt clocksource has been installed.
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
Low-Level PM Driver module loaded
usb: Host 2 host (isp1504) registered
usb: DR host (isp1504) registered
usb: DR gadget (isp1504) registered
DPTC driver module loaded
JFFS2 version 2.2. (NAND)  2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
mxc_ipu mxc_ipu: Channel already uninitialized 14
Console: switching to colour frame buffer device 30x40
mxc_ipu mxc_ipu: Channel already uninitialized 15
mxcfb: fb registered, using mode Epson-VGA
VGEN ID is 9
VMMC ID is 20
ch7024: TV encoder present: id = 45
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing
Serial: MXC Internal UART driver
mxcintuart.0: ttymxc0 at MMIO 0x43f90000 (irq = 45) is a Freescale MXC
console [ttymxc0] enabled
mxcintuart.1: ttymxc1 at MMIO 0x43f94000 (irq = 32) is a Freescale MXC
mxcintuart.2: ttymxc2 at MMIO 0x5000c000 (irq = 18) is a Freescale MXC
loop: module loaded
smsc911x: Driver version 2007-07-13.
eth%d: SMSC911x MAC Address: 00:04:9f:00:97:c5
Linux video capture interface: v2.00
MXC Video Output MXC Video Output.0: Registered device video16
Driver 'sd' needs updating - please use bus_type methods
MXC MTD nand Driver 2.1
NAND device: Manufacturer ID: 0xec, Chip ID: 0xaa (Samsung NAND 256MiB
1,8V 8-bi
RedBoot partition parsing not available
Creating 6 MTD partitions on "NAND 256MiB 1,8V 8-bit":
0x00000000-0x00100000 : "nand.bootloader"
0x00100000-0x00600000 : "nand.kernel"
0x00600000-0x02e00000 : "nand.cramfs_system"
0x02e00000-0x06600000 : "nand.jffs2_data"
0x06600000-0x06e00000 : "nand.configure"
0x06e00000-0x10000000 : "nand.userfs"
MXC MTD nand Driver 2.4
usbmon: debugfs is not available
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
MXC keypad loaded
input: Unspecified device as /class/input/input0
i2c /dev entries driver
MXC WatchDog Driver 2.0
MXC Watchdog # 0 Timer: initial timeout 60 sec
IPU Post-filter loading
SSI 1 module loaded successfully
SSI 2 module loaded successfully
PMIC Character device: successfully loaded
PMIC Audio driver loading...
PMIC Battery successfully probed
PMIC Connectivity driver loading..
hmp4e: init
hmp4e: VGA encoder initialized
ioctl pointer: c0204560.  mmap pointer: c0203f6c
RNG Driver: Loading
SEC: mxc_sec_mod_init() called
logger: created 64K log 'log_main'
logger: created 64K log 'log_events'
logger: created 64K log 'log_radio'
Advanced Linux Sound Architecture Driver Version 1.0.15 (Tue Nov 20
19:16:42 200
7 UTC).
Control ALSA component registered
ALSA device list:
  #0: MXC Freescale with PMIC
oprofile: using arm/armv6
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation
mxc_rtc mxc_rtc.0: rtc core: registered mxc_rtc as rtc0
Real TIme clock Driver v1.0
Power Management for Freescale MX31
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev
MXC Backlight Device mxc_ipu_bl.0 Initialized.
input: mxc_ts as /class/input/input1
mxc input touchscreen loaded

mxc_rtc mxc_rtc.0: setting system clock to 1970-01-01 00:17:44 UTC
Freeing init memory: 264K

Warning: unable to open an initial console.

3. Does the AndroidManifest.xml file is mandatory to make changes to apk with aapt tool ???

4. Has 3GPP PSS Release 6 been fully supported in cupcake

5. encoder support in OpenCORE/cupcake

6. C to CPP conversion (or vice-versa) based on the package type having C or CPP.

7. "Android Developers Group for Singapore and South East Asia" IRC channel is up