Just unboxed Mono, just keeps restarting over and over again?



  • I managed to get a video of Mono restarting every 7-8 seconds with Clock app when connected to USB. After some time restarts stopped, so could this be related to low battery?

    I'm not able to repeat this behaviour, it just happens occassionally.

    https://www.youtube.com/watch?v=5EK8APF_0xk



  • The Welcome app will auto sleep after 1 or 2 minutes. Combined with the USB, you will experience something similar to a reset. (See: http://developer.openmono.com/en/latest/tutorials/sleep-mode.html#sleep-and-usb)

    @dave The welcome app automatically goes to sleep after some time, to not drain the battery. (Should Mono turn on inside the box during shipment.) But since mono can't goto sleep while USB is connected it will just wake up immediately again. Thats what happens in your 2nd video.

    @malaire You issue seems similar to @dave's first video. This must be something else. But I do not expect it to be related to the battery, since it is bypassed - when USB is connected.

    That said, do you have any serial / terminal application running? Mono will reset when it receives a serial DTR low signal.



  • @stoffera said in Just unboxed Mono, just keeps restarting over and over again?:

    The Welcome app will auto sleep after 1 or 2 minutes. Combined with the USB, you will experience something similar to a reset. (See: http://developer.openmono.com/en/latest/tutorials/sleep-mode.html#sleep-and-usb)

    Thanks for the link, I missed that bit when reading documentation.

    @malaire You issue seems similar to @dave's first video. This must be something else. But I do not expect it to be related to the battery, since it is bypassed - when USB is connected.

    That said, do you have any serial / terminal application running? Mono will reset when it receives a serial DTR low signal.

    No serial, Mono was just connected to computer. I thought about battery since I've only seen this twice: almost immediately after receiving Mono and testing Temperature-app, and then when I tested Clock-app after fully draining battery first (i.e. I kept running Clock without USB-connection until it would not start anymore and then connected to computer to recharge.)



  • I just got this again and this time I saved dmesg output while Mono was resetting every 10 seconds or so. I don't understand much, but cdc_acm is saying something about DTR.

    I'm using Debian 8, with monoprog 0.8.0 installed, but not used during these messages. (earlier I was using 0.7.0).

    [ 8182.061192] usb 3-1: new full-speed USB device number 2 using xhci_hcd
    [ 8182.173135] usb 3-1: device descriptor read/64, error -71
    [ 8182.572876] usb 3-1: new full-speed USB device number 3 using xhci_hcd
    [ 8182.702974] usb 3-1: New USB device found, idVendor=04b4, idProduct=b71d
    [ 8182.702978] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=128
    [ 8182.702981] usb 3-1: Product: PSoC3 Bootloader
    [ 8182.702983] usb 3-1: Manufacturer: Cypress Semiconductor
    [ 8182.702985] usb 3-1: SerialNumber: 0001
    [ 8182.704944] input: Cypress Semiconductor PSoC3 Bootloader as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.0/0003:04B4:B71D.0005/input/input17
    [ 8182.705093] hid-generic 0003:04B4:B71D.0005: input,hidraw4: USB HID v1.11 Device [Cypress Semiconductor PSoC3 Bootloader] on usb-0000:00:14.0-1/input0
    [ 8183.506013] usb 3-1: USB disconnect, device number 3
    [ 8183.844139] usb 3-1: new full-speed USB device number 4 using xhci_hcd
    [ 8183.974295] usb 3-1: New USB device found, idVendor=04b4, idProduct=f232
    [ 8183.974299] usb 3-1: New USB device strings: Mfr=6, Product=7, SerialNumber=128
    [ 8183.974301] usb 3-1: Product: Mono Serial Port
    [ 8183.974303] usb 3-1: Manufacturer: Monolit ApS
    [ 8183.974305] usb 3-1: SerialNumber: 0E220CC503113400
    [ 8183.974497] usb 3-1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
    [ 8183.992646] cdc_acm 3-1:1.0: This device cannot do calls on its own. It is not a modem.
    [ 8183.992676] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
    [ 8183.992903] usbcore: registered new interface driver cdc_acm
    [ 8183.992906] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    
    [ 8193.383754] usb 3-1: USB disconnect, device number 4
    [ 8193.383928] cdc_acm 3-1:1.0: failed to set dtr/rts
    [ 8193.718526] usb 3-1: new full-speed USB device number 5 using xhci_hcd
    [ 8193.848476] usb 3-1: New USB device found, idVendor=04b4, idProduct=b71d
    [ 8193.848478] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=128
    [ 8193.848479] usb 3-1: Product: PSoC3 Bootloader
    [ 8193.848480] usb 3-1: Manufacturer: Cypress Semiconductor
    [ 8193.848481] usb 3-1: SerialNumber: 0001
    [ 8193.850147] input: Cypress Semiconductor PSoC3 Bootloader as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.0/0003:04B4:B71D.0006/input/input18
    [ 8193.850338] hid-generic 0003:04B4:B71D.0006: input,hidraw4: USB HID v1.11 Device [Cypress Semiconductor PSoC3 Bootloader] on usb-0000:00:14.0-1/input0
    [ 8194.669364] usb 3-1: USB disconnect, device number 5
    [ 8195.013790] usb 3-1: new full-speed USB device number 6 using xhci_hcd
    [ 8195.143829] usb 3-1: New USB device found, idVendor=04b4, idProduct=f232
    [ 8195.143834] usb 3-1: New USB device strings: Mfr=6, Product=7, SerialNumber=128
    [ 8195.143837] usb 3-1: Product: Mono Serial Port
    [ 8195.143839] usb 3-1: Manufacturer: Monolit ApS
    [ 8195.143841] usb 3-1: SerialNumber: 0E220CC503113400
    [ 8195.144040] usb 3-1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
    [ 8195.145012] cdc_acm 3-1:1.0: This device cannot do calls on its own. It is not a modem.
    [ 8195.145037] cdc_acm 3-1:1.0: ttyACM1: USB ACM device
    
    [ 8204.374870] usb 3-1: USB disconnect, device number 6
    [ 8204.374997] cdc_acm 3-1:1.0: failed to set dtr/rts
    [ 8204.708305] usb 3-1: new full-speed USB device number 7 using xhci_hcd
    [ 8204.838270] usb 3-1: New USB device found, idVendor=04b4, idProduct=b71d
    [ 8204.838272] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=128
    [ 8204.838273] usb 3-1: Product: PSoC3 Bootloader
    [ 8204.838274] usb 3-1: Manufacturer: Cypress Semiconductor
    [ 8204.838275] usb 3-1: SerialNumber: 0001
    [ 8204.840029] input: Cypress Semiconductor PSoC3 Bootloader as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.0/0003:04B4:B71D.0007/input/input19
    [ 8204.840270] hid-generic 0003:04B4:B71D.0007: input,hidraw4: USB HID v1.11 Device [Cypress Semiconductor PSoC3 Bootloader] on usb-0000:00:14.0-1/input0
    [ 8205.660592] usb 3-1: USB disconnect, device number 7
    [ 8206.015542] usb 3-1: new full-speed USB device number 8 using xhci_hcd
    [ 8206.145630] usb 3-1: New USB device found, idVendor=04b4, idProduct=f232
    [ 8206.145634] usb 3-1: New USB device strings: Mfr=6, Product=7, SerialNumber=128
    [ 8206.145637] usb 3-1: Product: Mono Serial Port
    [ 8206.145639] usb 3-1: Manufacturer: Monolit ApS
    [ 8206.145641] usb 3-1: SerialNumber: 0E220CC503113400
    [ 8206.145818] usb 3-1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
    [ 8206.146773] cdc_acm 3-1:1.0: This device cannot do calls on its own. It is not a modem.
    [ 8206.146800] cdc_acm 3-1:1.0: ttyACM2: USB ACM device
    

    ... and this repeats approximately every 10 seconds ...



  • Another related problem I just noticed: When that resetting continues for about 5 minutes, linux runs out of /dev/ttyACM## devices and then monoprog can't find Mono anymore until you reboot computer (or perhaps you could reset cdc_acm driver somehow).

    EDIT: But resetting every 10 seconds does stop. However Mono still keeps resetting every few minutes.



  • Hi @malaire, that is strange. After discussing this with @lh, we think it is a good test to see if Mono resets when your just charge with an USB cable. Could you try to connect your Mono to a USB charger, instead of a computer, and see if it resets?

    @dave what kind of OS do you use? And can you do the same charge test?

    This will tell us if the issue is related to the USB iteration or the charging circuit.



  • @stoffera said in Just unboxed Mono, just keeps restarting over and over again?:

    Hi @malaire, that is strange. After discussing this with @lh, we think it is a good test to see if Mono resets when your just charge with an USB cable. Could you try to connect your Mono to a USB charger, instead of a computer, and see if it resets?

    @dave what kind of OS do you use? And can you do the same charge test?

    This will tell us if the issue is related to the USB iteration or the charging circuit.

    While charging I'm not getting any resets.

    I don't know much about debugging devices, but there seems to be at least three problems here:

    1. reset every 10 seconds
    2. why is Mono getting new /dev/ttyACM## device after every reset
    3. reset more infrequently (I've seen around 3 to 9 minutes intervals)

    My best guess for first is some kind of signal send by cdc_acm to Mono every 10 seconds which changes DTR, since this stops after Mono doesn't get /dev/ttyACM## device anymore, and also because more infrequent resets don't have "cdc_acm 3-1:1.0: failed to set dtr/rts" message associated with them.

    Second perhaps could be caused by incorrect shutdown of the connection by Mono, so linux can't free it for reuse?

    No ideas for third.



  • Debian uses a service called modemmanager service to manage any attached old fashion dial-up modems on the serial port. This service causes the problem, and it needs to be deactivated or uninstalled.

    If you want to, you can:

    $ apt-get remove modemmanager
    

    There are properly also ways of removing it as a daemon.

    Why?

    The modemmanager takes any present serial port and sends or waits for any AT commands. When these do not arrive, it de-asserts the DTR signal to signal communication has ended.

    This behaviour is fine for modem, or break all other serial devices that acts on DTR signals, such as Arduino and Mono.

    Pulling DTR low (de-assert) triggers a reset in te Arduino protocol, that Mono is imitating.



  • @stoffera said in Just unboxed Mono, just keeps restarting over and over again?:

    $ apt-get remove modemmanager
    

    Thanks! This fixed at least the first two issues (reset every 10 seconds and getting new /dev/ttyACM## devices, Mono is now using only /dev/ttyACM0).

    The example clock-app just run for 602 seconds and then reset. Is there a 10-minute timer somewhere?

    EDIT: yes, there is 10-minute timer, so at least Clock-app is now working perfectly (ref)



  • @malaire said in Just unboxed Mono, just keeps restarting over and over again?:

    The example clock-app just run for 602 seconds and then reset. Is there a 10-minute timer somewhere?
    EDIT: yes, there is 10-minute timer, so at least Clock-app is now working perfectly (ref)

    Yes, this is intended to not drain the battery. In the framework it still is opt-in though. I recommend trying the newer apps like: https://kiosk.openmono.com/app/com-openmono-alarmclock


Log in to reply