Author Topic: Raspberry Pi Generic Serial Device  (Read 1155 times)

SBCC

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Raspberry Pi Generic Serial Device
« on: June 11, 2014, 02:29:34 am »
Hello, has Generic Serial Device been built for the Raspberry MD? Doesn't seem to be loading it when I add a device. By the way great job on this!!! Starts up and runs fine. Video and sound. Thanks to everyone with that effort!

SBCC

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Raspberry Pi Generic Serial Device
« Reply #1 on: June 13, 2014, 09:46:45 pm »
Sorry I acted to soon. It loaded and works fine. Serial ports aren't being listed correctly. Shows as platform/bcm2708_usb+1.3 but that gives me;
Code: [Select]
Failed Opening serial port: platform/bcm2708_usb+1.3.If I change it in the database to /dev/ttyUSB0 works fine. I know I looked at this a while back and I believe Radu fixed it. I may dig into it more.

Thanks again!

phenigma

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1026
    • View Profile
Re: Raspberry Pi Generic Serial Device
« Reply #2 on: June 28, 2014, 06:41:49 am »
Hey, sorry for the delay, I'm really busy.  I *though* gsd was built ok for the rpi.  If you could detail some of your specifics in a trac ticket with me as the owner I will have a look.   Thanks for testing btw!  I really appreciate it.

J.

SBCC

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Raspberry Pi Generic Serial Device
« Reply #3 on: September 17, 2014, 11:09:14 pm »
Hi Jason

Thanks for getting back to me!

It is built. The problem I'm having is with PlutoUtils/LinuxSerialUSB. I keep coming up with
Code: [Select]
TranslateSerialUSB platform/bcm2708_usb+1.2 isn't serial usb <0xb44ff460>
That would mean that
Code: [Select]
if( sInput.size()<6 || ( sInput.substr(0,3)!="pci" && sInput.substr(0,8) != "platform" ) )
{
LoggerWrapper::GetInstance()->Write(LV_STATUS,"TranslateSerialUSB %s isn't serial usb",sInput.c_str());
return sInput;
}

Is not working as it should and it looks like it should so maybe it is old? I tried to setup a build environment again but lost your instructions and forgot how. I think I might be able to build it on the Pi but that could be slow. Do you have those instructions?

Thanks

Jim

SBCC

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Raspberry Pi Generic Serial Device
« Reply #4 on: September 18, 2014, 03:00:38 pm »
Hi Jason

I just noticed you made that change to LinuxSerialUSB.cpp 3 weeks ago and my installation is older than that. I will upgrade and I'm sure that it will work. Thanks for your time and effort!

Jim

phenigma

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1026
    • View Profile
Re: Raspberry Pi Generic Serial Device
« Reply #5 on: September 18, 2014, 06:17:52 pm »
Hey!  Yes, I tested GSD a few weeks ago and found that little issue finally.  If your installation is that old you are probably pointing to the old repository and likely will not see any updates.  I *highly* recommend that you re-visit the wiki (http://wiki.linuxmce.org/index.php/RaspberryPi) and grab the new sd card contents, update your core, build a new diskless image for raspbian and hit the 'Rebuild' button in webadmin for that MD.  This will give you all the latest, there have been a lot of changes/improvements over the last 2 months.

J.

PS.  thanks for testing!

SBCC

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Raspberry Pi Generic Serial Device
« Reply #6 on: September 24, 2014, 10:29:42 pm »
Hi J

There seems to be a problem. I downloaded the latest SDcard and deb file. Installed the deb and sdcard contents, ran Diskless_CreateTBZ.sh, rebuilt the image for the MD through the web admin, plugged in the RPI and when it gets to "Diskless_InstallKernel.sh" it reboots immediately... then it gets to "Diskless_InstallKernel.sh" and reboots and just repeats this. I tried this with a new RPI and I get the same results. One thing I noticed was the kernel link is bad in the tarball and that Diskless_CreateTBZ.sh has changed. I copied the old Diskless_CreateTBZ.sh over and am now looking to see what happens with that. I am still poking around to see what went wrong but thought I'd let you know and to see if you had any thoughts. Thanks again for all your effort here.

Jim

phenigma

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1026
    • View Profile
Re: Raspberry Pi Generic Serial Device
« Reply #7 on: September 25, 2014, 06:15:48 pm »
Diskless Create has changed, a lot has changed.  Packages are not in the same location they used to be and most packages have been updated/upgraded.  I will test this immediately and get back to you.  It looks like your 'rebuild' did not complete properly or you would not be seeing the diskless setup aspects during boot.

J.

phenigma

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1026
    • View Profile
Re: Raspberry Pi Generic Serial Device
« Reply #8 on: September 25, 2014, 07:19:09 pm »
Ok, I see what I did.  You are correct, I created a bad softlink to the kernel.  Do this on your core:

Code: [Select]
cd /usr/pluto/diskless/XX/boot
ln -sf kernel.img vmlinuz-3.6-trunk-rpi
cd /usr/pluto/bin
./Diskless_Setup.sh

where XX is the device # of your MD.  That should fix you up for now and I'll get a new Diskless_CreateTBZ.sh out with a fix.

J.

SBCC

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Raspberry Pi Generic Serial Device
« Reply #9 on: September 26, 2014, 03:01:06 pm »
Hi

Ok I will do that this morning and let you know. Thanks again!

phenigma

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1026
    • View Profile
Re: Raspberry Pi Generic Serial Device
« Reply #10 on: September 26, 2014, 03:43:46 pm »
You're very welcome.  Sorry for the issues with the diskless image, I am trying to keep things fairly stable. 

BTW, my testing of the rpi for serial based GSD devices has worked, but it serial GSD consumes significant resources on the pi CPU and USB bus.

J.

SBCC

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Raspberry Pi Generic Serial Device
« Reply #11 on: September 27, 2014, 03:18:39 pm »
Creating the link works perfect! The updated serial works great as well.

The GSD devices I use are small homemade stuff. The RPI is perfect to use in remote locations. So far I use one RPI with one device and they hum along fine.

Thanks again for your efforts!

phenigma

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1026
    • View Profile
Re: Raspberry Pi Generic Serial Device
« Reply #12 on: September 30, 2014, 12:17:17 am »
I agree that the rpi is perfect for things like this!  Don't forget to disable media (orbiter) startup by setting the AutostartMedia=0 option in /etc/pluto.conf, assuming you aren't using media on them.  The GSD devices should still be started by Launch_Manager, and if you notice they don't please let me know and I'll make that work (but I think I tested that).

BTW, I'm interested in what sort of devices you are interfacing with!   :)

J.

SBCC

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Raspberry Pi Generic Serial Device
« Reply #13 on: September 30, 2014, 02:36:38 am »
Thanks for the info on stopping the media. You are correct I don'the use the orbiter. The GSD device starts up fine. The only issue was I needed to install a new temp child device to get the RPI to download the needed software to run the devices previously created prior to the update. Then I deleted the temp device. Not a big issue.

I have a couple of relay controllers that I made that control irrigation out at the gardens and green house. They are built around MSP430G2553 micro controller. I have built a new version that has inputs that I am using out at the end of my driveway, which is 700' long, to monitor vehicle and pedestrian sensors. I wanted the ability to reset the power to the USB port if the device goes stupid, mostly due to a switch debounce problem. Having the serial port nicely mapped to the usb port is perfect to make a shell script that lmce can call if all else fails. I am now building an audio switcher. This will have 12 outputs that can choose up to 16 inputs. This way I can use any of my inputs to play throughout the whole house. This is almost done. I will need to work on the device template after the build is complete.

All these devices are cheap. If you or anyone is interested I can post the schematics and/or the pc board layouts. I do have some extra boards as well.

Jim

phenigma

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1026
    • View Profile
Re: Raspberry Pi Generic Serial Device
« Reply #14 on: September 30, 2014, 06:13:57 pm »
Neato!  Sounds like great fun!

J.