Cannot open file for writing - Teensy 2.0

Need help? Ask here and someone will help
Post Reply
Bebeuz
Posts: 4
Joined: Wed Jan 18, 2017 4:56 pm

Cannot open file for writing - Teensy 2.0

Post by Bebeuz »

Hi,
I have been trying to make a DIY USB adapter using a Teesy 2.0 and a serial adapter.

I managed to load the firmware firmwares-5.8\EMU360\atmega32u4.hex on it but for some reason when I plug it all together and click Start from the Gimx Launcher, it show multiple popups saying "Cannot open file for writing".

The USB cables and the serial adapter are good, I used them for other Arduino projects.
I double checked that RX was connected to TX in both sides, I even tried invert them, still the same error.

I tried on an Xbox 360 and a Windows 10 PC.

When I plug the Teensy to my PC, I don't hear the sound it should make when a USB device is plugged. Though, I do when I press the Program Mode button.


Here's a log file

Code: Select all

global option -l with value `log.txt'
global option -c with value `test.xml'
controller #1: option -p with value `COM3'
now reading arguments for controller #2
status flag is set
subpos flag is set
force_updates flag is set
GIMX 6.3 x86_64
Windows 10 (or later) x64
Kernel version: 10.0 (14393)
windows/async.c:344 async_read_timeout: ReadFile failed: timeout expired.
can't read packet header
gimx.c:208 SDL_main: no adapter detected

Here is a screen shot, on the serial adapter, RX is the green cable and TX is the blue cable. Black is ground
Image


Thank you for you help
psi3000
Posts: 27
Joined: Sat Jan 14, 2017 7:24 pm

Re: Cannot open file for writing - Teensy 2.0

Post by psi3000 »

I found that I had to reprogram the Teensy if I continually got this error. Also do you have our xbox controller (original and made by microsoft) plugged in and recognized by your PC?
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Cannot open file for writing - Teensy 2.0

Post by Matlo »

Is the serial adapter based on the FT232RL chip? Is the adapter 5V tolerant?
Did you solder the pins on the Teensy board?
GIMX creator
Bebeuz
Posts: 4
Joined: Wed Jan 18, 2017 4:56 pm

Re: Cannot open file for writing - Teensy 2.0

Post by Bebeuz »

Matlo wrote: Wed Jan 18, 2017 9:58 pm Is the serial adapter based on the FT232RL chip? Is the adapter 5V tolerant?
Did you solder the pins on the Teensy board?
Here's the adapter I bought, it is based on the FT232RL chip :
https://fr.aliexpress.com/item/20-PCS-B ... 0.0.tg4AHG

I don't know what 5V tolerant means but I already used this adapter for programming an ESP8266 with my PC.

The pins aren't soldered, but I made sure there is a contact between the board and the wires.





psi3000 wrote: Wed Jan 18, 2017 9:47 pm I found that I had to reprogram the Teensy if I continually got this error. Also do you have our xbox controller (original and made by microsoft) plugged in and recognized by your PC?
I reprogram the Teensy several times just to make sure it was working.
I do not have the original controller plugged, this is supposed to be the next step isn't it ? Still my PC should be able to communicate with the Teensy even without an original controller right ?
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Cannot open file for writing - Teensy 2.0

Post by Matlo »

Bebeuz wrote: Thu Jan 19, 2017 9:21 amThe pins aren't soldered, but I made sure there is a contact between the board and the wires.
Loose contact is not acceptable. Solder the pins.
GIMX creator
Bebeuz
Posts: 4
Joined: Wed Jan 18, 2017 4:56 pm

Re: Cannot open file for writing - Teensy 2.0

Post by Bebeuz »

Matlo wrote: Thu Jan 19, 2017 9:32 am
Bebeuz wrote: Thu Jan 19, 2017 9:21 amThe pins aren't soldered, but I made sure there is a contact between the board and the wires.
Loose contact is not acceptable. Solder the pins.

I soldered it and tried on an Xbox One with firmwares-5.8\EMUXONE\atmega32u4.hex, it still shows the same error message.
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Cannot open file for writing - Teensy 2.0

Post by Matlo »

Make sure to use the EMU360 firmware with the Xbox 360.
Did you power on the Xbox 360?
GIMX creator
Bebeuz
Posts: 4
Joined: Wed Jan 18, 2017 4:56 pm

Re: Cannot open file for writing - Teensy 2.0

Post by Bebeuz »

Matlo wrote: Thu Jan 19, 2017 8:10 pm Make sure to use the EMU360 firmware with the Xbox 360.
Did you power on the Xbox 360?
I used the firmwares-5.8\EMUXONE\atmega32u4.hex today because I tried on my friend's Xbox One which was indeed powered on. I always get the same error...

I tried to plug my Teensy before the serial adapter and I saw that the serial adapter LED was on, even though it was not yet plugged on the PC, which means the connection between the Teensy 2.0 and the serial adapter was ok I guess
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Cannot open file for writing - Teensy 2.0

Post by Matlo »

If you have a multimeter, check that the VCCIO pin of the FT232RL is +5V.
Page 7: http://www.ftdichip.com/Support/Documen ... FT232R.pdf
If it's only 3.3V, this means it's not 5V-tolerant, and using it without level conversion may result in broken hardware.

Also check this section of the FAQ:
https://gimx.fr/wiki/index.php?title=FA ... an_I_do.3F
GIMX creator
Post Reply