Re: [beagleboard] Re: Real Time experience on Beagle?

2019-10-15 Thread Adrian Godwin
Can you use bela (https://bela.io/about) ?

On Tue, Oct 15, 2019 at 4:28 PM walter harms  wrote:

>
>
> Am 15.10.2019 16:06, schrieb shabaz:
> > Hi Drew,
> >
> > I hope you're well!
> >
> > I recently experimented briefly with both, here' s the steps I used to
> > install Xenomai (Rob Nelson helped me find the pre-built kernel, the
> link
> > to them is below).
> > Not all Xenomai APIs are enabled in the kernel. Anyway, I did get
> reduced
> > jitter when using one of the API sets called Alchemy, which I guess is
> > probably the easiest to code with. In a nutshell you can use the API to
> > create a task thread, and do your low-latency stuff there.
> >
> > For my experiment, I used this content in my makefile:
> >
> > XENO_CONFIG := /usr/xenomai/bin/xeno-config
> >
> > CFLAGS := $(shell $(XENO_CONFIG)   --posix --alchemy --cflags)
> > LDFLAGS := $(shell $(XENO_CONFIG)  --posix --alchemy --ldflags)
> >
>
> You can simplify your life just use:
>
> atest:
>
> clean:
>  rm -f atest
>
>
> the %: %.c stuff is a build in rule CC should be a default
> to you local compiler.
>
> jm2c,
>
> re,
>  wh
>
> > CC := gcc
> > EXECUTABLE := atest
> >
> > all: $(EXECUTABLE)
> >
> > %: %.c
> > $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
> >
> > clean:
> > rm -f $(EXECUTABLE)
> >
>
>
> > and, code needs to look like this:
> >
> > #include 
> > #include 
> > #include 
> > #include 
> > #include 
> >
> > RT_TASK hello_task;
> >
> > // function to be executed by task
> > // this is your stuff for which you want low jitter
> > void helloWorld(void *arg)
> > {
> >   RT_TASK_INFO curtaskinfo;
> >   printf("Hello World!\n");
> >
> >   // inquire current task
> >   rt_task_inquire(NULL,);
> >
> >   // print task name
> >   printf("Task name : %s \n", curtaskinfo.name);
> >
> >   while(1)
> >   {
> > // do your stuff here in a forever loop if you like
> >
> > // use this sleep command if you need to use any sleep. This sleep
> has
> > low jitter:
> > rt_task_sleep(5);
> >   }
> >
> > }
> >
> > int main(int argc, char* argv[])
> > {
> >   char  str[10];
> >
> >   printf("start task\n");
> >   sprintf(str,"hello");
> >
> >   /* Create task
> >* Arguments: ,
> >*name,
> >*stack size (0=default),
> >*priority,
> >*mode (FPU, start suspended, ...)
> >*/
> >   rt_task_create(_task, str, 0, 99, 0);
> >
> >   /*  Start task
> >* Arguments: ,
> >*task function,
> >*function argument
> >*/
> >   rt_task_start(_task, , 0);
> >   while(1)
> >   {
> > sleep(10);
> >   }
> > }
> >
> > To test latency I ran this:
> > cyclictest -n -p 90 -i 1000
> > and the result was:
> > T: 0 ( 2914) P:90 I:1000 C:  31719 Min:  6 Act:   19 Avg:   18 Max:
>
> >  51
> > which was about ten times lower for the Max value, compared to PREEMPT
> RT.
> > And it was far lower than x86 Linux running a standard kernel with
> Ubuntu.
> > The x86 Linux was a virtual machine on ESXi on an Intel NUC.
> > It was all over the place with that - especially if I tried opening
> another
> > terminal to do something. With Xenomai, it was stable.
> > In summary, provided one is willing to code for Xenomai, then the jitter
> > difference is large - still no-where as good as PRU or a microcontroller
> of
> > course, but fantastic for Linux.
> > Also, it seems that the pre-built Machinekit images use PREMPT RT, not
> > Xenomai : ( I've no idea if Machinekit is coded to support Xenomai, I've
> > not really investigated too far currently.
> >
> > Installing pre-built Xenomi kernel:
> >
> >
> > https://github.com/beagleboard/linux/releases
> >
> >
> >
> > cd /opt/scripts/tools/
> >
> > git pull
> >
> > As root user:
> >
> > ./update_kernel.sh --ti-xenomai-channel --lts-4_14
> >
> >
> >
> > as non-root user:
> >
> > cd development
> >
> > mkdir xenomi
> >
> > cd xenomi
> >
> > wget
> >
> https://xenomai.org/downloads/xenomai/stable/latest/xenomai-3.0.9.tar.bz2
> >
> > bunzip2 xenomai-3.0.9.tar.bz2
> >
> > tar xvf xenomai-3.0.9.tar
> >
> > cd xenomai-3.0.9
> >
> > ./configure --enable-smp CFLAGS="-march=armv7-a -mfpu=vfp3"
> > LDFLAGS="-march=armv7-a -mfpu=vfp3"
> >
> > make
> >
> > As root user:
> >
> > make install
> >
> >
> >
> > Testing it:
> >
> > /usr/xenomai/bin/xeno-test
> >
> >
> >
> >
> >
> >
> > Development/xtest
> >
> > make -f Mafefile-a
> >
> > as root user:
> >
> > export LD_LIBRARY_PATH=/usr/lib:/usr/xenomai/lib
> >
> > ./atest
> >
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/5DA5E576.8090602%40bfs.de.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this 

Re: [beagleboard] Re: ENC28J60 Click on PocketBeagle

2019-08-06 Thread Adrian Godwin
Here is a link to Microchip's preprogrammed MAC address eeproms

On Tue, Aug 6, 2019 at 3:23 AM Graham  wrote:

> The programming of the MAC address in the EEPROM is not an issue, once you
> are set up for it.
> There are some other Ethernet connection options that you can turn on/off
> at the same time.
> But the program remembers what you want, and even auto-increments the MAC
> address for you if you are programming in sequence within a block
> assignment.
> The program also does a functional exercise of all kinds of Ethernet
> options, anything you have enabled, so it also constitutes a reasonable
> final test for Ethernet.
> Only takes 20 seconds or so.
> I think you will need to pin out the USB-2 (port 1) lines, so that you can
> get at them with a USB cable from the programming PC.
> If the PocketBeagle plugs into your carrier board, you could build a dummy
> USB connection board that temporarily replaced the PocketBeagle for
> Ethernet programming.
> --- Graham
>
> ==
>
> On Mon, Aug 5, 2019 at 8:48 PM evilwulfie  wrote:
>
>> assemble on 2 sides is no issue
>> populate one side, reflow solder, populate the other side, reflow solder
>> the surface tension will keep the parts on the other side IF the solder
>> even melts
>>
>> On 8/5/2019 5:57 PM, Steven Keller wrote:
>>
>>
>> Graham,
>> Thanks so much!  That should be enough to get me started.  I wanted to
>> avoid parts on the bottom of the board as it makes assembly more
>> difficult.  Board size isn't too much of a problem.  The extra EEPROM
>> programming step is a bit of pain but not impossible.
>>
>> Thanks again!
>>
>> On Monday, August 5, 2019 at 6:30:13 PM UTC-5, Graham wrote:
>>>
>>> Steven:
>>> The primary reason for parts on both sides of the boards is just space
>>> constraint.
>>> With an extra half square inch of space, everything could be on one side.
>>> I do like to keep the transient suppressor as close to the RJ-45
>>> connector as possible.
>>> You would still need a four layer board to do the power distribution
>>> cleanly.
>>>
>>> In this design, the MAC address can not be assigned by the Linux driver.
>>> It takes a Windows app, from the Microchip website, that needs to access
>>> the LAN9500A
>>> chip from both sides to program it. That is, it needs to access both the
>>> USB-2 connection to the
>>> LAN9500A, and have the Ethernet connection from the LAN9500A on the same
>>> sub-net as the PC running the programming app. Even though the MAC
>>> address is
>>> held in an EEPROM, I don't think there would be any way for the user to
>>> change it
>>> without reproducing the programming connections.
>>>
>>> I am not aware that Microchip sells preprogrammed EEPROMS with the MAC
>>> addresses,
>>> normally you get blank EEPROMS and you supply and program the MAC
>>> address.
>>> Although for extra money, you can get either Microchip or some of the
>>> distributors to program
>>> memory parts.
>>>
>>> I have heard that Microchip will sell a small number of MAC addresses as
>>> a courtesy,
>>> but I have not done that. The normal process is to buy a block of MAC
>>> assignments
>>> from the IEEE which is the global coordinator.  If you buy a large
>>> enough block, you get
>>> your own OUI.
>>>
>>> --- Graham
>>>
>>> ==
>>>
>>> On Mon, Aug 5, 2019 at 3:21 PM Steven Keller 
>>> wrote:
>>>
 Graham,
 If you don't mind could you answer a few questions?
 You have parts on both sides of the board.  Is this primarily because
 of the size constraint or to keep traces short as possible?
 Is it possible for the driver software to load the MAC address of the
 Beagle Bone into the LAN9500A?  It does not appear that the preprogrammed
 MAC address EEPROMs from Microchip work with these USB-to-Ethernet chips.

 --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beagleboard/86df597a-f542-4f96-b82e-35982fa3db38%40googlegroups.com
>> 
>> .
>>
>>
>> --
>> For more options, visit http://beagleboard.org/discuss
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "BeagleBoard" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/beagleboard/GGhpOK-i5-4/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> beagleboard+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beagleboard/72d488f5-2ac8-4b27-d111-ec66ad22dab6%40gmail.com
>> 

Re: [beagleboard] Re: ENC28J60 Click on PocketBeagle

2019-08-06 Thread Adrian Godwin
And again :)

https://www.microchip.com/design-centers/memory/serial-eeprom/mac-address-and-unique-id-eeproms

On Tue, Aug 6, 2019 at 1:49 PM Adrian Godwin  wrote:

> Here is a link to Microchip's preprogrammed MAC address eeproms
>
> On Tue, Aug 6, 2019 at 3:23 AM Graham  wrote:
>
>> The programming of the MAC address in the EEPROM is not an issue, once
>> you are set up for it.
>> There are some other Ethernet connection options that you can turn on/off
>> at the same time.
>> But the program remembers what you want, and even auto-increments the MAC
>> address for you if you are programming in sequence within a block
>> assignment.
>> The program also does a functional exercise of all kinds of Ethernet
>> options, anything you have enabled, so it also constitutes a reasonable
>> final test for Ethernet.
>> Only takes 20 seconds or so.
>> I think you will need to pin out the USB-2 (port 1) lines, so that you
>> can get at them with a USB cable from the programming PC.
>> If the PocketBeagle plugs into your carrier board, you could build a
>> dummy USB connection board that temporarily replaced the PocketBeagle for
>> Ethernet programming.
>> --- Graham
>>
>> ==
>>
>> On Mon, Aug 5, 2019 at 8:48 PM evilwulfie  wrote:
>>
>>> assemble on 2 sides is no issue
>>> populate one side, reflow solder, populate the other side, reflow solder
>>> the surface tension will keep the parts on the other side IF the solder
>>> even melts
>>>
>>> On 8/5/2019 5:57 PM, Steven Keller wrote:
>>>
>>>
>>> Graham,
>>> Thanks so much!  That should be enough to get me started.  I wanted to
>>> avoid parts on the bottom of the board as it makes assembly more
>>> difficult.  Board size isn't too much of a problem.  The extra EEPROM
>>> programming step is a bit of pain but not impossible.
>>>
>>> Thanks again!
>>>
>>> On Monday, August 5, 2019 at 6:30:13 PM UTC-5, Graham wrote:
>>>>
>>>> Steven:
>>>> The primary reason for parts on both sides of the boards is just space
>>>> constraint.
>>>> With an extra half square inch of space, everything could be on one
>>>> side.
>>>> I do like to keep the transient suppressor as close to the RJ-45
>>>> connector as possible.
>>>> You would still need a four layer board to do the power distribution
>>>> cleanly.
>>>>
>>>> In this design, the MAC address can not be assigned by the Linux driver.
>>>> It takes a Windows app, from the Microchip website, that needs to
>>>> access the LAN9500A
>>>> chip from both sides to program it. That is, it needs to access both
>>>> the USB-2 connection to the
>>>> LAN9500A, and have the Ethernet connection from the LAN9500A on the
>>>> same
>>>> sub-net as the PC running the programming app. Even though the MAC
>>>> address is
>>>> held in an EEPROM, I don't think there would be any way for the user to
>>>> change it
>>>> without reproducing the programming connections.
>>>>
>>>> I am not aware that Microchip sells preprogrammed EEPROMS with the MAC
>>>> addresses,
>>>> normally you get blank EEPROMS and you supply and program the MAC
>>>> address.
>>>> Although for extra money, you can get either Microchip or some of the
>>>> distributors to program
>>>> memory parts.
>>>>
>>>> I have heard that Microchip will sell a small number of MAC addresses
>>>> as a courtesy,
>>>> but I have not done that. The normal process is to buy a block of MAC
>>>> assignments
>>>> from the IEEE which is the global coordinator.  If you buy a large
>>>> enough block, you get
>>>> your own OUI.
>>>>
>>>> --- Graham
>>>>
>>>> ==
>>>>
>>>> On Mon, Aug 5, 2019 at 3:21 PM Steven Keller 
>>>> wrote:
>>>>
>>>>> Graham,
>>>>> If you don't mind could you answer a few questions?
>>>>> You have parts on both sides of the board.  Is this primarily because
>>>>> of the size constraint or to keep traces short as possible?
>>>>> Is it possible for the driver software to load the MAC address of the
>>>>> Beagle Bone into the LAN9500A?  It does not appear that the preprogrammed
>>>>> MAC address EEPROMs from Microchip work with these USB-to-Ethernet ch

Re: [beagleboard] How to correctly power down BeagleBoard-xM ?

2019-08-06 Thread Adrian Godwin
I usually use 'shutdown -h now'


On Tue, Aug 6, 2019 at 9:37 AM João Manoel  wrote:

> I used to use "sudo halt", but I found that using "sudo poweroff"
> completely switches off the board, even the leds. I don't know why it is
> different, but the poweroff command seems to tell the PMU to cut the power
> line, and "halt" does only a software power off.
>
> Best regards.
>
> Em ter, 6 de ago de 2019 às 05:09, Jani  escreveu:
>
>> How to proceed from here?  LED D5 and D14 are still ON.
>>
>> Do I just close the PC Console terminal?
>>
>> [image: halt.PNG]
>>
>>
>> On Monday, August 5, 2019 at 3:18:02 PM UTC-4, Robert Heller wrote:
>>>
>>> At Mon, 5 Aug 2019 23:18:31 +0530 beagl...@googlegroups.com wrote:
>>>
>>> >
>>> >
>>> > Interesting. I thought shutdown command was the way to do it.
>>>
>>> /sbin/halt === /sbin/shutdown -h now
>>> /sbin/reboot === /sbin/shutdown -r now
>>>
>>> /sbin/halt and /sbin/reboot are "shortcuts" for common shutdown cases.
>>>
>>> Feel free to type all of '/sbin/shutdown -h now' if you prefer...
>>>
>>> >
>>> >
>>> > On Mon, Aug 5, 2019 at 6:22 PM Robert Heller 
>>> wrote:
>>> >
>>> > > At Sun, 4 Aug 2019 21:25:19 -0700 (PDT) beagl...@googlegroups.com
>>> > > wrote:
>>> > >
>>> > > >
>>> > > >
>>> > > >
>>> > > > I have my BeagleBoard-xM connected to Windows 10 Laptop.  They are
>>> > > > communicating over serial console.
>>> > > > I logged out and closed serial console.
>>> > > >
>>> > > > How should I correctly power down my board?
>>> > >
>>> > > *Before* you logout, run this command:
>>> > >
>>> > > sudo /sbin/halt
>>> > >
>>> > > This will cleanly shut the BeagleBoard down.
>>> > >
>>> > > >
>>> > >
>>> > > --
>>> > > Robert Heller -- 978-544-6933
>>> > > Deepwoods Software-- Custom Software Services
>>> > > http://www.deepsoft.com/  -- Linux Administration Services
>>> > > hel...@deepsoft.com   -- Webhosting Services
>>> > >
>>> > >
>>> > > --
>>> > > 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 beagl...@googlegroups.com.
>>> > > To view this discussion on the web visit
>>> > >
>>> https://groups.google.com/d/msgid/beagleboard/20190805125147.BCF6926C009B%40sharky3.deepsoft.com
>>> > > .
>>> > >
>>> >
>>> >
>>>
>>> --
>>> Robert Heller -- 978-544-6933
>>> Deepwoods Software-- Custom Software Services
>>> http://www.deepsoft.com/  -- Linux Administration Services
>>> hel...@deepsoft.com   -- Webhosting Services
>>>
>>>
>>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beagleboard/230cc004-5173-499c-98e4-c30451d84f7f%40googlegroups.com
>> 
>> .
>>
>
>
> --
> João Manoel
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/CAOe5q-Fyn-6YCbuTPKJv4u%2BrYU8asPFYXJTxsLZVPN4NsTkfOg%40mail.gmail.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALiMYrs4v%2B%2B4FKzxB447%3Djt%2Ba1TY3Kj9D5Cmr7JBDqXS8gRFog%40mail.gmail.com.


Re: [beagleboard] Hello, Question about sending voltage through UDP communication (Server <-> Client Communication, Ja

2019-07-25 Thread Adrian Godwin
You could start somewhere like this :
http://www.cs.rpi.edu/~moorthy/Courses/os98/Pgms/socket.html

To be honest, I probably wouldn't do that. Assuming I will end up wanting
to send other chunks of data as well, and each would need to be
distinguished from the others, I would use some convenient infrastructure
designed for that job.

MQTT is one such protocol : http://mqtt.org/

It's another thing to learn, but it provides a lot of facilities for the
management of errors (which tends to consume the majority of your code by
the time you have something reliable) and is generally easier to use than
the lower layers.



On Thu, Jul 25, 2019 at 5:40 PM Albert  wrote:

>
> Hello, I want to send voltage of beaglebone to server (UDP with IP and
> port)
>
> How can I send readLoadCurrent(0) with interval by using code below?
>
> Thanks,
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/9ebd2019-a082-4fd2-a673-d36285fa84e6%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALiMYrtbSGRkDQQO9CDqk%2BXLNUVsYL998aQyM-xanN%3DFisFEpQ%40mail.gmail.com.


Re: [beagleboard] Ethernet module in beagle bone black

2019-07-24 Thread Adrian Godwin
You might not need to write any code. The parts of a linux system are
sufficiently generic that you can often link them with existing utilities.
There are a number of ways to connect a serial port to a network connection
so that it can be used over ethernet.

For example, read the answers here :
https://stackoverflow.com/questions/22624653/create-a-virtual-serial-port-connection-over-tcp

On Wed, Jul 24, 2019 at 4:53 PM Robert Heller  wrote:

> At Tue, 23 Jul 2019 21:14:21 -0700 (PDT) beagleboard@googlegroups.com
> wrote:
>
> >
> >
> >
> > Hi,
> >
> > I am using beagle bone black board in Linux ubuntu 16.04LTS, i need to
> work
> > on Ethernet .
> >
> > requirement is like enabling Ethernet  between the Board and PC and i
> need
> > to send the data from PC and need to receive the data on beagle bone
> black
> > using Ethernet communication and once data collected that data i need to
> > pass to the other PC using Uart..
> >
> > Uart enabling and transmitting the data i understood...
> >
> > please tell me how to configure Ethernet and C program to receive the
> data
> > from Ethernet
> >
> > please suggest me any related link for this
>
> Well... You probably don't want to delve into raw Ethernet.  What you want
> to
> do is implement some sort of Tcp/Ip data transfer and let the kernel(s)
> sweat
> the details.
>
> Tcp/Ip uses a client / server model: one side is the "server" and the
> other is
> the "client".  The server is a little more complicated than the client.
>
> To implement a "server" process, you need to creating a socket, bind it to
> a
> port [number] and then listen on it and when someone connects to the port
> (the
> client), you then start communicating.
>
> In C you would use these functions:
>
> socket()  -- create a socket
> bind()-- bind it to an address & port
> listen()  -- listen for connections
> accept()  -- accept a connection to the client
> Then:
> read() and write() to actually transfer data, then close() when done.
>
> Minimial C program would look something like this:
>
> #include 
> #include 
>
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 
>
> #define ERRORCHECK(funcall,message) \
> if ((funcall) < 0) { \
> int err = errno; \
> perror(message); \
> exit(err); \
> }
>
> #define PORT 1 /* Port we will be listening on. */
>
> int do_dataTransfer(int connection,struct sockaddr_in *fromAddress);
>
> int main(int argc, char *argv[])
> {
> int listenSock, connectSock, pstatus;
> struct sockaddr_in my_addr, peer_addr;
> socklen_t peer_addr_size;
> struct pollfd ufd;
>
> /* Create a socket */
> listenSock = socket(AF_INET, SOCK_STREAM|SOCK_NONBLOCK,0);
> ERRORCHECK(listenSock,"Failed to create socket")
>
> memset(_addr,0,sizeof(my_addr)); /* clear out the address */
> my_addr.sin_addr.s_addr = htonl(INADDR_ANY); /* listen on all
> addresses */
> my_addr.sin_port = htons(PORT);
> my_addr.sin_family = AF_INET;
> /* Bind the address to a port */
> ERRORCHECK(bind(listenSock,(const struct
> sockaddr*)_addr,sizeof(my_addr)))
> /* Listen for clients */
> ERRORCHECK(listen(listenSock,1) /* backlog of one: only one client at
> a time */
> /* Check to see if anyone wants to talk to us */
> while (1) {
> ufd.fd = listenSock;
> ufd.events = POLLIN;
> pstatus = poll(,1,10);
> ERRORCHECK(pstatus,"Poll failed");
> if (pstatus > 0) {
> /* Someone wants to talk, connect to his socket */
> connectSock = accept(listenSock,(struct
> sockaddr*)_addr,_addr_size);
> ERRORCHECK(connectSock,"Accept failed");
> if (connectSock > 0) {
> /* We are connected. Now we can talk to each other. */
> do_dataTransfer(connectSock,_addr);
> }
> }
> usleep(5); /* sleep 50 ms */
> }
> }
>
> The client program would use socket() to create the socket, then connect()
> to
> connect it to a server.  And then read() and write() to transfer data and
> finally close() to close the connection.
>
> On most Linux machines, there are man pages for all of these functions (in
> section 2).  There are probably zillions of example programs out on the
> Internet as well.
>
> --
> Robert Heller -- 978-544-6933
> Deepwoods Software-- Custom Software Services
> http://www.deepsoft.com/  -- Linux Administration Services
> hel...@deepsoft.com   -- Webhosting Services
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/20190724155315.EF5FD26C0168%40sharky3.deepsoft.com
> .
>

-- 
For more 

Re: [beagleboard] SPI input is always 0 with BeagleBoneBlack Anstrom images

2019-02-24 Thread Adrian Godwin
I2C uses clock stretching but I'm not aware of any SPI interfaces that do
it. However, it may be that the hardware is shared.


On Sun, Feb 24, 2019 at 5:22 PM 'Bruce Snyder' via BeagleBoard <
beagleboard@googlegroups.com> wrote:

> It's probably for clock-stretching.  Both pins clock and data need to go
> both ways.
>
> On Thursday, February 21, 2019 at 9:58:12 AM UTC-5, waplu...@gmail.com
> wrote:
>>
>> Thanks - you saved my day!  I just ran into the same quirk.  Truly
>> bizzare that the SPI_CLK pinmux has to be set as an input in master mode
>> where the pin is clearly an output.
>>
>> On Tuesday, May 7, 2013 at 10:21:11 AM UTC-6, ky...@cranehome.info wrote:
>>>
>>> Ok at least I'm not that stupid then. ;)
>>>
>>> On Tuesday, May 7, 2013 10:51:59 AM UTC-5, wb666...@gmail.com wrote:

 Its a quirk of the SPI hardware as far as I can tell, even on the
 original Beagleboard the SPI_CLK pinmux has to be set as an input.

>>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/6138aa63-d406-4679-a0ab-8bf32189a8d2%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALiMYrv8pfo4odn8WEJCyQLs9g6ZPZZj8y-J0aJ28fQyaGbOmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] MLX90621 Temperature Sensor

2019-02-24 Thread Adrian Godwin
Thanks for that. I've done something similar for another Melexis device,
the MLX90640 32x24 sensor.

However, I've used a rather bizarre interface : an arduino that does the
I2C operations remotely via  the usual USB-serial interface.
It also handles a couple of ST vl53l1x distance sensors. This is because I
wanted a fairly generic connection that wasn't tied to the capabilities of
any particular SBC.

It's a fairly slow way to do things and suffers from the small buffer
memory in the arduino, but the USB-serial part is fairly well encapsulated
and I can probably learn something from your use of the direct i2c
connection. Or perhaps use USB natively, without the serial part, on a
different microcontroller such as a teensy or maple.


On Sun, Feb 24, 2019 at 5:43 PM Charles Steinkuehler <
char...@steinkuehler.net> wrote:

> In case it's useful for anyone else, I have ported code for the
> MLX90621 (4x16 pixel remote IR temperature sensor) from the RPi (talks
> directly to the BCM hardware) to use standard Linux I2C devices (eg:
> /dev/i2c1) so it works on the 'Bone and other boards with standard
> Linux I2C support.
>
> Tested on a BBB using I2C2 (/dev/i2c1, the cape EEPROM I2C bus), 5.6K
> pull-up resistors, and a diode-connected transistor to drop the 3.3V
> rail to the 2.6V preferred by the MLX.
>
> Code is on github:
> https://github.com/cdsteinkuehler/mlxd/tree/linux-i2c
>
> --
> Charles Steinkuehler
> char...@steinkuehler.net
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/ec6f20fa-8261-48f9-b9d5-696910767461%40steinkuehler.net
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALiMYrtLH40%3DbHVF77efgsPJdg3BBVPXTJ%3DuQuHOB6AJBFJW0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Terminal nor showing current path/ location

2019-02-16 Thread Adrian Godwin
The shell prompt can be customised using the environment variable PS1. I
would guess yours is set to show hostname but anything is possible. See
http://www.gnu.org/software/bash/manual/bashref.html#Controlling-the-Prompt

If you have another system that's showing a prompt that you prefer, you can
finmd out what it's set to with
echo $PS1


On Sat, Feb 16, 2019 at 7:06 PM evilwulfie  wrote:

> So now you know how flash Debian onto it.
>
> Angstrom is so far behind its dust.
>
> I been using the Debian images from Robert here forever they ALWAYS just
> work
>
> On 2/16/2019 11:59 AM, aa...@cnccraft.co.uk wrote:
>
> Hi
> I finally managed to flash my beagle bone with Angstrom (I really think
> there is something wrong with the debian image on this site)
>
> My problem is, the terminal does not show the current path or location...
> it displays 'sh-4.2#'. How can I make it display normally\?
>
> Thanks for any help.
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/eaa06cb6-a2a8-471e-9fe9-35ad8fe73f12%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/bb3d4a06-486d-b327-30ce-fb71a1660ddd%40gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALiMYrsf%3DG8fMddDznNRSKMuDxZws9Wb5B1aREDXjjnqMrN9wA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Powering Beaglebone Blue off a 4s battery 14.8V

2019-02-13 Thread Adrian Godwin
The charge balance connectors are typically JST PH connectors on a 0.1"
pitch (though might be 2mm  - it think that's JST XH). They bring out the
two ends of the battery pack (the same as the high current connector) and
every junction between cells. So the 2s charger on the BBBlue has 2+1 pins
and the 4s connector on your battery has  2+3 pins.

The outer pins, if connected to the BBBlue, will provide 14.8 - 16.8V and
this might be OK to power the BB although it will not be able to charge it
correctly using the charge balance wiring. I'm not entirely certain that it
will be OK - the DC jack is rated to 18V but the charge connector is only
expected to supply 8.4V to the pack and may not tolerate the 4s pack.

Since you aren't able to charge it that I would think it would be safer to
use the DC jack as Graham says, though you will need to fix the connector
in as they won't stand much vibration and it's likely to fall out during
flight.

You will need a wiring harness to connect the heavy current output from the
lipo pack to the motor controllers. You may be able to buy this ready made
and add a wire to supply power to the BBBlue (it might already have a
controller power connection, or the speed controllers might have a 5V
output for it). If you make it up from individual connectors, the part for
the battery pack is called a TX60 (or the larger TX80)  and is easily
available from ebay or quadcopter supply sources. The same connector is
probably used on the motor controllers, or they might be fitted with one of
the other standards. Quite often they have no connectors fitted as there
are a number of different options alongside TX60.



On Wed, Feb 13, 2019 at 8:09 PM  wrote:

> I am a bit unsure on how to connect the 4s battery to the dc jack. It is
> using the battery connector found on this jack
> https://www.unmannedtechshop.co.uk/product/tattu-1800mah-14-8v-45c-4s1p-lipo-battery-pack/.
> Is there some component I can by which I can solder on the end of the
> battery leads to go to a dc jack I can connect to the beaglebone blue?
>
> On Wednesday, 13 February 2019 02:05:29 UTC, Graham Stott wrote:
>>
>> Are you expecting to also charge the battery using the Beaglebone Blue?
>> If not, why not connect the battery to the DC jack input?
>>
>>
>>
>> Graham
>>
>>
>>
>> *From:* beagl...@googlegroups.com [mailto:beagl...@googlegroups.com] *On
>> Behalf Of *timmc...@gmail.com
>> *Sent:* Tuesday, February 12, 2019 12:48 PM
>> *To:* BeagleBoard 
>> *Subject:* [beagleboard] Powering Beaglebone Blue off a 4s battery 14.8V
>>
>>
>>
>> I am planning to use a Beaglebone Blue in a drone that I am building. The
>> drone motors need a 4s battery which runs at 14.8V however the connector
>> for a battery on the Beaglebone Blue seems to only support a 2s battery
>> which operates at 7.4V. How would you recommend running the Beaglebone Blue
>> off a 4s battery? If needed we are able to solder components together.
>>
>> --
>> 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...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beagleboard/b06db982-88de-4218-bd5a-3450bab249ca%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/ecfee155-a889-4193-a55b-25af814655de%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALiMYrtZ6RHHYpyCe21owGh_aKZYX%3D%2BUQy6dkcGFJtwVmbVe%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] USB device connector

2019-01-25 Thread Adrian Godwin
I'm powering a beaglebone (BBGW) through the header pins rather than the
micro-USB connector.

Is it possible to use the micro USB as a further host connector instead of
a device ? Perhaps by providing independent power to the attached device,
as I don't think the beaglebone's power controller is intended to supply
power in that direction.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALiMYrs2cXVi61KesV7nmMNmLDnK8XmGtsE3X_V2%3DczEmFhDOw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Is it possible to use BeagleBone Blue without an internet connection?

2019-01-20 Thread Adrian Godwin
Are you allowed to set them up in the internet-connected lab and then take
them to the airgapped area ?


On Sun, Jan 20, 2019 at 2:27 PM TW  wrote:

> I've never used BeagleBone's before and I work in a lab with no internet
> connection, trying to get started with BeagleBone Blue boards for a
> project. The lab has Windows 10 computers, USB cables, 12V adapters, SD
> card readers, and an external CD drive. I have access to another facility
> with a secure internet connection for downloading and I can use an external
> CD drive to transfer files. I thought I could download everything off of
> the secure connection, transfer to the lab, and install but I'm having
> problems. When I tried to run the executable to install the Windows
> drivers, it failed because of no connection. Also I tried to install
> Chrome, required for the browsing the web server running on the board, and
> it also failed. I was able to install Putty and connect using an SSH
> terminal (192.168.7.2, debian, temppwd). But it didn't look like their was
> anything loaded. I found a bin folder in the root directory that was empty.
>
> The Getting Started instructions that came with the board says to connect
> the board to a computer with a USB cable and then connect to the internet.
> I obviously can't do that and I'm beginning to wonder if these boards will
> work at all without an internet connection. I hoping someone has a clever
> solution for me to work with these limitations.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/07074f27-40b7-4284-9b6c-c3dbf04e01ec%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALiMYru440N-%2BAx4qeJf2s57U5tUogicAnOe%3D%3DaiR3oRkinF2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: Beaglebone as a USBTMC Device

2019-01-14 Thread Adrian Godwin
If I understand Matt correctly, he doesn't want what Python USBTMC does. I
believe that's a Python application (which might run on a BB) that accesses
instruments having USBTMC interfaces.

Matt wants to make the Beaglebone one of those instruments. He therefore
needs to have the BB offer a USBTMC device on its device port.

I don't know if such a driver already exists or what would be required to
create one but I would start here :

http://wh1t3s.com/2009/05/11/beagleboard-as-usb-mass-storage-device-via-usb-otg/

This explains how to build the kernel with alternate device interfaces such
as MIDI.





On Mon, Jan 14, 2019 at 3:27 PM Graham  wrote:

> Matt:
>
> Although I have never done what you are asking about, I note that there is
> an available USBTMC driver for Pythonf.
> Python is a reasonable choice for test equipment control and scripting.
> You might want to Google "Python USBTMC."
>
> Both Python 2 and Python 3 are readily available for the BBB.
>
> --- Graham
>
> ==
>
> On Sunday, January 13, 2019 at 10:51:48 PM UTC-6, Matt Bradley wrote:
>>
>> Hello,
>>
>> Does anyone know how to make the Beaglebone Black into a USBTMC device?
>>
>> Please note: I am not trying to control USB devices (like multimeters and
>> oscilloscopes) with the Beaglebone.  I am trying to make a new instrument
>> and will use the Beaglebone as the brains of the instrument.
>>
>> I know it can be done, but I do not have any idea how to do it.  Thanks!
>>
>> -Matt Bradley
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/47706941-f0ac-43f4-8f93-aef2538fdfd6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALiMYruuwyj6jAacrK7wXE9hAzXC6XE13NSvFiPmp%2B7%2BUm42zQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] BBGW otg port ?

2018-12-23 Thread Adrian Godwin
The bbgw power / device micro usb port has the ID pin connected - i.e. it 
appears to be configured as OTG. Does this mean it's possible to use it as 
a host port  ? I have tried to connect it but can't see USB devices on it, 
though I think I'm using an appropriate adapter cable. 

If it can be used, how should it be enabled ?


-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/ed33fb0a-ebc5-4e3d-a29c-2736e39f6fce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.