ATMega328p - ispEnterProgMode: Error status received: Got 0xc0, expected 0x00 (Command has failed to execute on the tool) - atmega32

I have this problem "ispEnterProgMode: Error status received: Got 0xc0, expected 0x00 (Command has failed to execute on the tool)"
Debug -> 'Start debugging and break' is greyed out for me.
I was happily programming my boards but now they wont take the code and the error comes up. The boards now dont do anything that requires the AtMega328p to drive it. Programmer can see the board as it is green when plugged in. Seem to have killed 2 of my boards

Related

Why do I get this error on Packet tracer?

enter image description hereI am doing CISCO packet tracer - Lab 08 – Configuring RIPv2, I get an error on part 1)a) of the lab where I need to (Use the appropriate command to create a default route on R1 for all Internet traffic to exit the network through S0/0/1). The error is "%Invalid interface type and number" after I used the command
"Router(config)#ip route 0.0.0.0 0.0.0.0 s0/0/1" I do not know why I got this error? May anyone help me understand why I got this error and how to fix it.
It can be due to 2 reasons I can think of
1. You do not have that interface ( try may be serial 0/0/1)
2. Its in shutdown mode
The red triangle means the interface is actually off , go to the router's cli
do these commands :
en
conf t
int s0/0/1
no shut
and then do the route again

PyUSB Barcode Scanner without Button by Honeywell

I have a Honeywell N5600 that I'm trying to use, but I don't get it to scan anything.
The device is recognized as /dev/hidraw1, but as it does not have any button to press, I cannot trigger the scan and thus, when I try to read from it, it just waits forever.
I started creating a python program, that seems to be able to communicate with it (different return values):
VENDOR_LEGO = 0x0c2e
PRODUCT_EV3 = 0x0967
device = usb.core.find(idVendor=VENDOR_LEGO, idProduct=PRODUCT_EV3)
device.detach_kernel_driver(0)
#"TRGMOD8." would - when scanned (which I cannot do, at this point) - activate a permanent scanning mode
device.ctrl_transfer(0x21, 0x9, wValue=0x200, wIndex=0x00, data_or_wLength='TRGMOD8.')
#8 is returned
device.ctrl_transfer(0x21, 0x9, wValue=0x200, wIndex=0x00, data_or_wLength='PAPSPC.')
#7 is returned
Unluckily the link given in this post is not reachable anymore. It seems like it would have solved my problem.
How can I activate the scanning?
The document on Honeywell N5600 is as follows.
N5600 OEM 2D Imager Data Sheet
N56XX Decoded Engine User's Guide
You need a Windows PC that can connect to the Internet, but there is a tool called EZConfig-Scanning that configures and maintains the scanner.
EZConfig Device Management Data Sheet
Perhaps the recognition device /dev/hidraw1 is probably because the scanner is set to USB HID Bar Code Scanner mode.
If you change the setting to USB Keyboard(PC/Mac), it is always readable and the barcode you read will be notified as keyboard input.
By changing the setting to USB Serial, reading start/stop can be controlled by SerialPort command transmission. The barcode read is notified by receiving data from SerialPort.

How to check NDK error log in Android Studio?

I meet some NDK error log like that:
SIGSEGV (signal SIGSEGV: invalid address (fault address:
0x7f5479d281)) Signal: SIGSEGV (signal SIGSEGV: invalid address (fault address: 0x10))
Fatal signal 11 (SIGSEGV), code 1, fault addr 0x18
According to the offical documents, I use ndk-stack to deal the NDK logs. But it does't show the detail line like /tmp/foo/crasher/jni/foo.c:9, I guess it might be the cause of the closed source library.
So I would like to know how to deal with this situation is more appropriate? Thanks very much.
Basically, ndk-stack should indeed be the tool to achieve what you need.
I would suggest trying to detect the exact line in your code that causes the problem by putting some log lines along your code. And make sure you run the ndk in debug configuration (APP_OPTIM := debug in Application.mk)

tiny_serial driver example from LDD

I have compiled and installed the tiny_serial driver example from the book Linux Device Drivers by Greg Kroah-Hartman. I use the sources from https://github.com/duxing2007/ldd3-examples-3.x.git
The device node /dev/ttytiny0 is successfully created but I am having trouble reading anything from the device. Looking at the driver, it seems that I should be able to read a 't' character.
Running stty gets me the following below error:
root#brijesh-M11BB:~/ldd3-examples-3.x# setserial /dev/ttytiny0
/dev/ttytiny0, UART: unknown, Port: 0x0000, IRQ: 0
root#brijesh-M11BB:~/ldd3-examples-3.x# stty -F /dev/ttytiny0
stty: /dev/ttytiny0: Input/output error
Similarly doing cat /dev/tinytty0 also reports a similar error. I also tried minicom -D /dev/ttytiny0 but the device is always shown as offline.
It seems I am missing something, can anyone please point out what I am missing?
This is happening with me on both Ubuntu 15.10 (3.19.x kernel) and older 2.6.28 kernel.
I have debugged it and found the root cause.
strace shows -EIO on tinytty0 device. -EIO was generated from driver tty layer (-ENO_TTY_DEVICE). The reason for ENO_TTY_DEVICE was port->type is set to 0 (i.e unknown). Setting the port->type = PORT_16550A before adding uart driver resolved the issue.
While the previous answer was correct, it did not explain where to fix the code.
Note: I am using linux kernel 3.10
I implemented the one-line fix in the declaration of the uart_port struct, here is how:
static struct uart_port tiny_port = {
.ops = &tiny_ops,
.type = PORT_16550A, // THIS IS THE FIX
};
I believe this may be a bug in the kernel code, because by not setting the uart_port type, it defaults to PORT_UNKNOWN.
While I understand this may be a protection, it seems more correct to leave it at PORT_UNKNOWN rather than that of another random device.
BONUS POINTS:
After fixing the PORT_UNKNOWN issue, if you get a kernel panic for dividing by 0, comment out the following lines from duxing2007's code:
baud = uart_get_baud_rate(port, new, old, 0, port->uartclk/16);
quot = uart_get_divisor(port, baud);
BONUS POINTS 2:
This link shows how a developer with a similar issue (Ira Snyder) implemented the tiny_exit() function, so that you can remove the kernel module without causing a hang.

Condor on Win7: connection issue (Errno 10054)

I have installed condor 8.2.0 on several Win7 (32/64bit) computers according this guide: http://www.slideshare.net/gtelzur/condor8-win-install All the services run on the same machine and therefore I rule out a physical network interrupt.
Whenever a job is created/submitted, it stays in the idle mode. A detailed look a the log files unveil the following issue (ShadowLog):
07/07/14 08:10:47 (1.1) (PID1): **** condor_shadow (condor_SHADOW) pid PID1 EXITING WITH STATUS 107
07/07/14 08:10:47 (1.0) (PID2): condor_read() failed: recv(fd=540) returned -1, errno = 10054 , reading 5 bytes from startd slot1#mycomputer.mydomain.local.
07/07/14 08:10:47 (1.0) (PID2): IO: Failed to read packet header
07/07/14 08:10:47 (1.0) (PID2): Can no longer talk to condor_starter <192.168.25.120:56186>
I couldn't find more details about an IO exception with ID 10054. Beyond that Google does not give me useful hints if I search for "Condor IO: Failed to read packet header".
Do you have a clue what could address the issue?
I had the same issue and it was fixed when I reinstalled Condor in C:\Condor (it was in D:\Condor).
Note that with Condor 8.2.1 I ran into an unrelated problem: I had to edit the condor_config file and remove one $ in the line CONDOR_HOST = $$(FULL_HOSTNAME), as otherwise there was a parsing error.
When you see
condor_read() failed: .... reading 5 bytes from .....
In one of the log files, that usually means that the other side of the connection hung up, so you should look in the log file for the other side of the conversion. In this case, that would be the StarterLog.slot1 on mycomputer.mydomain.local (or possibly just the StarterLog, if the problem happens very early).
Usually when a daemon hangs up, the reason for the hang up is in the log, and very often the problem is that the other side of the conversation isn't authorized. See configuration values that match ALLOW_* to see what is authorized.

Resources