Author Topic: Digispark (Pro) CDC (Serial over USB) Beta Library  (Read 17339 times)

TimO

  • Newbie
  • *
  • Posts: 36
Re: Digispark (Pro) CDC (Serial over USB) Beta Library
« Reply #15 on: December 26, 2014, 11:51:29 am »
Well, that was odd, because Serial.write obviously wouldn't even compile correctly, let alone fail when uploaded (since it wouldn't ever get that far!).

Changing that one line obviously solves the compiling error, and then it works as expected. <doh>

I'm really not sure what I was doing before, that compiled, uploaded, and then didn't work?!

Oh well, c'est la vie.

TimO

  • Newbie
  • *
  • Posts: 36
Re: Digispark (Pro) CDC (Serial over USB) Beta Library
« Reply #16 on: December 26, 2014, 01:54:45 pm »
OK, some of the that confusion was caused by me having the DigiX board selected rather than the Digispark Pro, the Serial.write will work with Digispark Pro, but throws a compiler error with the DigiX.

I'm still getting some slightly odd and unexpected behaviour from SerialUSB, mostly when I try and do anything vaguely complicated (and hence useful), although careful insertion of SerialUSB.delay can sometimes cure that.  It does appear to sometimes be very sensitive to timing though.  I'll start a thread in Digispark Pro Support, where it's probably more appropriate and useful, and post a few working vs non-working examples.

defragster

  • Sr. Member
  • ****
  • Posts: 467
Re: Digispark (Pro) CDC (Serial over USB) Beta Library
« Reply #17 on: December 26, 2014, 10:44:45 pm »
I'm just seeing this 'Beta' thread - I saw DigiCDC on another and documented what I saw - 1.5.8B compiles and functions until you try to extend the example.  http://digistump.com/board/index.php/topic,1597

Work is coming on this for an update.  Hoping a change to underlying USB will fix what I saw on DigiMouse too.


digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Digispark (Pro) CDC (Serial over USB) Beta Library
« Reply #18 on: January 03, 2015, 02:55:00 pm »
To clarify: DigiMouse is updated in next release for bug in it - it was unrelated to any CDC bugs.

These CDC bugs are being investigated and there will be some updates in the next release to hopefully solve them.

mes

  • Newbie
  • *
  • Posts: 9
Re: Digispark (Pro) CDC (Serial over USB) Beta Library
« Reply #19 on: February 24, 2015, 03:29:07 pm »
The problem I had with CDC in Fedora 20 has been partially rectified with the latest kernel, 3.18.7-100.fc20. The CDC_LED example now works. However, SerialUSB.write does not appear to work. I get the first character of a string, then nothing more.

Materdaddy

  • Newbie
  • *
  • Posts: 1
Re: Digispark (Pro) CDC (Serial over USB) Beta Library
« Reply #20 on: July 15, 2016, 12:39:52 am »
Has anybody gotten a digispark talking to linux?

I cannot get this working with a 3.16.0-4-amd64 kernel from debian jessie.  I receive the types of urb errors mentioned by "mes" previously.

Code: [Select]
[2133473.100292] ------------[ cut here ]------------
[2133473.100296] WARNING: CPU: 0 PID: 685 at /build/linux-lqALYs/linux-3.16.7-ckt25/drivers/usb/core/urb.c:450 usb_submit_urb+0x1f0/0x5a0 [usbcore]()
[2133473.100297] usb 2-1: BOGUS urb xfer, pipe 3 != type 1
[2133473.100298] Modules linked in: radio_ma901 videodev media btrfs xor raid6_pq ufs qnx4 hfsplus hfs minix ntfs msdos jfs xfs libcrc32c crc32c_generic cdc_ether binfmt_misc vboxpci(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) cdc_acm nfnetlink_queue nfnetlink_log nfnetlink cp210x asix usbnet libphy nls_cp437 vfat fat bnep bluetooth 6lowpan_iphc md4 hmac nls_utf8 cifs rpcsec_gss_krb5 nfsv4 dns_resolver pci_stub nfsd auth_rpcgss oid_registry nfs_acl nfs lockd fscache sunrpc pl2303 usbserial arc4 rt2800pci rt2800mmio rt2800lib rt2x00pci x86_pkg_temp_thermal rt2x00mmio rt2x00lib eeprom_93cx6 mac80211 cfg80211 intel_powerclamp intel_rapl coretemp iTCO_wdt kvm_intel kvm snd_hda_codec_hdmi crc_ccitt crc32_pclmul rfkill snd_hda_codec_realtek snd_hda_codec_generic iTCO_vendor_support snd_hda_intel cryptd i2c_i801
[2133473.100322]  evdev serio_raw pcspkr snd_hda_controller shpchp mei_me mei lpc_ich mfd_core snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore tpm_infineon tpm_tis tpm processor wmi fuse parport_pc ppdev lp parport autofs4 hid_belkin hid_generic usbhid hid usb_storage ext4 crc16 mbcache jbd2 dm_mod sg sr_mod sd_mod cdrom crc_t10dif crct10dif_generic crct10dif_pclmul crct10dif_common crc32c_intel psmouse ahci libahci xhci_hcd i915 i2c_algo_bit video libata drm_kms_helper ehci_pci ehci_hcd scsi_mod r8169 drm mii usbcore i2c_core usb_common thermal_sys button [last unloaded: vboxdrv]
[2133473.100342] CPU: 0 PID: 685 Comm: screen Tainted: G        W  O  3.16.0-4-amd64 #1 Debian 3.16.7-ckt25-2
[2133473.100344] Hardware name: Gateway DX4860/IPISB-VR, BIOS P02-A2 10/31/2011
[2133473.100344]  0000000000000000 ffffffff8150e835 ffff8800131c3ae8 0000000000000009
[2133473.100346]  ffffffff810677f7 ffff880527437dc0 ffff8800131c3b38 00000000000000d0
[2133473.100347]  0000000000000003 0000000000000000 ffffffff8106785c ffffffffa0051b78
[2133473.100349] Call Trace:
[2133473.100351]  [<ffffffff8150e835>] ? dump_stack+0x5d/0x78
[2133473.100353]  [<ffffffff810677f7>] ? warn_slowpath_common+0x77/0x90
[2133473.100355]  [<ffffffff8106785c>] ? warn_slowpath_fmt+0x4c/0x50
[2133473.100361]  [<ffffffffa003b816>] ? usb_hcd_submit_urb+0xa6/0xa60 [usbcore]
[2133473.100363]  [<ffffffff813adbcd>] ? rpm_resume+0x40d/0x5d0
[2133473.100370]  [<ffffffffa003d1d0>] ? usb_submit_urb+0x1f0/0x5a0 [usbcore]
[2133473.100372]  [<ffffffffa0a0a147>] ? acm_submit_read_urb+0x37/0x80 [cdc_acm]
[2133473.100374]  [<ffffffffa0a0a1c8>] ? acm_submit_read_urbs+0x38/0x50 [cdc_acm]
[2133473.100376]  [<ffffffffa0a0d087>] ? acm_port_activate+0x127/0x1b3 [cdc_acm]
[2133473.100378]  [<ffffffff813703fe>] ? tty_port_open+0x8e/0xe0
[2133473.100379]  [<ffffffff81366ed6>] ? tty_init_dev+0xb6/0x1e0
[2133473.100381]  [<ffffffff81367ae4>] ? tty_open+0x174/0x5d0
[2133473.100382]  [<ffffffff811acd22>] ? chrdev_open+0xa2/0x180
[2133473.100384]  [<ffffffff811acc80>] ? cdev_put+0x30/0x30
[2133473.100386]  [<ffffffff811a62a2>] ? do_dentry_open+0x1f2/0x330
[2133473.100388]  [<ffffffff811a65ad>] ? finish_open+0x2d/0x40
[2133473.100389]  [<ffffffff811b72ca>] ? do_last+0xaaa/0x1200
[2133473.100390]  [<ffffffff811b38a6>] ? link_path_walk+0x286/0x8a0
[2133473.100392]  [<ffffffff811b7adb>] ? path_openat+0xbb/0x680
[2133473.100394]  [<ffffffff811b884a>] ? do_filp_open+0x3a/0x90
[2133473.100395]  [<ffffffff811c48ac>] ? __alloc_fd+0x7c/0x120
[2133473.100397]  [<ffffffff811a7ae9>] ? do_sys_open+0x129/0x220
[2133473.100399]  [<ffffffff81514a0d>] ? system_call_fast_compare_end+0x10/0x15
[2133473.100409] ---[ end trace f7bb0a9006813c92 ]---

I also cannot get DigiUSB working as it never actually shows up in udev.  When monitoring udev with proper rules set up, I see the device show up for programming (the 5 seconds for the bootloader) and then nothing.  When trying DigiUSB I see errors like this:
Code: [Select]
[2133758.463588] usb 2-1: device descriptor read/64, error -110
[2133758.567414] xhci_hcd 0000:01:00.0: WARN urb submitted to disabled ep
[2133758.567420] xhci_hcd 0000:01:00.0: WARN urb submitted to disabled ep
[2133758.567422] xhci_hcd 0000:01:00.0: WARN urb submitted to disabled ep
[2133758.679523] usb 2-1: device descriptor read/64, error -2
[2133758.895288] usb 2-1: new low-speed USB device number 76 using xhci_hcd
[2133774.002376] usb 2-1: device descriptor read/64, error -110
[2133774.106250] xhci_hcd 0000:01:00.0: WARN urb submitted to disabled ep
[2133774.106255] xhci_hcd 0000:01:00.0: WARN urb submitted to disabled ep
[2133774.106257] xhci_hcd 0000:01:00.0: WARN urb submitted to disabled ep
[2133774.218348] usb 2-1: device descriptor read/64, error -2
[2133774.434136] usb 2-1: new low-speed USB device number 77 using xhci_hcd
[2133774.435533] usb 2-1: Device not responding to setup address.
[2133774.640455] usb 2-1: Device not responding to setup address.
[2133774.842006] usb 2-1: device not accepting address 77, error -71
[2133774.953974] usb 2-1: new low-speed USB device number 78 using xhci_hcd
[2133774.956367] usb 2-1: Device not responding to setup address.

jonathanscottjames

  • Newbie
  • *
  • Posts: 2
Re: Digispark (Pro) CDC (Serial over USB) Beta Library
« Reply #21 on: August 13, 2016, 01:17:54 pm »
since xp deliberately set to reject it from when it's plugged in to installing it's bastardized anti-xp driver  won't work on xp

i think the best way is either buy a pi zero from microcenter for 5$ and install the free win 10 or buy a 20$ laptop from the junk pile in a used computer store and install an eval copy of some douce win sys