Author Topic: Digispark not registering as a tty device  (Read 8766 times)

michda

  • Newbie
  • *
  • Posts: 1
Digispark not registering as a tty device
« on: March 08, 2013, 03:36:07 pm »
Hi guys,


I'm running Ubuntu and have been able to upload programs to my digispark. I'm currently looking at the IR shield but I'm unable to see the device in /dev/ttyUSB*. My dmesg shows me adding the device:



[ 3426.717976] usb 2-1.4: USB disconnect, device number 12
[ 3431.520992] usb 2-1.4: new low-speed USB device number 13 using ehci_hcd


and lsusb shows the device
Bus 002 Device 013: ID 16d0:0753 GrauTec


but I can't see any ttyUsb devices.


Anyone have a suggestion?


Thanks in advance,
Michael

semicolo

  • Full Member
  • ***
  • Posts: 137
Re: Digispark not registering as a tty device
« Reply #1 on: March 08, 2013, 05:29:30 pm »
It's normal, the digispark doesn't provide a serial usb interface.

jaghvi

  • Newbie
  • *
  • Posts: 29
Re: Digispark not registering as a tty device
« Reply #2 on: August 01, 2013, 11:16:36 pm »
As the digispark is not detected as /dev/ttyACM* .How can I read the data I receive via USB into a text file ??
I have a working circuit ,where using DIGIUSB I am receiving data via a temp sensor on terminal .
Both digiterm by bluebie and digiusb monitor receives the data fine ,but cant figure out how to write this into a text file ??




digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Digispark not registering as a tty device
« Reply #3 on: August 02, 2013, 03:21:30 pm »
the receive command line tool (provided) should do what you want with the DigiUSB library. receive >> output.txt  - do receive --help for all the options

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Re: Digispark not registering as a tty device
« Reply #4 on: August 03, 2013, 01:03:57 am »
My digiusb Ruby library includes a terminal, but it is mainly a ruby library for talking to digiusb on digisparks. You can use it in a ruby script to read and write the spark, to connect it to things like web services and databases and files. Ruby is really nice. I use it for everything when I have the choice.

jaghvi

  • Newbie
  • *
  • Posts: 29
Re: Digispark not registering as a tty device
« Reply #5 on: August 06, 2013, 10:50:53 pm »
@digistump It worked well  " Receive >>1.txt .


But I was wondering if PyUSB to read HID device can be used for dynamically reading USB port and update my file continuously with new data. ???
Wherein Ruby is concerned I am new to programming :(.
what's the significance of /dev/usb/hiddev0 created ??
Bluebie If you could share the files you have used to do read usb and write it in a file ?? :-X

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Digispark not registering as a tty device
« Reply #6 on: August 07, 2013, 01:58:28 am »
There is python example code here: https://github.com/digistump/DigisparkExamplePrograms


As a hack - You could also call read in a loop to append your file

jaghvi

  • Newbie
  • *
  • Posts: 29
Re: Digispark not registering as a tty device
« Reply #7 on: August 07, 2013, 03:15:57 am »
DigisparkArduino-Linux32 --"tools" directory containing avr tools ,is it available for arm devices ???


or if someone can give instructions to compile for arm device..

jaghvi

  • Newbie
  • *
  • Posts: 29
Re: Digispark not registering as a tty device
« Reply #8 on: August 23, 2013, 09:41:37 pm »
on PC :I have a working digispark circuit ,which I implemented on general purpose PCB. But while testing it again and again after some time it wont detect at all. All the fuses are fine. I reprogrammed micronucleus bootloader on the chip,its detecting again.
Can anyone enlighten what might be the issue ?


Also on  arm device it detects if cdc232.hex is written on the chip and then if some simple programme like blink led is put ?as arm detects it as  ttyACM0 device. But if a long sketch is uploaded it won't detect.


 what happens to cdc232.hex ?is it overwritten.


Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Re: Digispark not registering as a tty device
« Reply #9 on: August 23, 2013, 11:49:08 pm »
Yes, it is overwritten. Because blink sketch doesn't simulate a USB device, the computer hasn't noticed that there is no USB device plugged in to the port for a little while, but eventually something happens and it realises that it isn't there anymore. cdc232.hex is just like an arduino sketch, but precompiled, so it is replaced. You can't have two sketches installed at the same time on digispark.