Cannot connect to the usb-serial port (GSM modem) - linux

I've decided to bring up a GSM Modem for my Linux machine (OpenSuse 12.1 64-bit on Vmware) so that I can use it as the SMS gateway. I've got a Wavecom M1306B GSM modem which provides a USB interface, and obviously there is a USB cable (end to end, GSM Modem to my Desktop) with it.
I tested this modem successfully with my Windows 7 64-bit PC by running some basic commands on it. (like: AT , ATZ, ..)
Here are some of my logs:
machine2:~ # lsusb
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 001 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
lsusb -v output for that interface:
Bus 001 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x067b Prolific Technology, Inc.
idProduct 0x2303 PL2303 Serial Port
bcdDevice 3.00
iManufacturer 1 Prolific Technology Inc.
iProduct 2 USB-Serial Controller
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x000a 1x 10 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
machine2:/proc # setserial -a /dev/ttyUSB0
/dev/ttyUSB0, Line 0, UART: 16654, Port: 0x0000, IRQ: 0
Baud_base: 460800, close_delay: 0, divisor: 0
closing_wait: infinte
Flags: spd_normal
machine2:/home/smsto/bin # setserial -a /dev/ttyS0
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
Baud_base: 115200, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test
machine2:/home/smsto/bin # setserial -a /dev/ttyS1
/dev/ttyS1, Line 1, UART: 16550A, Port: 0x02f8, IRQ: 3
Baud_base: 115200, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test
machine2:/proc # setserial -G /dev/ttyUSB0
/dev/ttyUSB0 uart 16654 port 0x0000 irq 0 baud_base 460800 spd_normal
machine2:/proc # setserial /dev/ttyUSB0
/dev/ttyUSB0, UART: 16654, Port: 0x0000, IRQ: 0
machine2:/proc/tty/driver # ls -ltr
total 0
-r--r--r-- 1 root root 0 Jan 10 14:03 usbserial
-r--r--r-- 1 root root 0 Jan 10 14:03 serial
machine2:/proc/tty/driver # cat serial
serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:0 rx:0 CTS|DSR|CD
1: uart:16550A port:000002F8 irq:3 tx:0 rx:0 CTS|DSR|CD
2: uart:unknown port:000003E8 irq:4
3: uart:unknown port:000002E8 irq:3
4: uart:unknown port:00000000 irq:0
5: uart:unknown port:00000000 irq:0
6: uart:unknown port:00000000 irq:0
7: uart:unknown port:00000000 irq:0
machine2:/proc/tty/driver # cat usbserial
usbserinfo:1.0 driver:2.0
0: module:pl2303 name:"pl2303" vendor:067b product:2303 num_ports:1 port:1 path:usb-0000:02:00.0-2.1
machine2:/proc/tty # cat drivers
/dev/tty /dev/tty 5 0 system:/dev/tty
/dev/console /dev/console 5 1 system:console
/dev/ptmx /dev/ptmx 5 2 system
/dev/vc/0 /dev/vc/0 4 0 system:vtmaster
usbserial /dev/ttyUSB 188 0-253 serial
serial /dev/ttyS 4 64-79 serial
pty_slave /dev/pts 136 0-1048575 pty:slave
pty_master /dev/ptm 128 0-1048575 pty:master
unknown /dev/tty 4 1-63 console
machine2:/proc/tty # dmesg | grep -i tty
[ 1.383652] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 1.424541] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[ 1.581063] 00:0a: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 1.654207] 00:0b: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[ 1.938507] tty tty17: hash matches
[ 2498.137304] usb 1-2.1: pl2303 converter now attached to ttyUSB0
I noticed that the Baud rate of USB0 interface is too much, so i tried to assign 115200 :
machine2:/proc # setserial /dev/ttyUSB0 baud_base 115200
Cannot set serial info: Invalid argument
So, it is the problem ... and I receive this error.
Whenever I try to connect S0, S1, USB0 interfaces via minicom, it simply doesn't work.

Baud_base is not the port speed, it's the maximum speed when a frequency divisor is 1. The ability to set baud_base probably doesn't apply to USB serial device at all, and it's most certainly not what you want.
Use stty to set the port speed, or use cu or minicom for testing (they can set port speed by themselves).

I'm not sure about the baud rate but If you open up another terminal and do cat /dev/ttyUSB0
Then in the first terminal do echo AT > /dev/ttyUSB0 you might get an OK back..not sure if it helps but it should get you a response at least..

Related

"Connection timed out(100)" when trying to set up a bluetooth PAN

I'm trying to set up a Bluetooth PAN between two Linux systems. I've got it working between two Raspberry Pi 3s, both running BlueZ 5.23. However, when I try to connect a different Linux system running BlueZ 4.101, I get this error:
pand[27746]: Connect to B8:27:EB:6C:CE:26 failed. Connection timed out(110)
I have successfully gotten two BlueZ 4.101 systems to talk to each other, but it consistently fails with that error when I try to get it to talk to my Pi3 NAP. Unfortunately, the older version of BlueZ is running on a very small embedded system and I can't run hcidump on it easily. However, I do have the output of hcidump for the two different attempts to talk to the Pi3:
This was a successful attempt to connect from another Pi3:
HCI sniffer - Bluetooth packet analyzer ver 5.45 btsnoop version: 1 datalink type: 1002
> HCI Event: Connect Request (0x04) plen 10
bdaddr B8:27:EB:99:1C:22 class 0x000000 type ACL < HCI Command: Accept Connection Request (0x01|0x0009) plen 7
bdaddr B8:27:EB:99:1C:22 role 0x00
Role: Master
> HCI Event: Command Status (0x0f) plen 4
Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Role Change (0x12) plen 8
status 0x00 bdaddr B8:27:EB:99:1C:22 role 0x00
Role: Master
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 12 bdaddr B8:27:EB:99:1C:22 type ACL encrypt 0x00 < HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 12
> HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 12
Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87 < HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
handle 12 page 1
> HCI Event: Command Status (0x0f) plen 4
Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Read Remote Extended Features (0x23) plen 13
status 0x00 handle 12 page 1 max 2
Features: 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 < HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr B8:27:EB:99:1C:22 mode 2 clkoffset 0x0000 < ACL data: handle 12 flags 0x00 dlen 10
L2CAP(s): Info req: type 2
> HCI Event: Max Slots Change (0x1b) plen 3
handle 12 slots 5
> HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> ACL data: handle 12 flags 0x02 dlen 10
L2CAP(s): Info req: type 2 < ACL data: handle 12 flags 0x00 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x02b8
Enhanced Retransmission mode
Streaming mode
FCS Option
Fixed Channels
Unicast Connectless Data Reception
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr B8:27:EB:99:1C:22 name 'raspberrypi'
> ACL data: handle 12 flags 0x02 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x02b8
Enhanced Retransmission mode
Streaming mode
FCS Option
Fixed Channels
Unicast Connectless Data Reception < ACL data: handle 12 flags 0x00 dlen 10
L2CAP(s): Info req: type 3
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 12 packets 2
> ACL data: handle 12 flags 0x02 dlen 10
L2CAP(s): Info req: type 3 < ACL data: handle 12 flags 0x00 dlen 20
L2CAP(s): Info rsp: type 3 result 0
Fixed channel list 0x00000006
L2CAP Signalling Channel
L2CAP Connless
> ACL data: handle 12 flags 0x02 dlen 20
L2CAP(s): Info rsp: type 3 result 0
Fixed channel list 0x00000006
L2CAP Signalling Channel
L2CAP Connless
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 12 packets 2
> ACL data: handle 12 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040 < ACL data: handle 12 flags 0x00 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
Connection successful < ACL data: handle 12 flags 0x00 dlen 23
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 11
RFC 0x00 (Basic)
And this is the unsuccessful attempt to connect from the system running BlueZ 4.101:
> HCI Event: Connect Request (0x04) plen 10
bdaddr 00:07:80:C0:D8:73 class 0x000000 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
bdaddr 00:07:80:C0:D8:73 role 0x00
Role: Master
> HCI Event: Command Status (0x0f) plen 4
Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Role Change (0x12) plen 8
status 0x00 bdaddr 00:07:80:C0:D8:73 role 0x00
Role: Master
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 11 bdaddr 00:07:80:C0:D8:73 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 11
> HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 11
Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
handle 11 page 1
> HCI Event: Command Status (0x0f) plen 4
Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Read Remote Extended Features (0x23) plen 13
status 0x00 handle 11 page 1 max 1
Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr 00:07:80:C0:D8:73 mode 2 clkoffset 0x0000
< ACL data: handle 11 flags 0x00 dlen 10
L2CAP(s): Info req: type 2
> HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Max Slots Change (0x1b) plen 3
handle 11 slots 5
> ACL data: handle 11 flags 0x02 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x00b8
Enhanced Retransmission mode
Streaming mode
FCS Option
Fixed Channels
< ACL data: handle 11 flags 0x00 dlen 10
L2CAP(s): Info req: type 3
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 11 packets 2
> ACL data: handle 11 flags 0x02 dlen 20
L2CAP(s): Info rsp: type 3 result 0
Fixed channel list 0x00000002
L2CAP Signalling Channel
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr 00:07:80:C0:D8:73 name 'BT111'
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 11 reason 0x13
Reason: Remote User Terminated Connection
There are no time stamps, but everything up to the Disconn Complete event at the very end happened pretty quickly, then it paused for about 30 seconds.
Clearly, the PANU on 4.101 is waiting for something, but I don't know what and I don't know where to look for what it could be. The only other differences I saw in the dumps were:
The handle is 11 in one and 12 in the other.
The Read Remote Extended Features event returns a different feature set. (0x03 followed by 7 0 bytes, instead of 0x01)
The one that succeeded supported Unicast Connectless Data Reception in its L2CAP extended feature mask.
I assume that the handle being different is unimportant. I googled around for a decoder ring for the extended features, but couldn't find anything that seemed like it mapped to what I'm seeing. The difference there is 1 bit, though. Maybe that's the magic bit.
I also noticed that the pi-pi connection used SDP, and sdpd is not running on my little embedded system.
The only references I could find to Unicast Connectless Data Reception were in PTS submissions. I'm not interested in BT certification right now.
Anyway, it seems like I need a Bluetooth expert (which I am not) to explain what's going on and why my connection's not working.
As it turned out, the problem was that the two devices weren't paired. Pairing to the raspberry pi let everything run fine.
In order to get the embedded board to pair to the pi, I had to run bluetoothd on it with an appropriate configuration in /etc/bluetooth/hcid.conf, run hciconfig hci0 piscan, and run this in bluetoothctl from the pi:
scan on
scan off # after waiting until I saw the device's mac
pair <MAC address>
trust <MAC address>

Buildroot does not create /dev entries for emmc on am335x custom board

I have a custom board based on am335x. I am building a buildroot for a minimal root filesystem (minimal by size) : boots off as initramfs. I am able to boot the image but unfortunately there are no /dev/mmcblk0 entry.
I would like to know how to make it create that entry.
The following is some log and data to help.
======================================================================
# ls /dev
console ram14 tty26 tty55
cpu_dma_latency ram15 tty27 tty56
full ram2 tty28 tty57
hwrng ram3 tty29 tty58
i2c-0 ram4 tty3 tty59
i2c-1 ram5 tty30 tty6
input ram6 tty31 tty60
kmem ram7 tty32 tty61
kmsg ram8 tty33 tty62
loop-control ram9 tty34 tty63
loop0 random tty35 tty7
loop1 shm tty36 tty8
loop2 tty tty37 tty9
loop3 tty0 tty38 ttyO0
loop4 tty1 tty39 ttyO1
loop5 tty10 tty4 ttyS0
loop6 tty11 tty40 ttyS1
loop7 tty12 tty41 ttyS2
mem tty13 tty42 ttyS3
network_latency tty14 tty43 ubi_ctrl
network_throughput tty15 tty44 urandom
null tty16 tty45 usbmon0
port tty17 tty46 vcs
psaux tty18 tty47 vcs1
ptmx tty19 tty48 vcsa
pts tty2 tty49 vcsa1
ram0 tty20 tty5 watchdog
ram1 tty21 tty50 watchdog0
ram10 tty22 tty51 zero
ram11 tty23 tty52
ram12 tty24 tty53
ram13 tty25 tty54
# cat /proc/partitions
major minor #blocks name# cat /proc/devices
Character devices:
1 mem
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
29 fb
89 i2c
90 mtd
128 ptm
136 pts
153 spi
166 ttyACM
180 usb
188 ttyUSB
189 usb_device
226 drm
248 ttySDIO
249 usbmon
250 ttyO
251 watchdog
252 ptp
253 pps
254 rtc
Block devices:
1 ramdisk
259 blkext
7 loop
8 sd
31 mtdblock
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
179 mmc
# cat /etc/fstab
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 rw,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0
tmpfs /tmp tmpfs mode=1777 0 0
tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
sysfs /sys sysfs defaults 0 0
==================================================================
It is booting busybox and using devtmpfs which are defaults for buildroot.
If I use TI's minimalfs, it does show /dev/mmcblk0 so the kernel and device tree are ok. How to solve this.
Regards,
Preetam
You can create this node manually by mknod
mknod [OPTION]... NAME TYPE [MAJOR MINOR]
In your case type would be b (block). Major number you may find in sources or use
cat /proc/devices the minor number is a partition number.
If this is not the case, try to enable udev in buildroot config.

Can't flash with avrisp mkII in avrdude Version 6.0.1

I have had problems with this programming board. It is set up correctly seems to be an AVRISP MKII.
I received the following error messages upon flashing with avrdude:
(trusty)chandran#localhost:~$ avrdude -c avrispmkii -p t85 -vv
avrdude: Version 6.0.1, compiled on Oct 21 2013 at 15:55:32
Copyright (c) 2000-2005 Brian Dean, h ttp://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/chandran/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : avrispmkii
avrdude: usb_open(): cannot read serial number "error sending control
message: Connection timed out"
avrdude: usbdev_open(): Found AVRISP mkII, serno: [unknown]
avrdude: usbdev_recv_frame(): usb_bulk_read(): error submitting URB: No
such file or directory
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: usbdev_recv_frame(): usb_bulk_read(): error submitting URB: No such file or directory
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_getsync(): timeout communicating with programmer
AVR Part : ATtiny85
Chip Erase delay : 4500 us
PAGEL : P00
BS2 : P00
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 6 4 0 no 512 4 0 4000 4500 0xff 0xff
flash 65 6 32 0 yes 8192 64 128 4500 4500 0xff 0xff
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 2 0 0 0 0 0x00 0x00
Programmer Type : STK500V2
Description : Atmel AVR ISP mkII
Programmer Model: AVRISP mkII
avrdude: usbdev_recv_frame(): usb_bulk_read(): error submitting URB: No such file or directory
It is hard to identify the issue since my version of the programming board doesn't have such great documentation.
Thanks in advance!
This bug was causing the problems. I simply reverted to the previous version of avrdude (5.11.1) and it worked. By now there is an even newer version of avrdude (6.3), this bug might no longer be a problem in latest version.
Here are some steps:
Revert to an older version of avrdude either by using sudo apt-get install <package-name>=<package-version-number> OR sudo apt-get install <package-name>=<package-version-number>
Check if it works: avrdude -p <your part name> -c <your programmer name (avrispmkII)>
You might have to specify a port. Use something like ''watch ls /dev/tty*'' to find your device if you get an error like this one:
(trusty)chandran#localhost:~$ avrdude -c avrispmkII -p t85
avrdude: ser_open(): can't open device "/dev/ttyS0": No such file or directory
avrdude done. Thank you.
Here is what it will look like when you get it right:
(trusty)chandran#localhost:~$ avrdude -c avrispmkII -p t85 -P usb -vv
avrdude: Version 5.11.1, compiled on Oct 30 2011 at 10:37:28
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/chandran/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : avrispmkII
avrdude: usb_open(): cannot read serial number "No error"
avrdude: usbdev_open(): Found AVRISP mkII, serno: [unknown]
avrdude: usbdev_open(): using read endpoint 0x83
AVR Part : ATtiny85
Chip Erase delay : 4500 us
PAGEL : P00
BS2 : P00
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 6 4 0 no 512 4 0 4000 4500 0xff 0xff
flash 65 6 32 0 yes 8192 64 128 4500 4500 0xff 0xff
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 2 0 0 0 0 0x00 0x00
Programmer Type : STK500V2
Description : Atmel AVR ISP mkII
Programmer Model: AVRISP mkII
Hardware Version: 0
Firmware Version Master : 1.255
Vtarget : 3.3 V
SCK period : 8.00 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e930b
avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as DF
avrdude: safemode: efuse reads as FF
avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as DF
avrdude: safemode: efuse reads as FF
avrdude: safemode: Fuses OK
avrdude done. Thank you.
If this doesn't fix your problem, you might want to look at some other solutions:
https://electronics.stackexchange.com/questions/78302/avrisp-mkii-not-reading-device-signature/189488
https://electronics.stackexchange.com/questions/67757/why-does-my-avrisp-mkii-programmer-not-work
AVRISP MKII doesn't work with AVRDUDE on Linux
https://electronics.stackexchange.com/questions/74298/how-does-avrdude-with-avr-isp-mkii-respond-when-no-target-board-is-connected
Good luck!

Cannot talk to atmega328p over AVRisp mkII

I have similar issue as here(AVRISPmkII connection status: Unknown status 0x00) but different setup and changing bitcklock didn't help.
The current setup is atmega328p with external oscillator 16MHz connected to ISP interface of avrisp mkII programmer but whatever I do It keeps on showing the same output all the time:
mike#asus:~/wireless-temp-sens/tests$ sudo avrdude -p atmega328p -P usb -c avrispv2 -U lfuse:w:0xff:m -U hfuse:w:0xd9:m -U efuse:w:0xfe:m -v
avrdude: Version 6.0.1, compiled on Oct 21 2013 at 17:07:18
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/mike/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : avrispv2
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200209719
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : STK500V2
Description : Atmel AVR ISP V2
Programmer Model: AVRISP mkII
Hardware Version: 1
Firmware Version Master : 1.23
Vtarget : 4.9 V
SCK period : 2053.39 us
avrdude: stk500v2_command(): command failed
avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Unknown status 0x00
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
Any help is appreciated!
Problem resolved! Don't remember what was the reason exactly. I guess clock crystal didn't have proper connections on a breadboard. So, I would say:
Check your wiring
Check your wiring
Check your wiring

Kernel Panic after SMP Implementation - Attempted to kill init

I am working on implementing SMP support in Linux kernel for Marvell PXA2128 ARM SoC. I am using Linus Torvald kernel as base kernel. Kernel version is 3.5. I have added SMP support in Linux kernel, I am able to boot with the second core but sometimes my kernel crashes with "Attempted to kill Init" message, that is, init process of initramfs dies somehow, don't know why. I thought L1 cache of second core is corrupted, so I invalidated the L1 cache of second core before it enters the Linux kernel execution. Crash log of kernel is like
[ 16.413024] Freeing init memory: 268K
[ 16.658111] tmpfs: No value for mount option 'strictatime'
[ 16.809997] scsi 0:0:0:0: Direct-Access SanDisk Cruzer Blade 1.27 PQ: 0 ANSI: 6
[ 16.827545] tmpfs: No value for mount option 'strictatime'
[ 16.972473] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 16.972930] sd 0:0:0:0: [sda] 15330304 512-byte logical blocks: (7.84 GB/7.30 GiB)
[ 16.974487] sd 0:0:0:0: [sda] Write Protect is off
[ 16.976104] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 17.369537] sda: sda1 sda2
[ 17.377258] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 17.602966] tmpfs: No value for mount option 'strictatime'
[ 18.074981] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[ 18.074981]
[ 18.222442] [<c001691c>] (unwind_backtrace+0x0/0x128) from [<c046beb0>] (dump_stack+0x20/0x24)
[ 18.301177] [<c046beb0>] (dump_stack+0x20/0x24) from [<c046bfcc>] (panic+0x94/0x1d4)
[ 18.378265] [<c046bfcc>] (panic+0x94/0x1d4) from [<c002ad08>] (do_exit+0x390/0x7ac)
[ 18.454956] [<c002ad08>] (do_exit+0x390/0x7ac) from [<c002b37c>] (do_group_exit+0x0/0xc4)
[ 18.533111] CPU0: stopping
[ 18.605621] [<c001691c>] (unwind_backtrace+0x0/0x128) from [<c046beb0>] (dump_stack+0x20/0x24)
[ 18.687225] [<c046beb0>] (dump_stack+0x20/0x24) from [<c00145ac>] (handle_IPI+0x104/0x174)
[ 18.770141] [<c00145ac>] (handle_IPI+0x104/0x174) from [<c0008590>] (gic_handle_irq+0x60/0x68)
[ 18.854888] [<c0008590>] (gic_handle_irq+0x60/0x68) from [<c000e6c0>] (__irq_svc+0x40/0x70)
[ 18.940093] Exception stack(0xc0685f38 to 0xc0685f80)
[ 19.022155] 5f20: c06c4c28 a0000093
[ 19.108398] 5f40: 00000001 60400100 c0684000 c06c48c8 c047560c c0691438 c177a080 562f5842
[ 19.188018] SMP: failed to stop secondary CPUs
[ 19.275970] 5f60: 00000000 c0685f9c c0685f40 c0685f80 c0020668 c0010068 60000013 ffffffff
[ 19.363708] [<c000e6c0>] (__irq_svc+0x40/0x70) from [<c0010068>] (cpu_idle+0x94/0xdc)
[ 19.450805] [<c0010068>] (cpu_idle+0x94/0xdc) from [<c0462d24>] (rest_init+0x7c/0x94)
[ 19.537292] [<c0462d24>] (rest_init+0x7c/0x94) from [<c063f89c>] (start_kernel+0x328/0x380)
Now when my kernel boots successfully, the output of cat /proc/interrupts is like
bash-4.2# cat /proc/interrupts
CPU0 CPU1
39: 101 0 GIC pxa_i2c-i2c
45: 0 26692 GIC timer0
46: 26578 0 GIC timer1
52: 27 0 GIC olpc-ec-1.75
58: 0 0 GIC mmp-vmeta
60: 1142 0 GIC UART3
71: 0 0 GIC mmc2
72: 0 0 GIC olpc-kbd
73: 25978 0 GIC pxa168fb-dss
76: 2282 0 GIC ehci_hcd:usb1
84: 246 0 GIC mmc0
85: 9820 0 GIC mmc1
132: 0 0 ICU rtc Alrm
133: 0 0 ICU rtc 1Hz
137: 0 0 ICU galcore interrupt service
139: 88 0 ICU galcore interrupt service for 2D
141: 20 0 ICU pxa_i2c-i2c
143: 0 0 ICU pxa_i2c-i2c
145: 328 0 ICU pxa_i2c-i2c
186: 52 0 ICU mmc3
252: 0 0 GPIO hsdet-gpio
253: 0 0 GPIO hdmi-hpd
270: 0 0 GPIO d4280000.sdhci cd
278: 0 0 GPIO sdhci_wakeup_irq, sdhci_wakeup_irq, sdhci_wakeup_irq, sdhci_wakeup_irq
335: 0 0 GPIO micdet-gpio
365: 0 0 GPIO DCON
368: 0 0 GPIO olpc-switch-1.75-lid
369: 0 0 GPIO olpc-switch-1.75-ebook
393: 0 0 GPIO olpc-ec-1.75-wake
IPI0: 0 0 Timer broadcast interrupts
IPI1: 3508 4069 Rescheduling interrupts
IPI2: 0 0 Function call interrupts
IPI3: 7 429 Single function call interrupts
IPI4: 0 0 CPU stop interrupts
Err: 0
bash-4.2#
Please give me a clue what important I am missing in SMP implementation.

Resources