Hi,

About the RS485 support on the BBB, you have to modify the driver omap
serial and control the gpio that you want. But if you want a quick
solution, i already made a patch for that :)

You just need to :

git clone git://github.com/RobertCNelson/linux-dev.git
cd linux-dev/
git checkout origin/am33x-v3.8 -b tmp

in the linux-dev folder, you have the KERNEL folder. You just need to put
the file in the patches/omap folder and edit the patch.sh :
:

 ${git} "${DIR}/patches/omap/000X-omap-rs485-support.patch"


in the linux-dev folder :
cp system.sh.sample system.sh
edit the file system.sh:

be sure that you have :
 ##For TI: OMAP3/4/AM35xx
ZRELADDR=0x80008000 <== uncomment !

the correct path to your sdcard :
MMC=/dev/sdc



to build the kernel , you just need to use this command : ./build_kernel.sh

to install the new kernel to your sdcard : ./tools/install_kernel.sh




On Tue, Jan 21, 2014 at 10:52 PM, Alexander Hiam <hiamalexan...@gmail.com>wrote:

> Yeah I noticed that. I was hoping to go the ioctl route because I'm
> working on a cape that gives the option of RS232 or RS485 on UART4, so the
> runtime switching would be great.
>
> Hopefully I'm just doing something stupid, but I can't get it to work
> through ioctl. I've tried in both C and Python on an Angstrom image with
> 3.8, this testing image, and an old Angstrom with 3.2 on the original BB.
> The tests I'm trying are here:
> https://gist.github.com/alexanderhiam/8548894
>
> On all three bones the C ioctl() call raise errno 25. On the two with 3.8
> the Python ioctl() call raises 'IOError: [Errno 25] Inappropriate ioctl for
> device' and on the bone with 3.2 it raises 'IOError: [Errno 22] Invalid
> argument'.
>
> I was under the impression that you had to enable the RS485 ioctl settings
> when building the kernel, but I can't remember where I got that idea and I
> haven't actually tried it yet :p
>
> Perhaps I should start a new thread for this one...
>
> -Alex
>
>
> On Tuesday, January 21, 2014 3:49:38 PM UTC-5, RobertCNelson wrote:
>
>> On Tue, Jan 21, 2014 at 2:33 PM, Robert Nelson <robert...@gmail.com>
>> wrote:
>> > On Tue, Jan 21, 2014 at 2:14 PM, Alexander Hiam <hiamal...@gmail.com>
>> wrote:
>> >> Thanks Robert, I just booted it for the first time and so far so good.
>> I see
>> >> that there's still no ioctl for RS485 mode on the UARTs though. Is
>> there a
>> >> reason RS485 support isn't enabled on the BB kernel builds?
>> >
>> > There is no module for "rs485" you need to call the omap-serial driver
>> > with the proper ioctls
>> >
>> > https://git.kernel.org/cgit/linux/kernel/git/stable/linux-
>> stable.git/tree/Documentation/serial/serial-rs485.txt?id=
>> refs/tags/v3.8.13
>>
>> Looks like you can enable it on boot time too..
>> https://git.kernel.org/cgit/linux/kernel/git/stable/linux-
>> stable.git/tree/Documentation/devicetree/bindings/serial/
>> rs485.txt?id=refs/tags/v3.8.13#n28
>>
>> Regards,
>>
>> --
>> Robert Nelson
>> http://www.rcn-ee.com/
>>
>  --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Attachment: 000X-omap-rs485-support.patch
Description: Binary data

Reply via email to