+SenorRossie Posted May 16, 2014 Share Posted May 16, 2014 After hours of frustration, I finally have a Raspberry Pi hooked up to my Atari 130XE and 1050... All I need now is a way to dump my disks to the NFS share I mounted on the Pi for that purpose. For those that are struggling with hooking up their own hardware, here's how I did it... Raspberry Pi First of all I downloaded a minimal debian distro for the Pi (with hardfloat support) from http://www.linuxsystems.it/raspbian-wheezy-armhf-raspberry-pi-minimal-image/ and created an SD card to boot the Pi from. I choose a minimal distribution because I don't need a GUI and like to keep the performance of the Pi as optimal as possible. Once the Pi booted I ssh'd to the box (keyboard didn't work) and updated the OS apt-get update && apt-get upgrade Followed the steps to reconfigure the OS to fit my timezone, keyboard layout and locale dpkg-reconfigure tzdata dpkg-reconfigure console-data dpkg-reconfigure locales OPTIONAL: Disable IPv6 printf "blacklist ipv6\n" > /etc/modprobe.d/ipv6-blacklist.conf printf "net.ipv6.conf.all.disable_ipv6 = 1\nnet.ipv6.conf.default.disable_ipv6 = 1\n" > /etc/sysctl.d/00-disable-ipv6.conf Time to use the full SDcard: fdisk /dev/mmcblk0 Press the following keys: d 3 d 2 n p 2 ENTER ENTER w Modify the /etc/fstab file and remove the line with the swap partition (/dev/mmcblk0p3) vi /etc/fstab # And reboot when done reboot When the Pi is up again, resize the 'root' partition: resize2fs /dev/mmcblk0p2 Dual-USB Driver The package I received included a note with an URL where to obtain the driver software for the SIO2PC/10502PC Dual-USB device, well, it turns out it is already available in the kernel. The following steps enable the kernel driver for the SIO2PC/10502PC Dual-USB device too: # Find vendor(0403) & product(83b0) via 'lsusb' command cat << EOF > /lib/udev/sio2usb #!/bin/sh /sbin/modprobe ftdi_sio && echo 0403 83b0 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id EOF cat << EOF >/etc/udev/rules.d/90-sio2usb-driver.rules ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="83b0", GROUP="users", MODE="0666", RUN+="/lib/udev/sio2usb" EOF Restart the Raspberry Pi, or restart udev (/etc/init.d/udev restart)... whichever you prefer, but don't forget you may have to reinsert the USB cable for the SIO2PC to get udev to recognize the device. You can check if it does by running: dmesg | tail which will output something like: [11240.431089] usb 1-1.2: Product: SIO2PC/10502PC Dual-USB [11240.461864] usb 1-1.2: Manufacturer: Atari8Warez [11240.468256] usb 1-1.2: SerialNumber: A8XNT1LQ [11240.499129] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected [11240.532204] usb 1-1.2: Detected FT-X [11240.537650] usb 1-1.2: Number of endpoints 2 [11240.555084] usb 1-1.2: Endpoint 1 MaxPacketSize 64 [11240.561725] usb 1-1.2: Endpoint 2 MaxPacketSize 64 [11240.591920] usb 1-1.2: Setting MaxPacketSize 64 [11240.603534] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0 To use the Pi as a Dx on your atari, you need something like SIO2BSD, which you can find attached to http://atariage.com/forums/topic/209010-sio2pi-raspberry-pi-as-a-floppy/ <- this post. You can use the SIO2BSD utility on the command line to make D1 available (Atmas II) to your atari like so: sio2bsd -b 2 -s /dev/ttyUSB0 -f /path/to/my/atrs/Utility\ U008b.ATR Or if you have your 1050 connected and set to D1: you can make D2: available like so: sio2bsd -b 2 -s /dev/ttyUSB0 -f - -f BlankDisk.ATR Hope this saves someone from being as frustrated as I was 8 Quote Link to comment Share on other sites More sharing options...
Dripfree Posted May 17, 2014 Share Posted May 17, 2014 Thanks for the post. I've been a little pi crazy lately and this is a project that I have been meaning to tackle. I've been sitting on a level shifter for a little while now but I've had to many irons in the fire to get around to this one. Hope to get around to it soon and this is going to be very helpful. Quote Link to comment Share on other sites More sharing options...
atari8warez Posted May 17, 2014 Share Posted May 17, 2014 (edited) Dual-USB Driver The package I received included a note with an URL where to obtain the driver software for the SIO2PC/10502PC Dual-USB device, well, it turns out it is already available in the kernel. The following steps enable the kernel driver for the SIO2PC/10502PC Dual-USB device too: Dennis, what do you exactly mean by custom PID: 83B0 is already available in the kernel? The latest driver files i downloaded from FTDI did not include my device ID and I had to customize ftdi_sio.c and ftdi_sio.h files myself, so I am little surprised with your comment. I am not really familiar with unix/linux but what I think happened was that when you querried VID/PID with the lsusb command, the system querried the device EEPROM which happens to contain manufacturer id, device name, VID and PID. And again with my very limited knowledge of linux and by looking at your procedure above I think the device description obtained from the EEPROM was added to the device list in the driver file(s) and that made the driver load and recognize the hardware. Obviously I was not aware of such functionality in linux so I made sure updated driver files are available for download from my website. In any case it is nice to know that there is a way to make it work even without downloading customized driver files, although the latter would probably be faster and less involved for the end user to implement. Thank you for taking the time to explain your whole procedure in great detail. Edited May 17, 2014 by atari8warez Quote Link to comment Share on other sites More sharing options...
+SenorRossie Posted May 17, 2014 Author Share Posted May 17, 2014 Dual-USB Driver The package I received included a note with an URL where to obtain the driver software for the SIO2PC/10502PC Dual-USB device, well, it turns out it is already available in the kernel. The following steps enable the kernel driver for the SIO2PC/10502PC Dual-USB device too: Dennis, what do you exactly mean by custom PID: 83B0 is already available in the kernel? The latest driver files i downloaded from FTDI did not include my device ID and I had to customize ftdi_sio.c and ftdi_sio.h files myself, so I am little surprised with your comment. What I meant by that is that the driver for the FTDI_SIO is already in the kernel and can be forced to react on a specific ('custom') Vendor and/or Product ID. It was a bit of a surprise for me too to get it to work this way and that's why I decided to share the knowledge. I am not really familiar with unix/linux but what I think happened was that when you querried VID/PID with the lsusb command, the system querried the device EEPROM which happens to contain manufacturer id, device name, VID and PID. And again with my very limited knowledge of linux and by looking at your procedure above I think the device description obtained from the EEPROM was added to the device list in the driver file(s) and that made the driver load and recognize the hardware. Obviously I was not aware of such functionality in linux so I made sure updated driver files are available for download from my website. In any case it is nice to know that there is a way to make it work even without downloading customized driver files, although the latter would probably be faster and less involved for the end user to implement. What happened is that I got frustrated with trying to compile the driver on the Pi, so I gave up that path and started looking for others that had issues with the ftdi_sio driver (which is the driver you provide). As it turns out, there used to be a way to tell this driver to forcibly load when it encounters a specific VENDOR and/or PRODUCT device by telling it the VID and PID when modprobing. modprobe ftdi_sio vendor=0403 product=83b0 Well... that didn't work on the kernel/driver I had on the Pi. So what if there is another way to tell the driver to react on a specific VID and PID? By looking at other posts on FTDI drivers I finally found the described method to force the driver to load when encountering the VID and PID of the SIO2PC/10502PC Dual-USB: lsusb Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. Bus 001 Device 005: ID 0403:83b0 Future Technology Devices International, Ltd And this is what I also saw when inserting the device: [ 4192.041110] usb 1-1.2: new full-speed USB device number 5 using dwc_otg [ 4192.195616] usb 1-1.2: New USB device found, idVendor=0403, idProduct=83b0 [ 4192.203594] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 4192.211946] usb 1-1.2: Product: SIO2PC/10502PC Dual-USB [ 4192.217295] usb 1-1.2: Manufacturer: Atari8Warez [ 4192.222993] usb 1-1.2: SerialNumber: A8XNT1LQ Thank you for taking the time to explain your whole procedure in great detail. I spared you the details that led to my frustration in the first place (which involved finding the correct kernel for my Pi and hitting a wall when trying to compile the driver on that same Pi) as I said, I hope this will save others from that same frustration. By the way, thanks for a great device! 1 Quote Link to comment Share on other sites More sharing options...
+SenorRossie Posted May 17, 2014 Author Share Posted May 17, 2014 Thanks for the post. I've been a little pi crazy lately and this is a project that I have been meaning to tackle. I've been sitting on a level shifter for a little while now but I've had to many irons in the fire to get around to this one. Hope to get around to it soon and this is going to be very helpful. You're welcome, but this won't help in your case (perhaps apart from the sio2bsd stuff and the installation of the Pi) I think. I guess you want to hook up the SIO devices directly to the GPIO ports of the Pi? That involves other obstacles, like modifying /etc/inittab to free up your serial port I originally planned on taking that road, but Sparkfun is not that quick with international transport - if you don't want to spend more on shipping than on your components - so I'm still waiting for the components. Once they're in and I get around building it, I will probably post the steps I took again. Quote Link to comment Share on other sites More sharing options...
+SenorRossie Posted May 18, 2014 Author Share Posted May 18, 2014 (edited) As I can't edit the original post, I'll add the errata in the thread udev needs to have the executable bit set on the scripts it called. Somehow I overlooked that part (as I manually loaded and unloaded the module during testing). Sio2BSD only accepts one -f flag, hence the given examples don't work The package I received included a note with an URL where to obtain the driver software for the SIO2PC/10502PC Dual-USB device, well, it turns out it is already available in the kernel. The following steps enable the kernel driver for the SIO2PC/10502PC Dual-USB device too: # Find vendor(0403) & product(83b0) via 'lsusb' command cat << EOF > /lib/udev/sio2usb #!/bin/sh /sbin/modprobe ftdi_sio && echo 0403 83b0 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id EOF # ERRATA: set the executable bit of the script: chmod 755 /lib/udev/sio2usb # NOTE: I guess you can also set it to 750 or even 700, but as the rest of the scripts are set with the same permissions, I kept it like this cat << EOF >/etc/udev/rules.d/90-sio2usb-driver.rules ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="83b0", GROUP="users", MODE="0666", RUN+="/lib/udev/sio2usb" EOF To use the Pi as a Dx on your atari, you need something like SIO2BSD, which you can find attached to http://atariage.com/forums/topic/209010-sio2pi-raspberry-pi-as-a-floppy/ <- this post. You can use the SIO2BSD utility on the command line to make D1 available (Atmas II) to your atari like so: sio2bsd -b 2 -s /dev/ttyUSB0 -f /path/to/my/atrs/Utility\ U008b.ATR Or if you have your 1050 connected and set to D1: you can make D2: available like so: sio2bsd -b 2 -s /dev/ttyUSB0 -f - BlankDisk.ATR Note I tried to use a High Speed connection (-b 2) when you start out with the sio2usb device, stay on the safe side and skip this flag. Edited May 18, 2014 by SenorRossie Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.