Quantcast
Channel: Objective Development Forums
Viewing all 4524 articles
Browse latest View live

Re: Sometimes it does ... sometimes it doesn't

$
0
0
Your modifications are a good place to start. Does the stock firmware work? Is your hardware any different? What clock source are you using?

Re: WebYep site hacked (sort of…)

Re: Sometimes it does ... sometimes it doesn't

$
0
0
I've tried with stock 'Automator' code, stripped down to essentials, removed all the events and polling with the exception of the usbPoll(); loop ... and still get pretty much the same result .. disconnecting the JTAG debugger and running production rather than debug code seems to make a little improvement, but maybe I'm imagining it, but even so, just acquiring manufacturer and product from the device fails about 25% of the time, which is core v-usb functionality,

Seems to generally be the same -84 error .. which apparently is EILSEQ .. a CRC error. Sometimes it -71, a EPROTO protocol error

The USB waveform looks really crisp and is going 0V to 3.3V rail to rail, or as close as you can imagine, the 1K5 pulls up to around 3V so it looks about right.

Just trying the standard automator 'download file' I get it to work around 50% of the time ... still seeing protocol errors when trying to probe the manufacrturer and product
f652f480 1711975673 S Ci:6:099:0 s 80 06 0301 0409 00ff 255 <
f652f480 1711990667 C Ci:6:099:0 0 26 = 1a037700 77007700 2e006f00 62006400 65007600 2e006100 7400


and next time

f23a0e80 1713236684 S Ci:6:099:0 s 80 06 0301 0409 00ff 255 <
f23a0e80 1713251665 C Ci:6:099:0 -71 26 = 1a037700 77007700 2e006f00 62006400 65007600 2e006100 7400


The probe is the same, the received packet is the same, but Linux seems to think there is a protocol error ... the notes I can find on the 'net say:

81 -EPROTO (*, **) a) bitstuff error
82 b) no response packet received within the
83 prescribed bus turn-around time
84 c) unknown USB error
85
86 -EILSEQ (*, **) a) CRC mismatch
87 b) no response packet received within the
88 prescribed bus turn-around time
89 c) unknown USB error
90
91 In cases b) and c) either -EPROTO or -EILSEQ
92 may be returned. Note that often the controller
93 hardware does not distinguish among cases a),
94 b), and c), so a driver cannot tell whether
95 there was a protocol error, a failure to respond
96 (often caused by device disconnect), or some
97 other fault.


By the way the packets look identical, but there is a protocol error ... I would say its either timing related or something deeper in the handshake?

usbHidReportDescriptor work under Linux or Windows, not both

$
0
0
I'm making a combo device (keyboard & mouse).

This usbHidReportDescriptor works under Windows, but under Linux everything works except the left mouse button click (it does a right mouse button click):
const PROGMEM char usbHidReportDescriptor[83] = {                                         //83
    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)
    0x09, 0x02,                    // USAGE (Mouse)
    0xa1, 0x01,                    // COLLECTION (Application)
    0x85, 0x4d,                 //   REPORT_ID (77)
    0x05, 0x09,                    //   USAGE_PAGE (Button)
    0x19, 0x01,                    //   USAGE_MINIMUM (Button 1)
    0x29, 0x08,                    //   USAGE_MAXIMUM (Button 8)
    0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
    0x25, 0x01,                    //   LOGICAL_MAXIMUM (1)
    0x75, 0x01,                    //   REPORT_SIZE (1)
    0x95, 0x08,                    //   REPORT_COUNT (8)
    0x81, 0x00,                    //   INPUT (Data,Ary,Abs)
    0x05, 0x01,                    //   USAGE_PAGE (Generic Desktop)
    0x09, 0x01,                    //   USAGE (Pointer)
    0xa1, 0x00,                    //   COLLECTION (Physical)
    0x09, 0x30,                    //     USAGE (X)
    0x09, 0x31,                    //     USAGE (Y)
    0x15, 0x81,                    //     LOGICAL_MINIMUM (-127)
    0x25, 0x7f,                    //     LOGICAL_MAXIMUM (127)
    0x75, 0x08,                    //     REPORT_SIZE (8)
    0x95, 0x02,                    //     REPORT_COUNT (2)
    0x81, 0x06,                    //     INPUT (Data,Var,Rel)
    0xc0,                          //   END_COLLECTION
    0xc0,                          // END_COLLECTION
    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)
    0x09, 0x06,                    // USAGE (Keyboard)
    0xa1, 0x01,                    // COLLECTION (Application)
    0x85, 0x4b,              //   REPORT_ID (75)
    0x05, 0x07,                    //   USAGE_PAGE (Keyboard)
    0x19, 0xE0,                    //   USAGE_MINIMUM (Left Ctrl)
    0x29, 0xE7,                    //   USAGE_MAXIMUM (Right GUI)
    0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
    0x25, 0x01,                    //   LOGICAL_MAXIMUM (1)
    0x75, 0x01,                    //   REPORT_SIZE (1)
    0x95, 0x08,                    //   REPORT_COUNT (8)
    0x81, 0x02,                    //   INPUT (Data,Var,Abs)
   0x95, 0x01,                    //   REPORT_COUNT (1)
    0x75, 0x08,                    //   REPORT_SIZE (8)
    0x25, 0x65,                    //   LOGICAL_MAXIMUM (101)   
    0x19, 0x00,                    //   USAGE_MINIMUM (Reserved, No Event)
    0x29, 0x65,                    //   USAGE_MAXIMUM (Keyboard Application)
    0x81, 0x00,                    //   INPUT (Data,Var,Abs)
    0xc0                           // END_COLLECTION
};


This usbHidReportDescriptor works under Linux, but under Windows only the keyboard part works:
const PROGMEM char usbHidReportDescriptor[100] = {                                         //83
    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)
    0x09, 0x02,                    // USAGE (Mouse)
    0xa1, 0x01,                    // COLLECTION (Application)
    0x85, 0x4d,                 //   REPORT_ID (77)
    0x09, 0x01,       //   USAGE (Pointer)
    0xa1, 0x00,       //   COLLECTION (Physical)
    0x05, 0x09,       //     USAGE_PAGE (Button)
    0x19, 0x01,       //     USAGE_MINIMUM (Button 1)
    0x29, 0x03,       //     USAGE_MAXIMUM (Button 3)
    0x15, 0x00,       //     LOGICAL_MINIMUM (0)
    0x25, 0x01,       //     LOGICAL_MAXIMUM (1)
    0x95, 0x03,       //     REPORT_COUNT (3)
    0x75, 0x01,       //     REPORT_SIZE (1)
    0x81, 0x02,       //     INPUT (Data,Var,Abs)
    0x95, 0x01,       //     REPORT_COUNT (1)
    0x75, 0x05,       //     REPORT_SIZE (5)
    0x81, 0x03,       //     INPUT (Cnst,Var,Abs)
    0x05, 0x01,       //     USAGE_PAGE (Generic Desktop)
    0x09, 0x30,       //     USAGE (X)
    0x09, 0x31,       //     USAGE (Y)
    0x09, 0x38,       //     USAGE (Wheel)
    0x15, 0x81,       //     LOGICAL_MINIMUM (-127)
    0x25, 0x7f,       //     LOGICAL_MAXIMUM (127)
    0x75, 0x08,       //     REPORT_SIZE (8)
    0x95, 0x03,       //     REPORT_COUNT (3)
    0x81, 0x06,       //     INPUT (Data,Var,Rel)
    0x05, 0x0c,       //     USAGE_PAGE (Consumer Devices)
    0x0a, 0x38, 0x02, //     USAGE (Undefined)
    0x95, 0x01,       //     REPORT_COUNT (1)
    0x81, 0x06,       //     INPUT (Data,Var,Rel)
    0xc0,                          //   END_COLLECTION
    0xc0,                          // END_COLLECTION
    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)
    0x09, 0x06,                    // USAGE (Keyboard)
    0xa1, 0x01,                    // COLLECTION (Application)
    0x85, 0x4b,              //   REPORT_ID (75)
    0x05, 0x07,                    //   USAGE_PAGE (Keyboard)
    0x19, 0xE0,                    //   USAGE_MINIMUM (Left Ctrl)
    0x29, 0xE7,                    //   USAGE_MAXIMUM (Right GUI)
    0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
    0x25, 0x01,                    //   LOGICAL_MAXIMUM (1)
    0x75, 0x01,                    //   REPORT_SIZE (1)
    0x95, 0x08,                    //   REPORT_COUNT (8)
    0x81, 0x02,                    //   INPUT (Data,Var,Abs)
   0x95, 0x01,                    //   REPORT_COUNT (1)
    0x75, 0x08,                    //   REPORT_SIZE (8)
    0x25, 0x65,                    //   LOGICAL_MAXIMUM (101)   
    0x19, 0x00,                    //   USAGE_MINIMUM (Reserved, No Event)
    0x29, 0x65,                    //   USAGE_MAXIMUM (Keyboard Application)
    0x81, 0x00,                    //   INPUT (Data,Var,Abs)
    0xc0                           // END_COLLECTION
};


Who can help me with a working usbHidReportDescriptor which works under Windows, Linux (and preferably Mac)?

Re: ClipMerge not working on Mavericks?

$
0
0
Hey all.

Just chiming in to say ClipMerge is working for me in LaunchBar v5.6.2 (1020) on Mavericks 10.9.1. I downloaded a fresh of the app version form the Obdev website (didn't do the update through the app itself).
I'm keeping v5.6 around just in case something happens. It would be handy to know whether the devs did something to address/repair this, or whether it was a glitchy install or my system that were causing issues.

Solved

$
0
0
Sorted.

At some point I had uncommented the line:

// #define USB_INTR_CFG MCUCR

in usbconfig.h ... which caused it to work erratically ... for reasons not totally clear to me ... I think I did that while trying to configure for INT2

but anyway commenting that line out again that solved it, and it runs on INT2 just fine.

Re: usbHidReportDescriptor work under Linux or Windows, not

$
0
0
I changed the usbHidReporterDescriptor to the following and that works!

const PROGMEM char usbHidReportDescriptor[89] = {                                         //83
0x05, 0x01,                    // 52: USAGE_PAGE (Generic Desktop)
0x09, 0x02,                    // USAGE (Mouse)
0xa1, 0x01,                    // COLLECTION (Application)
    0x85, 0x4d,                 //   REPORT_ID (77)
0x09, 0x01,                    //   USAGE (Pointer)
0xa1, 0x00,                    //   COLLECTION (Physical)
0x05, 0x09,                    //     USAGE_PAGE (Button)
0x19, 0x01,                    //     USAGE_MINIMUM (Button 1)
0x29, 0x03,                    //     USAGE_MAXIMUM (Button 3)
0x15, 0x00,                    //     LOGICAL_MINIMUM (0)
0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
0x95, 0x03,                    //     REPORT_COUNT (3)
0x75, 0x01,                    //     REPORT_SIZE (1)
0x81, 0x02,                    //     INPUT (Data,Var,Abs)
0x95, 0x01,                    //     REPORT_COUNT (1)
0x75, 0x05,                    //     REPORT_SIZE (5)
0x81, 0x03,                    //     INPUT (Cnst,Var,Abs)
0x05, 0x01,                    //     USAGE_PAGE (Generic Desktop)
0x09, 0x30,                    //     USAGE (X)
0x09, 0x31,                    //     USAGE (Y)
0x15, 0x81,                    //     LOGICAL_MINIMUM (-127)
0x25, 0x7f,                    //     LOGICAL_MAXIMUM (127)
0x75, 0x08,                    //     REPORT_SIZE (8)
0x95, 0x02,                    //     REPORT_COUNT (2)
0x81, 0x06,                    //     INPUT (Data,Var,Rel)
0xc0,                          //   END_COLLECTION
0xc0,                           // END_COLLECTION

    0x05, 0x01,                    // 37: USAGE_PAGE (Generic Desktop)
    0x09, 0x06,                    // USAGE (Keyboard)
    0xa1, 0x01,                    // COLLECTION (Application)
    0x85, 0x4b,              //   REPORT_ID (75)
    0x05, 0x07,                    //   USAGE_PAGE (Keyboard)
    0x19, 0xE0,                    //   USAGE_MINIMUM (Left Ctrl)
    0x29, 0xE7,                    //   USAGE_MAXIMUM (Right GUI)
    0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
    0x25, 0x01,                    //   LOGICAL_MAXIMUM (1)
    0x75, 0x01,                    //   REPORT_SIZE (1)
    0x95, 0x08,                    //   REPORT_COUNT (8)
    0x81, 0x02,                    //   INPUT (Data,Var,Abs)
   0x95, 0x01,                    //   REPORT_COUNT (1)
    0x75, 0x08,                    //   REPORT_SIZE (8)
    0x25, 0x65,                    //   LOGICAL_MAXIMUM (101)   
    0x19, 0x00,                    //   USAGE_MINIMUM (Reserved, No Event)
    0x29, 0x65,                    //   USAGE_MAXIMUM (Keyboard Application)
    0x81, 0x00,                    //   INPUT (Data,Var,Abs)
    0xc0                           // END_COLLECTION
};

Re: Left mouse button click not working under Linux (Debian)

$
0
0
I changed the usbHidReportDescriptor to the following and that works!

const PROGMEM char usbHidReportDescriptor[89] = {                                         //83
0x05, 0x01,                    // 52: USAGE_PAGE (Generic Desktop)
0x09, 0x02,                    // USAGE (Mouse)
0xa1, 0x01,                    // COLLECTION (Application)
    0x85, 0x4d,                 //   REPORT_ID (77)
0x09, 0x01,                    //   USAGE (Pointer)
0xa1, 0x00,                    //   COLLECTION (Physical)
0x05, 0x09,                    //     USAGE_PAGE (Button)
0x19, 0x01,                    //     USAGE_MINIMUM (Button 1)
0x29, 0x03,                    //     USAGE_MAXIMUM (Button 3)
0x15, 0x00,                    //     LOGICAL_MINIMUM (0)
0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
0x95, 0x03,                    //     REPORT_COUNT (3)
0x75, 0x01,                    //     REPORT_SIZE (1)
0x81, 0x02,                    //     INPUT (Data,Var,Abs)
0x95, 0x01,                    //     REPORT_COUNT (1)
0x75, 0x05,                    //     REPORT_SIZE (5)
0x81, 0x03,                    //     INPUT (Cnst,Var,Abs)
0x05, 0x01,                    //     USAGE_PAGE (Generic Desktop)
0x09, 0x30,                    //     USAGE (X)
0x09, 0x31,                    //     USAGE (Y)
0x15, 0x81,                    //     LOGICAL_MINIMUM (-127)
0x25, 0x7f,                    //     LOGICAL_MAXIMUM (127)
0x75, 0x08,                    //     REPORT_SIZE (8)
0x95, 0x02,                    //     REPORT_COUNT (2)
0x81, 0x06,                    //     INPUT (Data,Var,Rel)
0xc0,                          //   END_COLLECTION
0xc0,                           // END_COLLECTION

    0x05, 0x01,                    // 37: USAGE_PAGE (Generic Desktop)
    0x09, 0x06,                    // USAGE (Keyboard)
    0xa1, 0x01,                    // COLLECTION (Application)
    0x85, 0x4b,              //   REPORT_ID (75)
    0x05, 0x07,                    //   USAGE_PAGE (Keyboard)
    0x19, 0xE0,                    //   USAGE_MINIMUM (Left Ctrl)
    0x29, 0xE7,                    //   USAGE_MAXIMUM (Right GUI)
    0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
    0x25, 0x01,                    //   LOGICAL_MAXIMUM (1)
    0x75, 0x01,                    //   REPORT_SIZE (1)
    0x95, 0x08,                    //   REPORT_COUNT (8)
    0x81, 0x02,                    //   INPUT (Data,Var,Abs)
   0x95, 0x01,                    //   REPORT_COUNT (1)
    0x75, 0x08,                    //   REPORT_SIZE (8)
    0x25, 0x65,                    //   LOGICAL_MAXIMUM (101)   
    0x19, 0x00,                    //   USAGE_MINIMUM (Reserved, No Event)
    0x29, 0x65,                    //   USAGE_MAXIMUM (Keyboard Application)
    0x81, 0x00,                    //   INPUT (Data,Var,Abs)
    0xc0                           // END_COLLECTION
};

Re: WebYep site hacked (sort of…)

$
0
0
OK… Gave the method for defining which file types would be allowed a try but it did not seem to work. Also not sure how to address the data files WebYep is creating as they don't have any file extensions. Any thoughts?

Kind Regards,
Dave

Minimal USB implementation

$
0
0
To understand how to optimize the memory footprint of V-USB, I created a small ATtiny85 based device that controls a single WS2812 RGB LED via USB. This is very similar to the Blink[1] and other devices.

Current functionality
* Enumeration.
* Only SETUP-request can be received.
* Responses are limited to strings from flash memory or zero sized replies.
* All SETUP packets that are not system requests are forwarded to a WS2812 RGB LED on PB0.

I went as far as stripping down all the code from usbdrv.c and integrating it into a single function. I removed all code that was not required for the core functionality and combined some of the remaining functions:

* Removed data section and initiliazed variables "by hand"
* Turned global sram variables into local variable in the main loop.
* Reduced input buffer to single size
* Removed handling of USB reset.
* Used 16 MHz V-USB code instead of 16.5 MHz
* Included assembler implementation of osccal.c

My ultimate goal was to implement the code on a ATtiny 10. Currently this is not possible, because not enough SRAM is left for the stack and not enough flash is left for the 12MHz V-USB implementation.

Current resource usage:
* 1018 bytes Flash
* 28 bytes SRAM
* Uses only regs R16-R31

You can find the code here:
https://github.com/cpldcpu/u-wire

Maybe somebody has an idea how to reduce the SRAM or flash footprint further?

Re: Minimal USB implementation

$
0
0
Very interesting. Your effort should also be useful to someone learning how USB works hands-on, as it clears away all but the essentials.

I've noticed that calling assembly routines frustrates the C optimizer, because it must assume the worst about registers preserved. Here was an attempt I made at inlining the CRC routine and communicating what registers it trashed (though it may do it wrong, as I still find the asm specification syntax confusing):
static __attribute__((naked)) inline void usbCrc16Append( volatile unsigned char* data, unsigned char len )
{
    asm volatile (
"\n    ldi     r20, 0xFF"
"\n    ldi     r21, 0xFF"
"\n    rjmp    usbCrc16LoopTest"
"\nusbCrc16r18Loop:"
"\n    ld      r18, Z+"
"\n    eor     r18, r20      ; r19 is now 'x' in table()"
"\n    mov     r19, r18      ; compute parity of 'x'"
"\n    swap    r18"
"\n    eor     r18, r19"
"\n    mov     r20, r18"
"\n    lsr     r18"
"\n    lsr     r18"
"\n    eor     r18, r20"
"\n    inc     r18"
"\n    andi    r18, 2        ; r18 is now parity(x) << 1"
"\n    cp      r1, r18       ; c = (r18 != 0), then put in high bit"
"\n    ror     r19           ; so that after xoring, shifting, and xoring, it gives"
"\n    ror     r18           ; the desired 0xC0 with r21"
"\n    mov     r20, r18"
"\n    eor     r20, r21"
"\n    mov     r21, r19"
"\n    lsr     r19"
"\n    ror     r18"
"\n    eor     r21, r19"
"\n    eor     r20, r18"
"\nusbCrc16LoopTest:"
"\n    subi    %1, 1"
"\n    brsh    usbCrc16r18Loop"
"\n    com     r20"
"\n    com     r21"
"\n    st      Z+, r20"
"\n    st      Z, r21"
"\n"
    : "=z" (data), "=r" (len)
    : "0"  (data), "1"  (len)
    : "memory", "r18", "r19", "r20", "r21" );
}


Also, that's for the optimized CRC routine, so you'll want to convert the slower, shorter one.

Re: Node via Terminal wants to accept an incoming connection

$
0
0
Node via Terminal most likely refers to "node.js" (http://nodejs.org/) running in a Terminal.app window.

This is (effectively) a web server similar to apache httpd with php, but which runs server-side javascript.

For this to be running, you or another account you created on your Mac would have had to installed node.js and then run a javascript program (nothing at all to do with a web page or web browser!) inside the Terminal.

Paul

Re: ATMEGA32 minimum system board MCU AVR Development Board

$
0
0
Hi everybody.

I do not know how good google-translate will work.
But at least for all Germans speaking people: There is a very rich thread about the ATmega32 Minimum System Board in the German Mikrocontroller forum, see here: http://www.mikrocontroller.net/topic/288940#new

There you also can find working and precompiles example firmwares for the different version of the board, in order to get the USB up and running.

BR

Full uninstall

$
0
0
Hi,
I uninstall Little Snitch and reinstall it. The problem is it retrieve all my old rules.

How can I don a complete install of binaries and other config files ?

LittleSnitch 3.3
Core System version: 4052
Kernel version: 4052


Thanks

window disappeared

$
0
0
the LS monitor window is on the wrong display
so i try to drag it off that display and onto the one in WANT
but it disappeared at the edge of the first display and now i can't get it back.
???

Re: Loads of errors in the Console since Maverick upgrade

$
0
0
I see these errors as well. Any updates?

Re: window disappeared

$
0
0
Just had this problem myself. I was able to see the monitor in Mission Control, but not able to move it around whatsoever. When returning to the desktop from Mission Control, I could see that the monitor window was flying off the top of the screen. After some Googling, I discovered a solution: Rearrange your displays so that one is on top of the other, instead of side-by-side. In my case, the monitor window was flying off the top of the left screen, so I put the right screen on top of the left screen. After the displays were rearranged, the window appeared and I was able to move it back to its original position. I decided that's where it would stay! Once it's back where it started, you can rearrange your displays to the original layout.

Another possible solution is to "Show pre-release versions" in LS Preferences->Update. Click "Check Now" and install the latest release: 3.3.1 nightly (4057) at the time of this writing. After I installed that, the monitor window now appears on the active display in Mavericks. So maybe you could just try that install instead of jumping through the hoops above.

Good luck!

Re: Full uninstall

$
0
0
The uninstaller has an option to also remove rules and settings. There's also a menu item on the rules screen, Rules > Restore Factory Defaults.

ignore

Re: Searching Apple Maps

$
0
0
..or just press Space when Maps is selected in LB...
Viewing all 4524 articles
Browse latest View live